com.phoenixst.plexus.operations
public class Product extends AbstractGraph implements Serializable
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 $
| Constructor Summary | |
|---|---|
| Product(Graph left, Graph right)
Creates a new Product graph.
| |
| Method Summary | |
|---|---|
| boolean | containsEdge(Graph.Edge edge) |
| boolean | containsNode(Object node)
Returns true if this Graph contains
node. |
| int | degree(Object node)
Returns the degree of node, defined as the number
of edges incident on node, with self-loops
counted twice. |
| protected Collection | edges() |
| Graph | getLeftOperand() |
| Graph | getRightOperand() |
| protected Collection | nodes() |
| boolean | removeEdge(Graph.Edge edge)
Throws an UnsupportedOperationException. |
| boolean | removeNode(Object node)
Throws an UnsupportedOperationException. |
| String | toString() |
| protected Traverser | traverser(Object node) |
Product graph.
Parameters: left the first (left) graph operand for the product operation. right the second (right) graph operand for the product operation.
true if this Graph contains
node.node, defined as the number
of edges incident on node, with self-loops
counted twice.UnsupportedOperationException.UnsupportedOperationException.