|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.combean.graph.alg.traversal.IdleTraversalVisitor net.sourceforge.combean.graph.alg.traversal.IdleDFSVisitor net.sourceforge.combean.graph.alg.traversal.DFSNodeNumberingVisitor net.sourceforge.combean.graph.alg.traversal.DFSNodeStackVisitor
public class DFSNodeStackVisitor
Maintains a stack of currently opened nodes during the DFS. (i.e. the stack of nodes that one would have during a classic recursive implementation of the DFS).
Constructor Summary | |
---|---|
DFSNodeStackVisitor()
constructor. |
Method Summary | |
---|---|
NodeStack |
getStack()
|
void |
init(Graph g)
This method is called immediately before the traversal algorithm starts if all components of g shall be traversed. |
void |
initLocal(Graph g,
Node startNode)
This method is called immediately before the traversal algorithm starts if a component of g shall be traversed from a local start node. |
void |
leaveNode(Node v)
The exploration of all nodes reachable from v ends. |
void |
setStack(NodeStack stack)
Set the stack which shall be used. |
void |
visitNode(Node v)
The traversal algorithms begins to explore the neighborhood of a node. |
Methods inherited from class net.sourceforge.combean.graph.alg.traversal.DFSNodeNumberingVisitor |
---|
getDfsNum, getDfsNumbering, isOnStack, setDfsNumbering |
Methods inherited from class net.sourceforge.combean.graph.alg.traversal.IdleDFSVisitor |
---|
leaveNeighbor |
Methods inherited from class net.sourceforge.combean.graph.alg.traversal.IdleTraversalVisitor |
---|
finish, leaveComponent, openNeighbor, readyToTerminate, reopenNeighbor, visitComponent |
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.TraversalVisitor |
---|
finish, leaveComponent, openNeighbor, readyToTerminate, reopenNeighbor, visitComponent |
Constructor Detail |
---|
public DFSNodeStackVisitor()
Method Detail |
---|
public final NodeStack getStack()
public final void setStack(NodeStack stack)
stack
- The stack to set.public void init(Graph g)
TraversalVisitor
init
in interface TraversalVisitor
init
in class DFSNodeNumberingVisitor
g
- the graph which will be traversed.TraversalVisitor.init(Graph)
public void initLocal(Graph g, Node startNode)
TraversalVisitor
initLocal
in interface TraversalVisitor
initLocal
in class DFSNodeNumberingVisitor
g
- the graph which will be traversed.startNode
- the local start node.TraversalVisitor.initLocal(Graph, net.sourceforge.combean.interfaces.graph.Node)
public void visitNode(Node v)
TraversalVisitor
visitNode
in interface TraversalVisitor
visitNode
in class DFSNodeNumberingVisitor
v
- the node which is being visited.TraversalVisitor.visitNode(net.sourceforge.combean.interfaces.graph.Node)
public void leaveNode(Node v)
DFSVisitor
leaveNode
in interface DFSVisitor
leaveNode
in class DFSNodeNumberingVisitor
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |