net.sourceforge.combean.graph.alg.traversal
Class RecursiveDFSImpl
java.lang.Object
net.sourceforge.combean.graph.alg.AbstractGraphAlg
net.sourceforge.combean.graph.alg.traversal.AbstractGraphTraversalAlg
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RecursiveDFSImpl
public RecursiveDFSImpl()
- constructor
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.