Struct rustc_data_structures::graph::scc::Sccs [−][src]
Strongly connected components (SCC) of a graph. The type N is
the index type for the graph nodes and S is the index type for
the SCCs. We can map from each node to the SCC that it
participates in, and we also have the successors of each SCC.
Methods
impl<N: Idx, S: Idx> Sccs<N, S>[src]
impl<N: Idx, S: Idx> Sccs<N, S>pub fn new(
graph: &impl DirectedGraph<Node = N> + WithNumNodes + WithSuccessors
) -> Self[src]
pub fn new(
graph: &impl DirectedGraph<Node = N> + WithNumNodes + WithSuccessors
) -> Selfpub fn num_sccs(&self) -> usize[src]
pub fn num_sccs(&self) -> usizeReturns the number of SCCs in the graph.
pub fn all_sccs(
&self
) -> impl Iterator<Item = S>[src]
pub fn all_sccs(
&self
) -> impl Iterator<Item = S>Returns an iterator over the SCCs in the graph.
pub fn scc(&self, r: N) -> S[src]
pub fn scc(&self, r: N) -> SReturns the SCC to which a node r belongs.
pub fn successors(&self, scc: S) -> &[S][src]
pub fn successors(&self, scc: S) -> &[S]Returns the successors of the given SCC.