R/graph_utils.R
topologically_ordering.Rd
Order rows/columns of a adjacency matrix topologically
topologically_ordering(adja_mat, alt = FALSE)
Adjacency matrix of network
Use igraph implementation
topologically ordered matrix
adj <- matrix(c(0,1,0,0,0,1,0,0,0),3,3) topologically_ordering(adj) #> [,1] [,2] [,3] #> [1,] 0 1 0 #> [2,] 0 0 1 #> [3,] 0 0 0