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

Package class diagram package FindPathByTraversalAlg
java.lang.Object
  extended by net.sourceforge.combean.graph.alg.AbstractGraphAlg
      extended by net.sourceforge.combean.graph.alg.traversal.FindPathByTraversalAlg
All Implemented Interfaces:
GraphAlgorithm

public class FindPathByTraversalAlg
extends AbstractGraphAlg


Constructor Summary
FindPathByTraversalAlg()
          constructor
 
Method Summary
 FixedPath getPathTo(Node t)
          Return the path to t that has been found by the traversal algorithm or null if the node is not reachable from the start node.
 void run()
          Execute the algorithm.
 void setStartNode(Node startNode)
           
 void setTargetNode(Node targetNode)
           
 void setTraversalAlg(GraphTraversalAlg traversalAlg)
           
 void setUseOutgoingEdgesOnly(boolean useOutgoingEdgesOnly)
           
 
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
 

Constructor Detail

FindPathByTraversalAlg

public FindPathByTraversalAlg()
constructor

Method Detail

run

public void run()
Description copied from interface: GraphAlgorithm
Execute the algorithm.


setTraversalAlg

public final void setTraversalAlg(GraphTraversalAlg traversalAlg)
Parameters:
traversalAlg - The traversalAlg to set.

setStartNode

public final void setStartNode(Node startNode)
Parameters:
startNode - The startNode to set.

setTargetNode

public final void setTargetNode(Node targetNode)
Parameters:
targetNode - The targetNode to set.

getPathTo

public FixedPath getPathTo(Node t)
Return the path to t that has been found by the traversal algorithm or null if the node is not reachable from the start node.

Parameters:
t - the node to which the path shall be retrieved
Returns:
the path to t

setUseOutgoingEdgesOnly

public final void setUseOutgoingEdgesOnly(boolean useOutgoingEdgesOnly)
Parameters:
useOutgoingEdgesOnly - The useOutgoingEdgesOnly to set.