|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||

java.lang.Objectnet.sourceforge.combean.graph.alg.AbstractGraphAlg
net.sourceforge.combean.graph.alg.traversal.AbstractGraphTraversalAlg
public abstract class AbstractGraphTraversalAlg
Abstract base class for DFS- and BFS-traversal. Holds common datastructures.
| Constructor Summary | |
|---|---|
AbstractGraphTraversalAlg()
constructor |
|
| Method Summary | |
|---|---|
protected NeighborhoodGraphProp |
getNeighborhood()
|
protected EdgeIterator |
getNeighborIterator(Node v)
|
protected NodeSet |
getVisitedNodes()
|
TraversalVisitor |
getVisitor()
|
protected void |
init()
Helper method for setting up the internal data structures. |
void |
run()
Execute the algorithm. |
protected abstract void |
runTraversalWithSingleStartNode(Node v)
Template method. |
void |
setLocalStartNode(Node startNode)
If a start node is set, the traversal will start from there and only thos nodes which are reachable from the start node will be explored. |
void |
setUseOnlyOutgoingEdges(boolean useOnlyOutgoingEdges)
If this flag is set to true, the underlying graph must have the OutgoingEdgeNeighborhood-property and only outgoing edges will be considered when the neigbors of a node are visited. |
void |
setVisitedNodes(NodeSet visitedNodes)
Set the NodeSet where the nodes are stored which have already been visited during the traversal of the graph. |
void |
setVisitor(TraversalVisitor visitor)
Set the visitor object which will be called during the traversal. |
| 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.GraphAlgorithm |
|---|
getGraph, setGraph |
| Constructor Detail |
|---|
public AbstractGraphTraversalAlg()
| Method Detail |
|---|
public void setVisitor(TraversalVisitor visitor)
GraphTraversalAlg
setVisitor in interface GraphTraversalAlgGraphTraversalAlg.setVisitor(net.sourceforge.combean.interfaces.graph.alg.traverse.TraversalVisitor)public final TraversalVisitor getVisitor()
getVisitor in interface GraphTraversalAlgGraphTraversalAlg.getVisitor()public final void setLocalStartNode(Node startNode)
GraphTraversalAlg
setLocalStartNode in interface GraphTraversalAlgGraphTraversalAlg.setLocalStartNode(net.sourceforge.combean.interfaces.graph.Node)public final void setVisitedNodes(NodeSet visitedNodes)
visitedNodes - The visitedNodes to set.protected final NodeSet getVisitedNodes()
public void setUseOnlyOutgoingEdges(boolean useOnlyOutgoingEdges)
GraphTraversalAlg
setUseOnlyOutgoingEdges in interface GraphTraversalAlgprotected final NeighborhoodGraphProp getNeighborhood()
protected void init()
protected abstract void runTraversalWithSingleStartNode(Node v)
v - the node where the traversal shall startprotected final EdgeIterator getNeighborIterator(Node v)
public void run()
GraphAlgorithm
run in interface GraphAlgorithmGraphAlgorithm.run()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||