|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ibm.wala.util.graph.traverse.DFSVisit
public class DFSVisit
Depth first search of a graph using a stack instead of recursive method calls. It allows each vertice of the graph to be visited when its is first discovered and when it is "finished" (i.e. completely processed).
| Nested Class Summary | |
|---|---|
static class |
DFSVisit.DefaultSimpleMap<K,V>
Default implementation of DFSVisit.SimpleMapbased on a HashMap |
static class |
DFSVisit.NumberedSimpleMap<K,V>
A DFSVisit.SimpleMapthat maps
INodeWithNumberto their traversal state. |
static interface |
DFSVisit.SimpleMap<K,V>
A simple map interface. |
static class |
DFSVisit.Visitor
A visitor that visits Nodes in the DFS2 of a graph |
| Field Summary | |
|---|---|
static java.util.Iterator |
EMPTY_ITERATOR
the empty iterator constant |
| Constructor Summary | |
|---|---|
DFSVisit()
|
|
| Method Summary | ||
|---|---|---|
static
|
DFS(Graph<T> g,
DFSVisit.Visitor visitor)
Depth first search of a graph using a stack instead of recursive method calls. |
|
static
|
DFS(Graph<T> g,
java.util.Iterator<? extends T> nodes,
DFSVisit.Visitor visitor)
Depth first search of a graph using a stack instead of recursive method calls. |
|
static
|
DFS(Graph<T> g,
java.util.Iterator<? extends T> nodes,
DFSVisit.Visitor visitor,
DFSVisit.SimpleMap<T,java.util.Iterator<? extends T>> states)
Depth first search of a graph using a stack instead of recursive method calls. |
|
protected static
|
getConnectedTo(Graph<T> g,
T node)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.util.Iterator EMPTY_ITERATOR
| Constructor Detail |
|---|
public DFSVisit()
| Method Detail |
|---|
protected static <T> java.util.Iterator<? extends T> getConnectedTo(Graph<T> g,
T node)
public static <T> void DFS(Graph<T> g,
java.util.Iterator<? extends T> nodes,
DFSVisit.Visitor visitor,
DFSVisit.SimpleMap<T,java.util.Iterator<? extends T>> states)
g - the graph to traversenodes - an iterator over the nodes where the traversal should startvisitor - the visitor to notify when nodes are discovered and finishedstates - the map to use to store and retrieve the state of nodes
public static <T> void DFS(Graph<T> g,
java.util.Iterator<? extends T> nodes,
DFSVisit.Visitor visitor)
g - the graph to traversenodes - an iterator over the nodes where the traversal should startvisitor - the visitor to notify when nodes are discovered and finished
public static <T> void DFS(Graph<T> g,
DFSVisit.Visitor visitor)
g - the graph to traversevisitor - the visitor to notify when nodes are discovered and finished
java.lang.IllegalArgumentException - if g is null
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||