pub trait IntoNeighbors: GraphRef {
    type Neighbors: Iterator<Item = Self::NodeId>;

    // Required method
    fn neighbors(self, a: Self::NodeId) -> Self::Neighbors;
}
Expand description

Access to the neighbors of each node

The neighbors are, depending on the graph’s edge type:

  • Directed: All targets of edges from a.
  • Undirected: All other endpoints of edges connected to a.

Required Associated Types§

source

type Neighbors: Iterator<Item = Self::NodeId>

Required Methods§

source

fn neighbors(self, a: Self::NodeId) -> Self::Neighbors

Return an iterator of the neighbors of node a.

Implementations on Foreign Types§

source§

impl<'a, G> IntoNeighbors for &'a Gwhere G: IntoNeighbors,

§

type Neighbors = <G as IntoNeighbors>::Neighbors

source§

fn neighbors(self, a: Self::NodeId) -> Self::Neighbors

Implementors§

source§

impl<'a, 'b, G> IntoNeighbors for &'b Frozen<'a, G>where G: IntoNeighbors,

source§

impl<'a, E, Ix: IndexType> IntoNeighbors for &'a List<E, Ix>

§

type Neighbors = Neighbors<'a, E, Ix>

source§

impl<'a, G, F> IntoNeighbors for &'a EdgeFiltered<G, F>where G: IntoEdges, F: FilterEdge<G::EdgeRef>,

source§

impl<'a, G, F> IntoNeighbors for &'a NodeFiltered<G, F>where G: IntoNeighbors, F: FilterNode<G::NodeId>,

source§

impl<'a, N, E, Ty> IntoNeighbors for &'a GraphMap<N, E, Ty>where N: Copy + Ord + Hash + 'a, Ty: EdgeType,

§

type Neighbors = Neighbors<'a, N, Ty>

source§

impl<'a, N, E, Ty, Ix> IntoNeighbors for &'a Csr<N, E, Ty, Ix>where Ty: EdgeType, Ix: IndexType,

§

type Neighbors = Neighbors<'a, Ix>

source§

impl<'a, N, E: 'a, Ty, Ix> IntoNeighbors for &'a Graph<N, E, Ty, Ix>where Ty: EdgeType, Ix: IndexType,

§

type Neighbors = Neighbors<'a, E, Ix>

source§

impl<'a, N, E: 'a, Ty, Ix> IntoNeighbors for &'a StableGraph<N, E, Ty, Ix>where Ty: EdgeType, Ix: IndexType,

§

type Neighbors = Neighbors<'a, E, Ix>

source§

impl<'a, N, E: 'a, Ty: EdgeType, Null: Nullable<Wrapped = E>, Ix: IndexType> IntoNeighbors for &'a MatrixGraph<N, E, Ty, Null, Ix>

§

type Neighbors = Neighbors<'a, Ty, Null, Ix>

source§

impl<G> IntoNeighbors for Reversed<G>where G: IntoNeighborsDirected,