mode: How should edges be followed. Either 'in' or 'out'
Returns
A vector of the same length as the number of nodes in the graph
Functions
node_dominator(): Get the immediate dominator of each node. Wraps igraph::dominator_tree().
node_topo_order(): Get the topological order of nodes in a DAG. Wraps igraph::topo_sort().
Examples
# Sort a graph based on its topological ordercreate_tree(10,2)%>% arrange(sample(graph_order()))%>% mutate(old_ind = seq_len(graph_order()))%>% arrange(node_topo_order())