net.sourceforge.combean.interfaces.graph.alg.traverse
Interface GraphTraversalAlg

Package class diagram package GraphTraversalAlg
All Superinterfaces:
GraphAlgorithm
All Known Subinterfaces:
BreadthFirstSearch, DepthFirstSearch
All Known Implementing Classes:
AbstractGraphTraversalAlg, BreadthFirstSearchImpl, RecursiveDFSImpl

public interface GraphTraversalAlg
extends GraphAlgorithm

Base class for all algorithms which traverse a graph in a certain order. Traversal algorithms collaborate with a TraversalVisitor. This object is called during the traveral and may be used to collect information or perform actions on the nodes and edges of the graph.


Method Summary
 TraversalVisitor getVisitor()
           
 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 setVisitor(TraversalVisitor visitor)
          Set the visitor object which will be called during the traversal.
 
Methods inherited from interface net.sourceforge.combean.interfaces.graph.alg.GraphAlgorithm
getGraph, run, setGraph
 

Method Detail

setVisitor

void setVisitor(TraversalVisitor visitor)
Set the visitor object which will be called during the traversal.

Parameters:
visitor -

getVisitor

TraversalVisitor getVisitor()
Returns:
the visitor

setLocalStartNode

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. If the start node is set to null (the default), all components of the graph will be explored.

Parameters:
startNode -

setUseOnlyOutgoingEdges

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. By default this flag will be set to false and all incident edges will be visited for a given node.

Parameters:
useOnlyOutgoingEdges -