pub struct SccDecomposition { /* private fields */ }Expand description
Represents the decomposition of a Graph into
Strongly Connected Components
(SCC).
Implementations§
Source§impl SccDecomposition
impl SccDecomposition
Sourcepub fn scc_of_node(&self, node: Node) -> &Scc
pub fn scc_of_node(&self, node: Node) -> &Scc
Returns the SCC containing the given node.
Each node of the Graph will always
be assigned to exactly one SCC.
Sourcepub fn iter_sccs(&self) -> impl Iterator<Item = &Scc>
pub fn iter_sccs(&self) -> impl Iterator<Item = &Scc>
Returns an iterator over all SCCs in topological order.
If nodes A and B belong to different SCCs
and the graph has an edge A->B, then B’s SCC will appear before A’s SCC.
Sourcepub fn iter_nodes(&self) -> impl Iterator<Item = Node> + '_
pub fn iter_nodes(&self) -> impl Iterator<Item = Node> + '_
Returns an iterator over all nodes in topological order.
If nodes A and B belong to different SCCs
and the graph has an edge A->B, then B will appear before A.
Auto Trait Implementations§
impl Freeze for SccDecomposition
impl RefUnwindSafe for SccDecomposition
impl Send for SccDecomposition
impl Sync for SccDecomposition
impl Unpin for SccDecomposition
impl UnwindSafe for SccDecomposition
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more