Description Usage Arguments Details Value
Return a linear ordering of vertices in an acyclic directed graph such that for every directed edge from u to v, u comes before v in the ordering.
1 | topologicalSort(edges)
|
edges |
named list of edges from each vertex as character vector |
edges
list should be named for each vertex in the
graph. Each vertex object should be a character vector of vectors
to which the vector has a directed edge.
Uses Kahn's algorithm https://en.wikipedia.org/wiki/Topological_sorting#Kahn.27s_algorithm
character vector of sorted vertices
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.