R/topo_sort.R

Defines functions topo_sort_mat

topo_sort_mat <- function(x) {
  ig <- igraph::graph_from_adjacency_matrix(
      t(x) != 0,
      mode = 'directed'
    )
  as.numeric(igraph::topo_sort(ig))
}
jean997/mrScan documentation built on Dec. 20, 2024, 3:39 a.m.