server.jung
Class DAGGraph

java.lang.Object
  extended by edu.uci.ics.jung.utils.UserDataDelegate
      extended by edu.uci.ics.jung.graph.impl.AbstractArchetypeGraph
          extended by edu.uci.ics.jung.graph.impl.AbstractSparseGraph
              extended by edu.uci.ics.jung.graph.impl.SparseGraph
                  extended by server.jung.DAGGraph
All Implemented Interfaces:
edu.uci.ics.jung.graph.ArchetypeGraph, edu.uci.ics.jung.graph.DirectedGraph, edu.uci.ics.jung.graph.Graph, edu.uci.ics.jung.utils.UserDataContainer, java.lang.Cloneable

public class DAGGraph
extends edu.uci.ics.jung.graph.impl.SparseGraph
implements edu.uci.ics.jung.graph.DirectedGraph

An implementation of Graph that consists of a Vertex set and a DirectedEdge set. Further, a vertex can have no more than one incoming directed edge (enforced with TreePredicate); the tree must define a root vertex at construction time. This implementation does NOT ALLOW parallel edges. SimpleDirectedSparseVertex is the most efficient vertex for this graph type.

Edge constraints imposed by this class: DIRECTED_EDGE, TreePredicate, NOT_PARALLEL_EDGE

For additional system and user constraints defined for this class, see the superclasses of this class.

Author:
Danyel Fisher, Joshua O'Madadhain
See Also:
DirectedSparseVertex, DirectedSparseEdge

Nested Class Summary
 
Nested classes/interfaces inherited from class edu.uci.ics.jung.graph.impl.AbstractArchetypeGraph
edu.uci.ics.jung.graph.impl.AbstractArchetypeGraph.Requirements
 
Nested classes/interfaces inherited from interface edu.uci.ics.jung.utils.UserDataContainer
edu.uci.ics.jung.utils.UserDataContainer.CopyAction
 
Field Summary
static java.lang.Object IN_TREE_KEY
           
protected  edu.uci.ics.jung.graph.Vertex mRoot
           
static java.lang.Object SPARSE_ROOT_KEY
           
 
Fields inherited from class edu.uci.ics.jung.graph.impl.AbstractSparseGraph
mEdges, mVertices
 
Fields inherited from class edu.uci.ics.jung.graph.impl.AbstractArchetypeGraph
edge_requirements, mEdgeIDs, mGraphListenerHandler, mVertexIDs, vertex_requirements
 
Fields inherited from class edu.uci.ics.jung.utils.UserDataDelegate
factory, udc_delegate
 
Fields inherited from interface edu.uci.ics.jung.graph.Graph
DIRECTED_EDGE, NOT_PARALLEL_EDGE, SIMPLE_EDGE, UNDIRECTED_EDGE
 
Fields inherited from interface edu.uci.ics.jung.graph.ArchetypeGraph
SUBSET_MANAGER
 
Constructor Summary
DAGGraph(edu.uci.ics.jung.graph.Vertex root)
           
 
Method Summary
 edu.uci.ics.jung.graph.Edge addEdge(edu.uci.ics.jung.graph.Edge e)
           
 edu.uci.ics.jung.graph.Vertex getRoot()
           
 
Methods inherited from class edu.uci.ics.jung.graph.impl.AbstractSparseGraph
addVertex, getEdges, getVertices, initialize, isDirected, removeEdge, removeEdges, removeVertex, removeVertices
 
Methods inherited from class edu.uci.ics.jung.graph.impl.AbstractArchetypeGraph
addAllNotInitializers, addListener, checkConstraints, copy, getEdgeConstraints, getVertexConstraints, listenersExist, newInstance, numEdges, numVertices, removeAllEdges, removeAllVertices, removeListener, toString
 
Methods inherited from class edu.uci.ics.jung.utils.UserDataDelegate
addUserDatum, clone, containsUserDatumKey, getUserDatum, getUserDatumCopyAction, getUserDatumKeyIterator, importUserData, removeUserDatum, setUserDataFactory, setUserDatum
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.uci.ics.jung.graph.Graph
addVertex, isDirected, removeEdge, removeVertex
 
Methods inherited from interface edu.uci.ics.jung.graph.ArchetypeGraph
addListener, copy, getEdgeConstraints, getEdges, getVertexConstraints, getVertices, newInstance, numEdges, numVertices, removeAllEdges, removeAllVertices, removeEdges, removeListener, removeVertices
 
Methods inherited from interface edu.uci.ics.jung.utils.UserDataContainer
addUserDatum, clone, containsUserDatumKey, getUserDatum, getUserDatumCopyAction, getUserDatumKeyIterator, importUserData, removeUserDatum, setUserDatum
 

Field Detail

mRoot

protected edu.uci.ics.jung.graph.Vertex mRoot

SPARSE_ROOT_KEY

public static final java.lang.Object SPARSE_ROOT_KEY

IN_TREE_KEY

public static final java.lang.Object IN_TREE_KEY
Constructor Detail

DAGGraph

public DAGGraph(edu.uci.ics.jung.graph.Vertex root)
Parameters:
root -
Method Detail

getRoot

public edu.uci.ics.jung.graph.Vertex getRoot()
Returns:
the root of this tree

addEdge

public edu.uci.ics.jung.graph.Edge addEdge(edu.uci.ics.jung.graph.Edge e)
Specified by:
addEdge in interface edu.uci.ics.jung.graph.Graph
Overrides:
addEdge in class edu.uci.ics.jung.graph.impl.AbstractSparseGraph
See Also:
Graph.addEdge(edu.uci.ics.jung.graph.Edge)