Package org.apache.calcite.util.graph
Class BreadthFirstIterator<V,E extends DefaultEdge> 
java.lang.Object
org.apache.calcite.util.graph.BreadthFirstIterator<V,E> 
- Type Parameters:
- V- Vertex type
- E- Edge type
- All Implemented Interfaces:
- Iterator<V>
Iterates over the vertices in a directed graph in breadth-first order.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanhasNext()next()static <V,E extends DefaultEdge> 
 Iterable<V>of(DirectedGraph<V, E> graph, V root) static <V,E extends DefaultEdge> 
 voidreachable(Set<V> set, DirectedGraph<V, E> graph, V root) Populates a set with the nodes reachable from a given node.voidremove()Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.IteratorforEachRemaining
- 
Constructor Details- 
BreadthFirstIterator
 
- 
- 
Method Details- 
of
- 
reachablepublic static <V,E extends DefaultEdge> void reachable(Set<V> set, DirectedGraph<V, E> graph, V root) Populates a set with the nodes reachable from a given node.
- 
hasNextpublic boolean hasNext()
- 
next
- 
removepublic void remove()
 
-