Trait petgraph::visit::IntoNeighbors
[−]
[src]
pub trait IntoNeighbors: GraphRef { type Neighbors: Iterator<Item = Self::NodeId>; fn neighbors(self, a: Self::NodeId) -> Self::Neighbors; }
Access to the neighbors of each node
The neighbors are, depending on the graph’s edge type:
Directed
: All targets of edges froma
.Undirected
: All other endpoints of edges connected toa
.
Associated Types
Required Methods
fn neighbors(self, a: Self::NodeId) -> Self::Neighbors
Return an iterator of the neighbors of node a
.
Implementations on Foreign Types
impl<'a, G> IntoNeighbors for &'a G where
G: IntoNeighbors,
[src]
G: IntoNeighbors,
Implementors
impl<'a, G, F> IntoNeighbors for &'a NodeFiltered<G, F> where
G: IntoNeighbors,
F: FilterNode<G::NodeId>, type Neighbors = NodeFilteredNeighbors<'a, G::Neighbors, F>;impl<'a, G, F> IntoNeighbors for &'a EdgeFiltered<G, F> where
G: IntoEdges,
F: FilterEdge<G::EdgeRef>, type Neighbors = EdgeFilteredNeighbors<'a, G, F>;impl<G> IntoNeighbors for Reversed<G> where
G: IntoNeighborsDirected, type Neighbors = G::NeighborsDirected;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>;impl<'a, N: 'a, E, Ty> IntoNeighbors for &'a GraphMap<N, E, Ty> where
N: Copy + Ord + Hash,
Ty: EdgeType, type Neighbors = Neighbors<'a, N, Ty>;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>;impl<'a, 'b, G> IntoNeighbors for &'b Frozen<'a, G> where
G: IntoNeighbors, type Neighbors = G::Neighbors;impl<'a, N, E, Ty, Ix> IntoNeighbors for &'a Csr<N, E, Ty, Ix> where
Ty: EdgeType,
Ix: IndexType, type Neighbors = Neighbors<'a, Ix>;