Craph::DAG(T)
Inherits Craph::Graph / Reference / Object
Directed Acyclic Graph, extends Graph with cycle detection and topological sorting.
Constructors
new
SourceInstance methods
topological_sort(strict : Bool = true) : Array(Set(T))
Return the nodes sorted topologically. The algorithm uses clustered output to allow for parallel processing. When strict (default), raises CycleError if cycles exist. When not strict, cyclic nodes are excluded from the result.