pub trait DirectedNeighborsWithValues<NI, EV>where
    NI: Idx,{
    type NeighborsIterator<'a>: Iterator<Item = &'a Target<NI, EV>>
       where Self: 'a,
             EV: 'a;

    // Required methods
    fn out_neighbors_with_values(&self, node: NI) -> Self::NeighborsIterator<'_>;
    fn in_neighbors_with_values(&self, node: NI) -> Self::NeighborsIterator<'_>;
}
Expand description

Returns the neighbors of a given node either in outgoing or incoming direction.

An edge tuple e = (u, v) has a source node u and a target node v. From the perspective of u, the edge e is an outgoing edge. From the perspective of node v, the edge e is an incoming edge. The edges (u, v) and (v, u) are not considered equivale

Required Associated Types§

source

type NeighborsIterator<'a>: Iterator<Item = &'a Target<NI, EV>> where Self: 'a, EV: 'a

Required Methods§

source

fn out_neighbors_with_values(&self, node: NI) -> Self::NeighborsIterator<'_>

Returns an iterator of all nodes which are connected in outgoing direction to the given node, i.e., the given node is the source node of the connecting edge. For each connected node, the value of the connecting edge is also returned.

source

fn in_neighbors_with_values(&self, node: NI) -> Self::NeighborsIterator<'_>

Returns an iterator of all nodes which are connected in incoming direction to the given node, i.e., the given node is the target node of the connecting edge. For each connected node, the value of the connecting edge is also returned.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<NI, NV, EV> DirectedNeighborsWithValues<NI, EV> for DirectedALGraph<NI, NV, EV>where NI: Idx,

§

type NeighborsIterator<'a> = TargetsWithValuesIter<'a, NI, EV> where NV: 'a, EV: 'a

source§

impl<NI, NV, EV> DirectedNeighborsWithValues<NI, EV> for DirectedCsrGraph<NI, NV, EV>where NI: Idx,

§

type NeighborsIterator<'a> = Iter<'a, Target<NI, EV>> where NV: 'a, EV: 'a