Trait rs_graph::traits::Undirected
source · 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§
sourcetype NeighIt<'a>: GraphIterator<Self, Item = (Self::Edge<'a>, Self::Node<'a>)>
where
Self: 'a
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§
sourcefn neigh_iter(&self, u: Self::Node<'_>) -> Self::NeighIt<'_>
fn neigh_iter(&self, u: Self::Node<'_>) -> Self::NeighIt<'_>
Return a graph iterator over the edges adjacent to some node.