Package org.apache.calcite.util.graph
Class DepthFirstIterator<V,E extends DefaultEdge> 
java.lang.Object
org.apache.calcite.util.graph.DepthFirstIterator<V,E> 
- Type Parameters:
 V- Vertex typeE- Edge type
- All Implemented Interfaces:
 Iterator<V>
Iterates over the vertices in a directed graph in depth-first order.
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionbooleanhasNext()next()static <V,E extends DefaultEdge> 
Iterable<V>of(DirectedGraph<V, E> graph, V start) Creates an iterable over the vertices in the given graph in a depth-first iteration order.static <V,E extends DefaultEdge> 
voidreachable(Collection<V> list, DirectedGraph<V, E> graph, V start) Populates a collection with the nodes reachable from a given node.voidremove()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining 
- 
Constructor Details
- 
DepthFirstIterator
 
 - 
 - 
Method Details
- 
of
Creates an iterable over the vertices in the given graph in a depth-first iteration order. - 
reachable
public static <V,E extends DefaultEdge> void reachable(Collection<V> list, DirectedGraph<V, E> graph, V start) Populates a collection with the nodes reachable from a given node. - 
hasNext
public boolean hasNext() - 
next
 - 
remove
public void remove() 
 -