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

    // Required method
    fn neighbors(&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 NI> where Self: 'a

Required Methods§

source

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

Returns an iterator of all nodes connected to the given node.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<NI, NV> UndirectedNeighbors<NI> for UndirectedALGraph<NI, NV>where NI: Idx,

§

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

source§

impl<NI, NV> UndirectedNeighbors<NI> for UndirectedCsrGraph<NI, NV>where NI: Idx,

§

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