de.aitools.iv.graphdrawing.datastructures.graph.algorithms
Class DepthFirstSearch
java.lang.Object
de.aitools.iv.graphdrawing.datastructures.graph.algorithms.DepthFirstSearch
public class DepthFirstSearch
- extends java.lang.Object
- Author:
- [email protected]
See Cormen, chapter 23.3
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
nil
public static final int nil
- See Also:
- Constant Field Values
white
public static final int white
- See Also:
- Constant Field Values
grey
public static final int grey
- See Also:
- Constant Field Values
black
public static final int black
- See Also:
- Constant Field Values
DepthFirstSearch
public DepthFirstSearch(Graph g)
- Creates a new instance of DepthFirstSearch
DepthFirstSearch
public DepthFirstSearch(Graph g,
Vertex root,
TreeVertexVisitor visitor)
getRoots
public java.util.Vector getRoots()
getTopologicalSort
public java.util.LinkedList getTopologicalSort()
getDepth
public int[] getDepth()
getConnectedComponents
public int[] getConnectedComponents()
isTree
public boolean isTree()
init
public void init(int vertexCount)