net.datastructures
Class DFS<V,E,I,R>
java.lang.Object
net.datastructures.DFS<V,E,I,R>
- Direct Known Subclasses:
- ComponentsDFS, ConnectivityDFS, FindCycleDFS, FindPathDFS
public class DFS<V,E,I,R>
- extends java.lang.Object
Generic DFS traversal of a graph using the template method pattern.
Parameterized types: V, the type for the elements stored at vertices E, the
type for the elements stored at edges I, the type for the information object
passed to the execute method R, the type for the result object returned by
the DFS
Constructor Summary |
DFS()
|
Method Summary |
R |
execute(Graph<V,E> g,
Vertex<V> s,
I in)
Execute a depth first search traversal on graph g, starting from a start
vertex s, passing in an information object (in) |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DFS
public DFS()
execute
public R execute(Graph<V,E> g,
Vertex<V> s,
I in)
- Execute a depth first search traversal on graph g, starting from a start
vertex s, passing in an information object (in)