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
.
Implementors
impl<'a, G, F> IntoNeighbors for &'a NodeFiltered<G, F> where G: IntoNeighbors, F: FilterNode<G::NodeId>
impl<'a, G, F> IntoNeighbors for &'a EdgeFiltered<G, F> where G: IntoEdges, F: FilterEdge<G::EdgeRef>
impl<G> IntoNeighbors for Reversed<G> where G: IntoNeighborsDirected
impl<'a, N, E: 'a, Ty, Ix> IntoNeighbors for &'a StableGraph<N, E, Ty, Ix> where Ty: EdgeType, Ix: IndexType
impl<'a, N: 'a, E, Ty> IntoNeighbors for &'a GraphMap<N, E, Ty> where N: Copy + Ord + Hash, Ty: EdgeType
impl<'a, G> IntoNeighbors for &'a G where G: IntoNeighbors
impl<'a, N, E: 'a, Ty, Ix> IntoNeighbors for &'a Graph<N, E, Ty, Ix> where Ty: EdgeType, Ix: IndexType
impl<'a, 'b, G> IntoNeighbors for &'b Frozen<'a, G> where G: IntoNeighbors
impl<'a, N, E, Ty, Ix> IntoNeighbors for &'a Csr<N, E, Ty, Ix> where Ty: EdgeType, Ix: IndexType