net.sourceforge.combean.samples.simplegraphs
Class DirectedPath

Package class diagram package DirectedPath
java.lang.Object
  extended by net.sourceforge.combean.samples.simplegraphs.NumberGraph
      extended by net.sourceforge.combean.samples.simplegraphs.SimpleNumberGraph
          extended by net.sourceforge.combean.samples.simplegraphs.DirectedPath
All Implemented Interfaces:
Graph, GlobalIndexedNodesGraphProp, GlobalNodesGraphProp, GlobalNumberedNodesGraphProp, NeighborhoodGraphProp, OutgoingEdgeNeighborhoodGraphProp

public class DirectedPath
extends SimpleNumberGraph


Field Summary
 
Fields inherited from class net.sourceforge.combean.samples.simplegraphs.NumberGraph
FIRSTNODE, NOSUCHNODE
 
Fields inherited from interface net.sourceforge.combean.interfaces.graph.prop.GlobalIndexedNodesGraphProp
UNDEFINED_NODE
 
Constructor Summary
DirectedPath(int size)
           
 
Method Summary
protected  int calcNextNode(int sourceNodeNum, int minNodeNum)
          Template method for calculating neighbors.
 
Methods inherited from class net.sourceforge.combean.samples.simplegraphs.SimpleNumberGraph
getNumNodes
 
Methods inherited from class net.sourceforge.combean.samples.simplegraphs.NumberGraph
contains, convertNumToNode, empty, getAllNodesIterator, getEdgeClass, getFirstNode, getIncidentEdges, getNode, getNodeClass, getNodeNumber, getOtherNode, getOutgoingEdges, getSecondNode, nextNode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectedPath

public DirectedPath(int size)
Parameters:
size -
Method Detail

calcNextNode

protected int calcNextNode(int sourceNodeNum,
                           int minNodeNum)
Description copied from class: NumberGraph
Template method for calculating neighbors. Calculates the smallest number >= minNodeNum of a node in the neighborhood of the node with the number sourceNumNode or NOSUCHNODE if no next node exists. It is guaranteed that the graph in non-empty and that the node number startNodeNum is contained in the graph. Note that minNodeNum may also be negative.

Specified by:
calcNextNode in class NumberGraph
Returns:
the next node in the neighborhood of the given node
See Also:
NumberGraph.nextNode(NumberNode, NumberNode)