toposort
Topological order of directed acyclic graph
Syntax
n = toposort(G)
n = toposort(G,'Order',algorithm)
[n,H] = toposort(___)
Description
returns thetopological orderof the nodes inn
= toposort(G
)G
such thati < j
for every edge(n(i),n(j))
inG
. The directed graphG
cannot have any cycles.
Examples
Input Arguments
Output Arguments
More About
See Also
Introduced in R2015b
Was this topic helpful?