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