Trait rs_graph::traits::GraphIterator [−][src]
pub trait GraphIterator<G: ?Sized>: Clone { type Item; fn next(&mut self, g: &G) -> Option<Self::Item>; fn size_hint(&self, _g: &G) -> (usize, Option<usize>) { ... } fn count(self, g: &G) -> usize { ... } fn iter<'a>(self, g: &'a G) -> GraphIter<'a, G, Self>ⓘ
where
G: Sized, { ... } }
A graph iterator.
This is roughly the same interface as a standard iterator. However, all its method take additionally the graph itself as parameter. This allows the iterator to not contain a reference to internal graph data.
This might be useful for algorithms that need to store several iterators because they require less memory (they do not need to store a reference to the same graph, each!).
Associated Types
Loading content...Required methods
Loading content...Provided methods
fn size_hint(&self, _g: &G) -> (usize, Option<usize>)
[src]
fn count(self, g: &G) -> usize
[src]
fn iter<'a>(self, g: &'a G) -> GraphIter<'a, G, Self>ⓘ where
G: Sized,
[src]
G: Sized,
Implementors
impl<'a, A, I> GraphIterator<&'a A> for AdjacenciesWrapIt<I> where
I: GraphIterator<A>,
[src]
impl<'a, A, I> GraphIterator<&'a A> for AdjacenciesWrapIt<I> where
I: GraphIterator<A>,
[src]impl<'a, G, I> GraphIterator<&'a G> for WrapIt<I> where
I: GraphIterator<G>,
[src]
impl<'a, G, I> GraphIterator<&'a G> for WrapIt<I> where
I: GraphIterator<G>,
[src]impl<'a, G, I> GraphIterator<Network<'a, G>> for NetworkEdgeIt<G, I> where
I: GraphIterator<G>,
I::Item: Clone,
[src]
impl<'a, G, I> GraphIterator<Network<'a, G>> for NetworkEdgeIt<G, I> where
I: GraphIterator<G>,
I::Item: Clone,
[src]impl<'a, G, I> GraphIterator<Network<'a, G>> for NetworkNodeIt<I> where
I: GraphIterator<G>,
[src]
impl<'a, G, I> GraphIterator<Network<'a, G>> for NetworkNodeIt<I> where
I: GraphIterator<G>,
[src]impl<'a, G, I, N, D> GraphIterator<Network<'a, G>> for NetworkInIt<I> where
I: GraphIterator<G, Item = (D, N)>,
D: DirectedEdge,
[src]
impl<'a, G, I, N, D> GraphIterator<Network<'a, G>> for NetworkInIt<I> where
I: GraphIterator<G, Item = (D, N)>,
D: DirectedEdge,
[src]impl<'a, G, I, N, D> GraphIterator<Network<'a, G>> for NetworkIncidentIt<I, I::Item> where
I: GraphIterator<G, Item = (D, N)>,
N: Clone,
D: DirectedEdge + Clone,
[src]
impl<'a, G, I, N, D> GraphIterator<Network<'a, G>> for NetworkIncidentIt<I, I::Item> where
I: GraphIterator<G, Item = (D, N)>,
N: Clone,
D: DirectedEdge + Clone,
[src]impl<'a, G, I, N, D> GraphIterator<Network<'a, G>> for NetworkOutIt<I> where
I: GraphIterator<G, Item = (D, N)>,
D: DirectedEdge,
[src]
impl<'a, G, I, N, D> GraphIterator<Network<'a, G>> for NetworkOutIt<I> where
I: GraphIterator<G, Item = (D, N)>,
D: DirectedEdge,
[src]impl<'a, G, I, N, E> GraphIterator<Network<'a, G>> for NetworkNeighIt<G, I> where
N: Clone,
E: Clone,
I: GraphIterator<G, Item = (E, N)>,
[src]
impl<'a, G, I, N, E> GraphIterator<Network<'a, G>> for NetworkNeighIt<G, I> where
N: Clone,
E: Clone,
I: GraphIterator<G, Item = (E, N)>,
[src]impl<'a, G, P> GraphIterator<FilteredGraph<'a, G, P>> for FilterEdgeIt<G::EdgeIt> where
G: GraphSize<'a>,
P: for<'r> Fn(&'r G::Edge) -> bool,
[src]
impl<'a, G, P> GraphIterator<FilteredGraph<'a, G, P>> for FilterEdgeIt<G::EdgeIt> where
G: GraphSize<'a>,
P: for<'r> Fn(&'r G::Edge) -> bool,
[src]impl<'a, G, P, I> GraphIterator<FilteredGraph<'a, G, P>> for FilterWrapIt<I> where
G: GraphType<'a>,
P: for<'r> Fn(&'r G::Edge) -> bool,
I: GraphIterator<G>,
[src]
impl<'a, G, P, I> GraphIterator<FilteredGraph<'a, G, P>> for FilterWrapIt<I> where
G: GraphType<'a>,
P: for<'r> Fn(&'r G::Edge) -> bool,
I: GraphIterator<G>,
[src]impl<'a, G, P, I> GraphIterator<FilteredGraph<'a, G, P>> for rs_graph::filtered::Filtered<I> where
G: GraphType<'a>,
P: for<'r> Fn(&'r G::Edge) -> bool,
I: GraphIterator<G, Item = (G::Edge, G::Node)>,
[src]
impl<'a, G, P, I> GraphIterator<FilteredGraph<'a, G, P>> for rs_graph::filtered::Filtered<I> where
G: GraphType<'a>,
P: for<'r> Fn(&'r G::Edge) -> bool,
I: GraphIterator<G, Item = (G::Edge, G::Node)>,
[src]impl<'a, G, P, I> GraphIterator<FilteredGraph<'a, G, P>> for FilteredIncidentIt<I> where
G: Directed<'a>,
P: for<'r> Fn(&'r G::Edge) -> bool,
I: GraphIterator<G, Item = (G::DirectedEdge, G::Node)>,
[src]
impl<'a, G, P, I> GraphIterator<FilteredGraph<'a, G, P>> for FilteredIncidentIt<I> where
G: Directed<'a>,
P: for<'r> Fn(&'r G::Edge) -> bool,
I: GraphIterator<G, Item = (G::DirectedEdge, G::Node)>,
[src]impl<'a, ID> GraphIterator<VecGraph<ID>> for rs_graph::vecgraph::EdgeIt<ID> where
ID: 'a + PrimInt + Unsigned,
[src]
impl<'a, ID> GraphIterator<VecGraph<ID>> for rs_graph::vecgraph::EdgeIt<ID> where
ID: 'a + PrimInt + Unsigned,
[src]impl<'a, ID> GraphIterator<VecGraph<ID>> for rs_graph::vecgraph::NeighIt<'a, ID> where
ID: 'a + PrimInt + Unsigned,
[src]
impl<'a, ID> GraphIterator<VecGraph<ID>> for rs_graph::vecgraph::NeighIt<'a, ID> where
ID: 'a + PrimInt + Unsigned,
[src]impl<'a, ID> GraphIterator<VecGraph<ID>> for rs_graph::vecgraph::NodeIt<ID> where
ID: 'a + PrimInt + Unsigned,
[src]
impl<'a, ID> GraphIterator<VecGraph<ID>> for rs_graph::vecgraph::NodeIt<ID> where
ID: 'a + PrimInt + Unsigned,
[src]impl<'a, ID, N, E> GraphIterator<LinkedListGraph<ID, N, E>> for rs_graph::linkedlistgraph::NeighIt<ID> where
ID: 'a + PrimInt + Unsigned,
[src]
impl<'a, ID, N, E> GraphIterator<LinkedListGraph<ID, N, E>> for rs_graph::linkedlistgraph::NeighIt<ID> where
ID: 'a + PrimInt + Unsigned,
[src]impl<'a, ID, N, E> GraphIterator<LinkedListGraph<ID, N, E>> for OutIt<ID> where
ID: 'a + PrimInt + Unsigned,
[src]
impl<'a, ID, N, E> GraphIterator<LinkedListGraph<ID, N, E>> for OutIt<ID> where
ID: 'a + PrimInt + Unsigned,
[src]impl<'a, ID, N: 'a, E: 'a> GraphIterator<LinkedListGraph<ID, N, E>> for rs_graph::linkedlistgraph::EdgeIt<ID> where
ID: 'a + PrimInt + Unsigned,
[src]
impl<'a, ID, N: 'a, E: 'a> GraphIterator<LinkedListGraph<ID, N, E>> for rs_graph::linkedlistgraph::EdgeIt<ID> where
ID: 'a + PrimInt + Unsigned,
[src]impl<'a, ID, N: 'a, E: 'a> GraphIterator<LinkedListGraph<ID, N, E>> for rs_graph::linkedlistgraph::NodeIt<ID> where
ID: 'a + PrimInt + Unsigned,
[src]
impl<'a, ID, N: 'a, E: 'a> GraphIterator<LinkedListGraph<ID, N, E>> for rs_graph::linkedlistgraph::NodeIt<ID> where
ID: 'a + PrimInt + Unsigned,
[src]impl<'g, G, I> GraphIterator<InEdges<'g, G>> for AdjacenciesWrapIt<I> where
I: GraphIterator<G>,
[src]
impl<'g, G, I> GraphIterator<InEdges<'g, G>> for AdjacenciesWrapIt<I> where
I: GraphIterator<G>,
[src]impl<'g, G, I> GraphIterator<Neighbors<'g, G>> for AdjacenciesWrapIt<I> where
I: GraphIterator<G>,
[src]
impl<'g, G, I> GraphIterator<Neighbors<'g, G>> for AdjacenciesWrapIt<I> where
I: GraphIterator<G>,
[src]impl<'g, G, I> GraphIterator<OutEdges<'g, G>> for AdjacenciesWrapIt<I> where
I: GraphIterator<G>,
[src]
impl<'g, G, I> GraphIterator<OutEdges<'g, G>> for AdjacenciesWrapIt<I> where
I: GraphIterator<G>,
[src]impl<'g, G, I> GraphIterator<EdgeIndexer<'g, G>> for IndexerIt<I> where
I: GraphIterator<G>,
[src]
impl<'g, G, I> GraphIterator<EdgeIndexer<'g, G>> for IndexerIt<I> where
I: GraphIterator<G>,
[src]impl<'g, G, I> GraphIterator<NodeIndexer<'g, G>> for IndexerIt<I> where
I: GraphIterator<G>,
[src]
impl<'g, G, I> GraphIterator<NodeIndexer<'g, G>> for IndexerIt<I> where
I: GraphIterator<G>,
[src]impl<A, P, I> GraphIterator<FilterAdjacencies<A, P>> for rs_graph::adjacencies::Filtered<I> where
I: GraphIterator<A>,
P: for<'r> Fn(&'r I::Item) -> bool,
[src]
impl<A, P, I> GraphIterator<FilterAdjacencies<A, P>> for rs_graph::adjacencies::Filtered<I> where
I: GraphIterator<A>,
P: for<'r> Fn(&'r I::Item) -> bool,
[src]impl<G, Gx, Nx, Ex, I> GraphIterator<Attributed<G, Gx, Nx, Ex>> for AttributedWrapIt<I> where
I: GraphIterator<G>,
[src]
impl<G, Gx, Nx, Ex, I> GraphIterator<Attributed<G, Gx, Nx, Ex>> for AttributedWrapIt<I> where
I: GraphIterator<G>,
[src]