pub trait Undirected: GraphType {
    type NeighIt<'a>: GraphIterator<Self, Item = (Self::Edge<'a>, Self::Node<'a>)>
       where Self: 'a;

    // Required method
    fn neigh_iter(&self, u: Self::Node<'_>) -> Self::NeighIt<'_>;

    // Provided methods
    fn neighs(
        &self,
        u: Self::Node<'_>
    ) -> GraphIter<'_, Self, <Self as Undirected>::NeighIt<'_>> 
       where Self: Sized { ... }
    fn neighbors(&self) -> Neighbors<'_, Self>
       where Self: Sized { ... }
}
Expand description

A graph with list access to undirected incident edges.

Required Associated Types§

source

type NeighIt<'a>: GraphIterator<Self, Item = (Self::Edge<'a>, Self::Node<'a>)> where Self: 'a

Type of a graph iterator over all incident edges.

Required Methods§

source

fn neigh_iter(&self, u: Self::Node<'_>) -> Self::NeighIt<'_>

Return a graph iterator over the edges adjacent to some node.

Provided Methods§

source

fn neighs( &self, u: Self::Node<'_> ) -> GraphIter<'_, Self, <Self as Undirected>::NeighIt<'_>> where Self: Sized,

Return an iterator over the edges adjacent to some node.

source

fn neighbors(&self) -> Neighbors<'_, Self>where Self: Sized,

Return access to the neighbors via an Adjacencies trait.

This is the same as calling Neighbors(&g) on the graph.

Implementations on Foreign Types§

source§

impl<G> Undirected for Rc<G>where G: Undirected,

§

type NeighIt<'a> = WrapIt<<G as Undirected>::NeighIt<'a>> where G: 'a

source§

fn neigh_iter(&self, u: Self::Node<'_>) -> Self::NeighIt<'_>

source§

impl<'g, G> Undirected for &'g Gwhere G: Undirected,

§

type NeighIt<'a> = WrapIt<<G as Undirected>::NeighIt<'a>> where G: 'a, 'g: 'a

source§

fn neigh_iter(&self, u: Self::Node<'_>) -> Self::NeighIt<'_>

Implementors§

source§

impl<'g, G> Undirected for Network<'g, G>where G: Undirected,

§

type NeighIt<'a> = NetworkNeighIt<G, <G as Undirected>::NeighIt<'a>> where G: 'a, 'g: 'a

source§

impl<'g, G> Undirected for ReverseDigraph<'g, G>where G: Undirected,

§

type NeighIt<'a> = ReverseWrapIt<<G as Undirected>::NeighIt<'a>> where G: 'a, 'g: 'a

source§

impl<ID> Undirected for VecGraph<ID>where ID: PrimInt + Unsigned + 'static,

§

type NeighIt<'a> = NeighIt<'a, ID>

source§

impl<ID, N, E> Undirected for LinkedListGraph<ID, N, E>where ID: PrimInt + Unsigned + 'static,

§

type NeighIt<'a> = NeighIt<ID> where N: 'a, E: 'a