pub trait TopologicalSort {
type Graph: VisitableGraph;
// Required method
fn topological_sort_opt(
&self,
roots: &Nodes,
roots_only: bool,
) -> Result<Vec<NodeID>>;
// Provided methods
fn topological_sort(&self) -> Result<Vec<NodeID>> { ... }
fn is_dag(&self) -> bool { ... }
}Expand description
A trait for a graph that supports topological sort.
Required Associated Types§
type Graph: VisitableGraph
Required Methods§
Provided Methods§
Sourcefn topological_sort(&self) -> Result<Vec<NodeID>>
fn topological_sort(&self) -> Result<Vec<NodeID>>
Returns reverse-order of topological sort.