pub(crate) type ConstraintSccs = Sccs<RegionVid, ConstraintSccIndex, RegionTracker>;
Aliased Type§
struct ConstraintSccs { /* private fields */ }
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 72 bytes
Implementations
Source§impl<N, S, A> Sccs<N, S, A>where
N: Idx,
S: Idx + Ord,
A: Annotation,
impl<N, S, A> Sccs<N, S, A>where
N: Idx,
S: Idx + Ord,
A: Annotation,
Sourcepub fn new_with_annotation<F>(
graph: &impl Successors<Node = N>,
to_annotation: F,
) -> Sccs<N, S, A>where
F: Fn(N) -> A,
pub fn new_with_annotation<F>(
graph: &impl Successors<Node = N>,
to_annotation: F,
) -> Sccs<N, S, A>where
F: Fn(N) -> A,
Compute SCCs and annotate them with a user-supplied annotation
pub fn annotation(&self, scc: S) -> A
pub fn scc_indices(&self) -> &IndexSlice<N, S>
Sourcepub fn all_sccs(&self) -> impl Iterator<Item = S>
pub fn all_sccs(&self) -> impl Iterator<Item = S>
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.
Sourcepub fn successors(&self, scc: S) -> &[S]
pub fn successors(&self, scc: S) -> &[S]
Returns the successors of the given SCC.