Struct rustc_ap_rustc_data_structures::graph::scc::Sccs [−][src]
Expand description
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.
Implementations
impl<N: Idx, S: Idx> Sccs<N, S>[src]
impl<N: Idx, S: Idx> Sccs<N, S>[src]pub fn new(
graph: &impl DirectedGraph<Node = N> + WithNumNodes + WithSuccessors
) -> Self[src]
graph: &impl DirectedGraph<Node = N> + WithNumNodes + WithSuccessors
) -> Self
pub fn all_sccs(&self) -> impl Iterator<Item = S>[src]
pub fn all_sccs(&self) -> impl Iterator<Item = S>[src]Returns an iterator over the SCCs in the graph.
The SCCs will be iterated in dependency order (or post order),
meaning that if S1 -> S2, we will visit S2 first and S1 after.
This is convenient when the edges represent dependencies: when you visit
S1, the value for S2 will already have been computed.
pub fn successors(&self, scc: S) -> &[S]ⓘ[src]
pub fn successors(&self, scc: S) -> &[S]ⓘ[src]Returns the successors of the given SCC.
Trait Implementations
impl<N: Idx, S: Idx, 'graph> GraphSuccessors<'graph> for Sccs<N, S>[src]
impl<N: Idx, S: Idx, 'graph> GraphSuccessors<'graph> for Sccs<N, S>[src]impl<N: Idx, S: Idx> WithSuccessors for Sccs<N, S>[src]
impl<N: Idx, S: Idx> WithSuccessors for Sccs<N, S>[src]fn successors(&self, node: S) -> <Self as GraphSuccessors<'_>>::Iter[src]
fn depth_first_search(&self, from: Self::Node) -> DepthFirstSearch<'_, Self>ⓘNotable traits for DepthFirstSearch<'_, G>
impl<G: ?Sized> Iterator for DepthFirstSearch<'_, G> where
G: DirectedGraph + WithNumNodes + WithSuccessors, type Item = G::Node; where
Self: WithNumNodes, [src]
Notable traits for DepthFirstSearch<'_, G>
impl<G: ?Sized> Iterator for DepthFirstSearch<'_, G> where
G: DirectedGraph + WithNumNodes + WithSuccessors, type Item = G::Node;Self: WithNumNodes,
Auto Trait Implementations
impl<N, S> RefUnwindSafe for Sccs<N, S> where
S: RefUnwindSafe,
S: RefUnwindSafe,
impl<N, S> Send for Sccs<N, S> where
S: Send,
S: Send,
impl<N, S> Sync for Sccs<N, S> where
S: Sync,
S: Sync,
impl<N, S> Unpin for Sccs<N, S> where
S: Unpin,
S: Unpin,
impl<N, S> UnwindSafe for Sccs<N, S> where
S: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T[src]
impl<T> Instrument for T[src]fn instrument(self, span: Span) -> Instrumented<Self>[src]
fn instrument(self, span: Span) -> Instrumented<Self>[src]Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>[src]
fn in_current_span(self) -> Instrumented<Self>[src]impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>, pub fn vzip(self) -> V
impl<'a, T> Captures<'a> for T where
T: ?Sized, [src]
T: ?Sized,