net.sourceforge.combean.samples.simplegraphs
Class Clique

Package class diagram package Clique
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.Clique
All Implemented Interfaces:
Graph, GlobalIndexedNodesGraphProp, GlobalNodesGraphProp, GlobalNumberedNodesGraphProp, NeighborhoodGraphProp, OutgoingEdgeNeighborhoodGraphProp

public class Clique
extends SimpleNumberGraph

This class represents a clique graph.


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
Clique(int size)
          Construct a clique of the given 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

Clique

public Clique(int size)
Construct a clique of the given 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.calcNextNode(int, int)