net.aronnax.CountPaths
Class CountPaths

java.lang.Object
  extended by net.aronnax.CountPaths.CountPaths

public class CountPaths
extends java.lang.Object

Class CountPaths systematically searches for all paths connecting a pair of vertices for some given length.

Version:
$Id: CountPaths.java 26 2010-12-26 04:26:04Z rassilon $
See Also:
Path, Vertex

Constructor Summary
CountPaths(int reqPathLength, Vertex startVertex, Vertex endVertex)
          This constructor sets up the most important options of the CountPaths run.
 
Method Summary
 void returnGoodPaths(java.io.PrintStream outStream)
          The returnGoodPaths toggles on the reporting of good Path Vertex lists (in order, of course).
 long run()
          The run method does the actual path search using the parameters previously specified.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CountPaths

public CountPaths(int reqPathLength,
                  Vertex startVertex,
                  Vertex endVertex)
This constructor sets up the most important options of the CountPaths run.

Parameters:
reqPathLength - The length of the path we are searching for.
startVertex - The Vertex to start our path search from.
endVertex - The Vertex that ends our search.
Method Detail

run

public long run()
The run method does the actual path search using the parameters previously specified.

Returns:
The number of paths found matching the setup criteria.

returnGoodPaths

public void returnGoodPaths(java.io.PrintStream outStream)
The returnGoodPaths toggles on the reporting of good Path Vertex lists (in order, of course).

Parameters:
outStream - The PrintStream to send good paths to.