Trait traitgraph::algo::traversal::TraversalNeighborStrategy [−][src]
pub trait TraversalNeighborStrategy<'a, Graph: GraphBase> {
type Iterator: Iterator<Item = Neighbor<Graph::NodeIndex, Graph::EdgeIndex>>;
type EdgeNeighborIterator: Iterator<Item = Graph::NodeIndex>;
fn neighbor_iterator(
graph: &'a Graph,
node: Graph::NodeIndex
) -> Self::Iterator;
fn edge_neighbor_iterator(
graph: &'a Graph,
edge: Graph::EdgeIndex
) -> Self::EdgeNeighborIterator;
}
Expand description
A type that defines the strategy for computing the neighborhood of a node or edge, i.e. forward, backward or undirected.
Associated Types
The iterator type used to iterate over the neighbors of a node.
type EdgeNeighborIterator: Iterator<Item = Graph::NodeIndex>
type EdgeNeighborIterator: Iterator<Item = Graph::NodeIndex>
The iterator type used to iterate over the neighbors of an edge.
Required methods
fn neighbor_iterator(graph: &'a Graph, node: Graph::NodeIndex) -> Self::Iterator
fn neighbor_iterator(graph: &'a Graph, node: Graph::NodeIndex) -> Self::Iterator
Returns an iterator over the neighbors of a given node.
fn edge_neighbor_iterator(
graph: &'a Graph,
edge: Graph::EdgeIndex
) -> Self::EdgeNeighborIterator
fn edge_neighbor_iterator(
graph: &'a Graph,
edge: Graph::EdgeIndex
) -> Self::EdgeNeighborIterator
Returns an iterator over the neighbors of an edge.