com.phoenixst.plexus.examples
Class PetersenGraph
java.lang.Object
  
com.phoenixst.plexus.AbstractGraph
      
com.phoenixst.plexus.examples.AbstractIntegerNodeGraph
          
com.phoenixst.plexus.examples.PetersenGraph
- All Implemented Interfaces: 
 - Graph, Serializable
 
public class PetersenGraph
- extends AbstractIntegerNodeGraph
 
A Petersen Graph.
- Since:
 
  - 1.0
 
- Version:
 
  - $Revision: 1.19 $
 
- Author:
 
  - Ray A. Conner
 
- See Also:
 - Serialized Form
 
 
 
| Nested classes/interfaces inherited from interface com.phoenixst.plexus.Graph | 
Graph.Edge | 
 
 
 
 
| Methods inherited from class com.phoenixst.plexus.AbstractGraph | 
addEdge, addNode, adjacentNodes, degree, edges, getAdjacentNode, getEdge, getIncidentEdge, getNode, incidentEdges, nodes, traverser | 
 
 
INSTANCE
public static final PetersenGraph INSTANCE
- Singleton 
PetersenGraph instance.
 
degree
public int degree(Object node)
- Returns the degree of 
node, defined as the number
  of edges incident on node.
- Specified by:
 degree in interface Graph- Overrides:
 degree in class AbstractGraph
 
- Parameters:
 node - return the degree of this node.
- Returns:
 - the degree of 
node. 
 
 
createEdge
protected Graph.Edge createEdge(int tailIndex,
                                int headIndex)
- Description copied from class: 
AbstractIntegerNodeGraph 
- If an edge exists between the specified indices, create and
  return it.  If not, return 
null.  The indices are
  assumed to represent valid nodes for this Graph.
- Specified by:
 createEdge in class AbstractIntegerNodeGraph
 
 
 
createEdgeCollection
protected Collection createEdgeCollection()
- Description copied from class: 
AbstractIntegerNodeGraph 
- Creates the (single) collection of edges for this instance.
- Specified by:
 createEdgeCollection in class AbstractIntegerNodeGraph
 
 
 
createTraverser
protected Traverser createTraverser(int nodeIndex)
- Description copied from class: 
AbstractIntegerNodeGraph 
- Creates a traverser with no filtering; assumes that the node
  index is valid.
- Specified by:
 createTraverser in class AbstractIntegerNodeGraph
 
 
 
toString
public String toString()
- Overrides:
 toString in class Object
 
 
See 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.