pub struct CondensedGraph {
pub components: Vec<Vec<NodeId>>,
pub edges: Vec<Vec<usize>>,
}Expand description
The result of condensing a directed graph into its SCC DAG.
Each node in the condensed graph represents one SCC of the original graph. The condensed graph is always a DAG (directed acyclic graph).
Fields§
§components: Vec<Vec<NodeId>>components[i] is the list of original NodeIds that belong to
super-node i in the condensed graph.
edges: Vec<Vec<usize>>Edges of the condensed DAG.
edges[i] is the list of super-node indices that super-node i has
a directed edge to. Self-loops (SCC to itself) are not included.
Implementations§
Source§impl CondensedGraph
impl CondensedGraph
Sourcepub fn node_count(&self) -> usize
pub fn node_count(&self) -> usize
Returns the number of super-nodes (SCCs) in the condensed graph.
Trait Implementations§
Source§impl Clone for CondensedGraph
impl Clone for CondensedGraph
Source§fn clone(&self) -> CondensedGraph
fn clone(&self) -> CondensedGraph
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CondensedGraph
impl RefUnwindSafe for CondensedGraph
impl Send for CondensedGraph
impl Sync for CondensedGraph
impl Unpin for CondensedGraph
impl UnwindSafe for CondensedGraph
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