org.apache.commons.graph.algorithm.search
Class DFS

java.lang.Object
  extended byorg.apache.commons.graph.algorithm.search.DFS

public class DFS
extends java.lang.Object

Description of the Class


Field Summary
static java.lang.String BLACK
          Description of the Field
private  java.util.Map colors
           
static java.lang.String GRAY
          Description of the Field
static java.lang.String WHITE
          Description of the Field
 
Constructor Summary
DFS()
          Constructor for the DFS object
 
Method Summary
 java.lang.String getColor(Vertex v)
          Gets the color attribute of the DFS object
 void visit(DirectedGraph graph, Vertex root, Visitor visitor)
          visit - Visits the graph
 void visit(DirectedGraph graph, Visitor visitor)
          visit - Visits all nodes in the graph.
private  void visitEdge(DirectedGraph graph, Edge e, Visitor visitor)
          Description of the Method
private  void visitVertex(DirectedGraph graph, Vertex v, Visitor visitor)
          Description of the Method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

colors

private java.util.Map colors

WHITE

public static final java.lang.String WHITE
Description of the Field

See Also:
Constant Field Values

BLACK

public static final java.lang.String BLACK
Description of the Field

See Also:
Constant Field Values

GRAY

public static final java.lang.String GRAY
Description of the Field

See Also:
Constant Field Values
Constructor Detail

DFS

public DFS()
Constructor for the DFS object

Method Detail

getColor

public java.lang.String getColor(Vertex v)
Gets the color attribute of the DFS object


visitEdge

private void visitEdge(DirectedGraph graph,
                       Edge e,
                       Visitor visitor)
Description of the Method


visitVertex

private void visitVertex(DirectedGraph graph,
                         Vertex v,
                         Visitor visitor)
Description of the Method


visit

public void visit(DirectedGraph graph,
                  Vertex root,
                  Visitor visitor)
visit - Visits the graph


visit

public void visit(DirectedGraph graph,
                  Visitor visitor)
visit - Visits all nodes in the graph.