Trait SwhForwardGraph

Source
pub trait SwhForwardGraph: SwhGraph {
    type Successors<'succ>: IntoIterator<Item = usize>
       where Self: 'succ;

    // Required methods
    fn successors(&self, node_id: NodeId) -> Self::Successors<'_>;
    fn outdegree(&self, node_id: NodeId) -> usize;
}

Required Associated Types§

Source

type Successors<'succ>: IntoIterator<Item = usize> where Self: 'succ

Required Methods§

Source

fn successors(&self, node_id: NodeId) -> Self::Successors<'_>

Return an IntoIterator over the successors of a node.

Source

fn outdegree(&self, node_id: NodeId) -> usize

Return the number of successors of a node.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<G: SwhBackwardGraph> SwhForwardGraph for Transposed<G>

Source§

type Successors<'succ> = <G as SwhBackwardGraph>::Predecessors<'succ> where Self: 'succ

Source§

impl<G: SwhForwardGraph> SwhForwardGraph for GraphSpy<G>

Source§

type Successors<'succ> = <G as SwhForwardGraph>::Successors<'succ> where Self: 'succ

Source§

impl<G: SwhForwardGraph, NodeFilter: Fn(usize) -> bool, ArcFilter: Fn(usize, usize) -> bool> SwhForwardGraph for Subgraph<G, NodeFilter, ArcFilter>

Source§

type Successors<'succ> = FilteredSuccessors<'succ, <<G as SwhForwardGraph>::Successors<'succ> as IntoIterator>::IntoIter, NodeFilter, ArcFilter> where Self: 'succ

Source§

impl<P, FG: UnderlyingGraph, BG: UnderlyingGraph> SwhForwardGraph for SwhBidirectionalGraph<P, FG, BG>

Source§

type Successors<'succ> = <FG as UnderlyingGraph>::UnlabeledSuccessors<'succ> where Self: 'succ

Source§

impl<P, G: UnderlyingGraph> SwhForwardGraph for SwhUnidirectionalGraph<P, G>

Source§

type Successors<'succ> = <G as UnderlyingGraph>::UnlabeledSuccessors<'succ> where Self: 'succ

Source§

impl<T: Deref> SwhForwardGraph for T
where <T as Deref>::Target: SwhForwardGraph,

Source§

type Successors<'succ> = <<T as Deref>::Target as SwhForwardGraph>::Successors<'succ> where Self: 'succ