net.sourceforge.combean.graph.alg.traversal
Class RecursiveDFSImpl

Package class diagram package RecursiveDFSImpl
java.lang.Object
  extended by net.sourceforge.combean.graph.alg.AbstractGraphAlg
      extended by net.sourceforge.combean.graph.alg.traversal.AbstractGraphTraversalAlg
          extended by net.sourceforge.combean.graph.alg.traversal.RecursiveDFSImpl
All Implemented Interfaces:
GraphAlgorithm, DepthFirstSearch, GraphTraversalAlg

public class RecursiveDFSImpl
extends AbstractGraphTraversalAlg
implements DepthFirstSearch

A recursive implementation of the Depth First Search algorithm.


Constructor Summary
RecursiveDFSImpl()
          constructor
 
Method Summary
 DFSVisitor getDFSVisitor()
           
protected  void runTraversalWithSingleStartNode(Node v)
          Explore the component of v with a recursive DFS.
 void setDFSVisitor(DFSVisitor visitor)
           
 void setVisitor(TraversalVisitor visitor)
          Set the visitor object which will be called during the traversal.
 
Methods inherited from class net.sourceforge.combean.graph.alg.traversal.AbstractGraphTraversalAlg
getNeighborhood, getNeighborIterator, getVisitedNodes, getVisitor, init, run, setLocalStartNode, setUseOnlyOutgoingEdges, setVisitedNodes
 
Methods inherited from class net.sourceforge.combean.graph.alg.AbstractGraphAlg
getGraph, setGraph
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sourceforge.combean.interfaces.graph.alg.traverse.GraphTraversalAlg
getVisitor, setLocalStartNode, setUseOnlyOutgoingEdges
 
Methods inherited from interface net.sourceforge.combean.interfaces.graph.alg.GraphAlgorithm
getGraph, run, setGraph
 

Constructor Detail

RecursiveDFSImpl

public RecursiveDFSImpl()
constructor

Method Detail

getDFSVisitor

public DFSVisitor getDFSVisitor()
Specified by:
getDFSVisitor in interface DepthFirstSearch
See Also:
DepthFirstSearch.getDFSVisitor()

setDFSVisitor

public void setDFSVisitor(DFSVisitor visitor)
Specified by:
setDFSVisitor in interface DepthFirstSearch
See Also:
DepthFirstSearch.setDFSVisitor(net.sourceforge.combean.interfaces.graph.alg.traverse.DFSVisitor)

setVisitor

public void setVisitor(TraversalVisitor visitor)
Description copied from interface: GraphTraversalAlg
Set the visitor object which will be called during the traversal.

Specified by:
setVisitor in interface GraphTraversalAlg
Overrides:
setVisitor in class AbstractGraphTraversalAlg
See Also:
GraphTraversalAlg.setVisitor(net.sourceforge.combean.interfaces.graph.alg.traverse.TraversalVisitor)

runTraversalWithSingleStartNode

protected void runTraversalWithSingleStartNode(Node v)
Explore the component of v with a recursive DFS.

Specified by:
runTraversalWithSingleStartNode in class AbstractGraphTraversalAlg
Parameters:
v - current node of the recursive DFS.