Skip to main content

UndirectedNeighborsWithValues

Trait UndirectedNeighborsWithValues 

Source
pub trait UndirectedNeighborsWithValues<NI: Idx, EV> {
    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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

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

Source§

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

Source§

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

Source§

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