com.phoenixst.plexus.operations

Class Join

public class Join extends AbstractGraph implements Serializable

A Graph which is the join of two other Graphs with disjoint node sets. This implementation does not actually check that the node sets are disjoint, but will definitely behave strangely if they are not. The new edges added to the the union of the two graphs may be directed or undirected as specified in the constructor. These new edges never contain user-defined objects.

Since: 1.0

Version: $Revision: 1.59 $

Author: Ray A. Conner

Constructor Summary
Join(Graph left, Graph right, boolean isDirected)
Creates a new Join graph.
Method Summary
booleancontainsEdge(Graph.Edge edge)
This implementation traverses over the edges in this graph incident on the tail of the specified edge, looking for it and returning true if found.
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

Join

public Join(Graph left, Graph right, boolean isDirected)
Creates a new Join graph.

Parameters: left the first (left) graph operand for the join operation. right the second (right) graph operand for the join operation. isDirected whether or not the new edges added as part of the join operation are directed. If true, nodes from the first operand are the tails of the edges.

Method Detail

containsEdge

public boolean containsEdge(Graph.Edge edge)
This implementation traverses over the edges in this graph incident on the tail of the specified edge, looking for it and returning true if found.

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.