public class CirculantGraph extends AbstractIntegerNodeGraph
Graph. If the nodes are arranged in a
circle, then each node is adjacent to a fixed number of nodes in
either direction.AbstractIntegerNodeGraph.AbstractIntegerEdgeCollection, AbstractIntegerNodeGraph.EdgeImplGraph.Edge| Constructor and Description |
|---|
CirculantGraph(int n,
int d)
Creates a new
CirculantGraph. |
| Modifier and Type | Method and Description |
|---|---|
protected Graph.Edge |
createEdge(int tailIndex,
int headIndex)
If an edge exists between the specified indices, create and
return it.
|
protected Collection |
createEdgeCollection()
Creates the (single) collection of edges for this instance.
|
protected Traverser |
createTraverser(int nodeIndex)
Creates a traverser with no filtering; assumes that the node
index is valid.
|
int |
degree(Object node)
Returns the degree of
node, defined as the number
of edges incident on node. |
String |
toString() |
checkNode, containsEdge, containsNode, edges, getNodeIndex, getNodeSize, nodes, removeEdge, removeNode, traverseraddEdge, addNode, adjacentNodes, degree, edges, getAdjacentNode, getEdge, getIncidentEdge, getNode, incidentEdges, nodes, traverserpublic CirculantGraph(int n,
int d)
CirculantGraph.n - the number of nodes in the new
CirculantGraph.d - each node is adjacent to this many of the nearest
nodes in either direction.public int degree(Object node)
node, defined as the number
of edges incident on node.degree in interface Graphdegree in class AbstractGraphnode - return the degree of this node.node.protected Graph.Edge createEdge(int tailIndex, int headIndex)
AbstractIntegerNodeGraphnull. The indices are
assumed to represent valid nodes for this Graph.createEdge in class AbstractIntegerNodeGraphprotected Collection createEdgeCollection()
AbstractIntegerNodeGraphcreateEdgeCollection in class AbstractIntegerNodeGraphprotected Traverser createTraverser(int nodeIndex)
AbstractIntegerNodeGraphcreateTraverser in class AbstractIntegerNodeGraphSee the Plexus project home, hosted by SourceForge.
Copyright ? 1994-2006, by Phoenix Software Technologists, Inc. and others. All Rights Reserved. Use is subject to license terms.