com.phoenixst.plexus.examples

Class CirculantGraph

public class CirculantGraph extends AbstractIntegerNodeGraph

A circulant Graph. If the nodes are arranged in a circle, then each node is adjacent to a fixed number of nodes in either direction.

Since: 1.0

Version: $Revision: 1.13 $

Author: Ray A. Conner

Constructor Summary
CirculantGraph(int n, int d)
Creates a new CirculantGraph.
Method Summary
protected Graph.EdgecreateEdge(int tailIndex, int headIndex)
protected CollectioncreateEdgeCollection()
protected TraversercreateTraverser(int nodeIndex)
intdegree(Object node)
Returns the degree of node, defined as the number of edges incident on node.
StringtoString()

Constructor Detail

CirculantGraph

public CirculantGraph(int n, int d)
Creates a new CirculantGraph.

Parameters: n the number of nodes in the new CirculantGraph. d each node is adjacent to this many of the nearest nodes in either direction.

Method Detail

createEdge

protected Graph.Edge createEdge(int tailIndex, int headIndex)

createEdgeCollection

protected Collection createEdgeCollection()

createTraverser

protected Traverser createTraverser(int nodeIndex)

degree

public int degree(Object node)
Returns the degree of node, defined as the number of edges incident on node.

toString

public String toString()
See the Plexus project home, hosted by SourceForge.
Copyright B) 1994-2006, by Phoenix Software Technologists, Inc. and others. All Rights Reserved. Use is subject to license terms.