Struct petgraph::algo::TarjanScc[][src]

pub struct TarjanScc<N> { /* fields omitted */ }

A reusable state for computing the strongly connected components using Tarjan's algorithm.

Implementations

impl<N> TarjanScc<N>[src]

pub fn new() -> Self[src]

Creates a new TarjanScc

pub fn run<G, F>(&mut self, g: G, f: F) where
    G: IntoNodeIdentifiers<NodeId = N> + IntoNeighbors<NodeId = N> + NodeIndexable<NodeId = N>,
    F: FnMut(&[N]),
    N: Copy + PartialEq
[src]

[Generic] Compute the strongly connected components using Tarjan's algorithm.

Calls f for each strongly strongly connected component (scc). The order of node ids within each scc is arbitrary, but the order of the sccs is their postorder (reverse topological sort).

For an undirected graph, the sccs are simply the connected components.

This implementation is recursive and does one pass over the nodes.

Trait Implementations

impl<N: Debug> Debug for TarjanScc<N>[src]

impl<N> Default for TarjanScc<N>[src]

Auto Trait Implementations

impl<N> RefUnwindSafe for TarjanScc<N> where
    N: RefUnwindSafe
[src]

impl<N> Send for TarjanScc<N> where
    N: Send
[src]

impl<N> Sync for TarjanScc<N> where
    N: Sync
[src]

impl<N> Unpin for TarjanScc<N> where
    N: Unpin
[src]

impl<N> UnwindSafe for TarjanScc<N> where
    N: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,