V - Vertex typeE - Edge typepublic class BreadthFirstIterator<V,E extends DefaultEdge> extends Object implements Iterator<V>
| Constructor and Description |
|---|
BreadthFirstIterator(DirectedGraph<V,E> graph,
V root) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext() |
V |
next() |
static <V,E extends DefaultEdge> |
of(DirectedGraph<V,E> graph,
V root) |
static <V,E extends DefaultEdge> |
reachable(Set<V> set,
DirectedGraph<V,E> graph,
V root)
Populates a set with the nodes reachable from a given node.
|
void |
remove() |
public BreadthFirstIterator(DirectedGraph<V,E> graph, V root)
public static <V,E extends DefaultEdge> Iterable<V> of(DirectedGraph<V,E> graph, V root)
public static <V,E extends DefaultEdge> void reachable(Set<V> set, DirectedGraph<V,E> graph, V root)
Copyright © 2012–2015 The Apache Software Foundation. All rights reserved.