Learn R Programming

cograph (version 2.0.0)

centrality_percolation: Percolation Centrality

Description

Importance for spreading processes using node states. Each node has a state (0-1) representing how activated it is. When all states are equal, equivalent to betweenness.

Usage

centrality_percolation(x, states = NULL, ...)

Value

Named numeric vector of percolation centrality values.

Arguments

x

Network input (matrix, igraph, network, cograph_network, tna object).

states

Named numeric vector of node states (0-1). Default NULL (all nodes get state 1).

...

Additional arguments passed to centrality (e.g., weighted, directed).

See Also

centrality for computing multiple measures at once, centrality_betweenness which this generalizes.

Examples

Run this code
adj <- matrix(c(0, 1, 1, 1, 0, 1, 1, 1, 0), 3, 3)
rownames(adj) <- colnames(adj) <- c("A", "B", "C")
centrality_percolation(adj)
centrality_percolation(adj, states = c(A = 0.8, B = 0.2, C = 0.5))

Run the code above in your browser using DataLab