com.phoenixst.plexus.operations

Class Product

public class Product extends AbstractGraph implements Serializable

A Graph which is the product of two other Graphs. The nodes are OrderedPair objects with exactly two elements, the first element being a node from the first graph and the second being a node from the second graph.

If either wrapped Graph contains Graph.Edges which point to other Graph.Edges, the product will not reflect this. The node and edge aspects of any such Graph.Edge will be distinct in the product.

Since: 1.0

Version: $Revision: 1.61 $

Author: Ray A. Conner

Constructor Summary
Product(Graph left, Graph right)
Creates a new Product graph.
Method Summary
booleancontainsEdge(Graph.Edge edge)
booleancontainsNode(Object node)
Returns true if this Graph contains node.
intdegree(Object node)
Returns the degree of node, defined as the number of edges incident on node, with self-loops counted twice.
protected Collectionedges()
GraphgetLeftOperand()
GraphgetRightOperand()
protected Collectionnodes()
booleanremoveEdge(Graph.Edge edge)
Throws an UnsupportedOperationException.
booleanremoveNode(Object node)
Throws an UnsupportedOperationException.
StringtoString()
protected Traversertraverser(Object node)

Constructor Detail

Product

public Product(Graph left, Graph right)
Creates a new Product graph.

Parameters: left the first (left) graph operand for the product operation. right the second (right) graph operand for the product operation.

Method Detail

containsEdge

public boolean containsEdge(Graph.Edge edge)

containsNode

public boolean containsNode(Object node)
Returns true if this Graph contains node.

degree

public int degree(Object node)
Returns the degree of node, defined as the number of edges incident on node, with self-loops counted twice.

edges

protected Collection edges()

getLeftOperand

public Graph getLeftOperand()

getRightOperand

public Graph getRightOperand()

nodes

protected Collection nodes()

removeEdge

public boolean removeEdge(Graph.Edge edge)
Throws an UnsupportedOperationException.

removeNode

public boolean removeNode(Object node)
Throws an UnsupportedOperationException.

toString

public String toString()

traverser

protected Traverser traverser(Object node)
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.