Topological sorting algorithms — Kahn's algorithm and lexicographic variant.
Summary
Functions
Performs a lexicographically smallest topological sort.
Performs a topological sort on a directed graph using Kahn's algorithm.
Functions
@spec lexicographical_topological_sort(Yog.graph(), (term(), term() -> :lt | :eq | :gt)) :: {:ok, [Yog.node_id()]} | {:error, :contains_cycle}
Performs a lexicographically smallest topological sort.
@spec topological_sort(Yog.graph()) :: {:ok, [Yog.node_id()]} | {:error, :contains_cycle}
Performs a topological sort on a directed graph using Kahn's algorithm.