org.gersteinlab.tyna.core.graph
Class AbstractMultiGraph

java.lang.Object
  extended by org.gersteinlab.tyna.core.graph.AbstractGraph
      extended by org.gersteinlab.tyna.core.graph.AbstractMultiGraph
All Implemented Interfaces:
java.io.Serializable, AdvancedGraph, Graph, MultiGraph
Direct Known Subclasses:
DirectedMultiGraph, UndirectedMultiGraph

public abstract class AbstractMultiGraph
extends AbstractGraph
implements MultiGraph

        This class is the abstract parent class of all multigraph classes. See
        MultiGraph for the definition of a multigraph.
        

Version:
1.0 (September 21, 2005) Change History: 1.0 - Initial version
Author:
Kevin Yuk-Lap Yip
See Also:
Serialized Form

Nested Class Summary
protected  class AbstractMultiGraph.AbstractMultiGraphEdgeIterator
           
 
Nested classes/interfaces inherited from class org.gersteinlab.tyna.core.graph.AbstractGraph
AbstractGraph.AbstractGraphEdgeIterator, AbstractGraph.AbstractGraphNodeIterator, AbstractGraph.BetweennessNode, AbstractGraph.DuplicateTree, AbstractGraph.HeadTailTree, AbstractGraph.HeadTree, AbstractGraph.TailTree
 
Field Summary
 
Fields inherited from class org.gersteinlab.tyna.core.graph.AbstractGraph
attrs, edgeCount, edges, lastModified, nodes, revEdges
 
Constructor Summary
AbstractMultiGraph()
           
 
Method Summary
 void addEdge(Edge edge, boolean addNodes)
          Add an edge to the graph.
protected  int getInDegree(Node node)
           
protected  java.util.List getInEdges(Node node)
           
protected  int getOutDegree(Node node)
           
protected  java.util.List getOutEdges(Node node)
           
 
Methods inherited from class org.gersteinlab.tyna.core.graph.AbstractGraph
accumulateLocalBetweenness, addNode, checkEdge, checkNode, computeLocalBetweenness, containsEdge, containsNode, getAdjacencyMatrix, getAllUnweightedShortestPaths, getAllUnweightedShortestPaths, getAllUnweightedShortestPaths, getAttr, getAttrs, getBetweenness, getBetweennesses, getClusCoef, getClusCoefs, getConnectedComponentCount, getConnectedComponents, getCycles, getCycles, getDefectiveCliquesMissingEdges, getDegree, getDegrees, getDiffusionDistanceMatrix, getDiffusionDistanceMatrix, getEccentricities, getEccentricity, getEdgeBetweennesses, getEdgeCount, getEdgeNodePairs, getEdges, getFeedforwardLoops, getFeedforwardLoops, getInDegrees, getInNeighbors, getLaplacianMatrix, getLaplacianMatrix, getMaximalChains, getMaximalCliques, getMaximalCompleteTwoLayerSubgraphs, getMaximalIndependentSets, getMinimalChains, getNeighbors, getNode, getNodeCount, getNodeIterator, getOutDegrees, getOutNeighbors, getUnweightedShortestPath, getUnweightedShortestPathLength, getUnweightedShortestPathLengths, getUnweightedShortestPathLengths, getUnweightedShortestPaths, getUnweightedShortestPaths, getUnweightedShortestPaths, getUnweightedShortestPaths, markModified, saveGraph, setAttr
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.gersteinlab.tyna.core.graph.Graph
addNode, containsEdge, containsNode, getAttr, getAttrs, getEdgeCount, getEdgeIterator, getEdgeNodePairs, getNode, getNodeCount, getNodeIterator, setAttr
 

Constructor Detail

AbstractMultiGraph

public AbstractMultiGraph()
Method Detail

addEdge

public void addEdge(Edge edge,
                    boolean addNodes)
             throws GraphTypeException,
                    java.lang.NullPointerException
Description copied from interface: Graph
Add an edge to the graph. See Edge for the definition of two edges being equal.

Specified by:
addEdge in interface Graph
Parameters:
edge - The edge
addNodes - Whether to add the nodes to the node list
Throws:
GraphTypeException - If the addition of the node violdates some requirements of the graph type
java.lang.NullPointerException - If edge == null

getInEdges

protected java.util.List getInEdges(Node node)
                             throws java.lang.IllegalArgumentException,
                                    java.lang.NullPointerException
Specified by:
getInEdges in class AbstractGraph
Throws:
java.lang.IllegalArgumentException
java.lang.NullPointerException
See Also:
DirectedGraph.getInEdges(Node)

getOutEdges

protected java.util.List getOutEdges(Node node)
                              throws java.lang.IllegalArgumentException,
                                     java.lang.NullPointerException
Specified by:
getOutEdges in class AbstractGraph
Throws:
java.lang.IllegalArgumentException
java.lang.NullPointerException
See Also:
DirectedGraph.getOutEdges(Node)

getInDegree

protected int getInDegree(Node node)
                   throws java.lang.IllegalArgumentException,
                          java.lang.NullPointerException
Specified by:
getInDegree in class AbstractGraph
Throws:
java.lang.IllegalArgumentException
java.lang.NullPointerException
See Also:
DirectedGraph.getInDegree(Node)

getOutDegree

protected int getOutDegree(Node node)
                    throws java.lang.IllegalArgumentException,
                           java.lang.NullPointerException
Specified by:
getOutDegree in class AbstractGraph
Throws:
java.lang.IllegalArgumentException
java.lang.NullPointerException
See Also:
DirectedGraph.getOutDegree(Node)