compute.adjacency.matrix is a function to compute the adjacency matrix of a multiplex network provided as a Multiplex object.

compute.adjacency.matrix(x,delta = 0.5)

Arguments

x

A Multiplex object describing a multiplex network generated by the function create.multiplex.

delta

A numeric value between 0 and 1. It sets the probability of performing inter-layer versus intra-layer transitions. It is set by default to 0.5. See more details below.

Value

A square sparse adjacency matrix created with the Matrix package.

Details

The parameter delta sets the probability to change between layers at the next step. If delta = 0, the particle will always remain in the same layer after a non-restart iteration. On the other hand, if delta = 1, the particle will always change between layers, therefore not following the specific edges of each layer.

See also

Author

Alberto Valdeolivas Urbelz alvaldeolivas@gmail.com

Examples

m1 <- igraph::graph(c(1,2,1,3,2,3), directed = FALSE) m2 <- igraph::graph(c(1,3,2,3,3,4,1,4), directed = FALSE) multiObject <- create.multiplex(list(m1=m1,m2=m2)) compute.adjacency.matrix(multiObject)
#> 8 x 8 sparse Matrix of class "dgCMatrix" #> 1_1 2_1 3_1 4_1 1_2 2_2 3_2 4_2 #> 1_1 . 0.5 0.5 . 0.5 . . . #> 2_1 0.5 . 0.5 . . 0.5 . . #> 3_1 0.5 0.5 . . . . 0.5 . #> 4_1 . . . . . . . 0.5 #> 1_2 0.5 . . . . . 0.5 0.5 #> 2_2 . 0.5 . . . . 0.5 . #> 3_2 . . 0.5 . 0.5 0.5 . 0.5 #> 4_2 . . . 0.5 0.5 . 0.5 .