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

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

Returns the neighbors of a given node.

The edge (42, 1337) is equivalent to the edge (1337, 42).

Required Associated Types§

source

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

Required Methods§

source

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

Returns an iterator of all nodes connected to the given node including the value of the connecting edge.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<NI, NV, EV> UndirectedNeighborsWithValues<NI, EV> for UndirectedALGraph<NI, NV, EV>where NI: Idx,

§

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

source§

impl<NI, NV, EV> UndirectedNeighborsWithValues<NI, EV> for UndirectedCsrGraph<NI, NV, EV>where NI: Idx,

§

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