All Packages Class Hierarchy This Package Previous Next Index
Class jdsl.core.ref.AMSGraphTree
java.lang.Object
|
+----jdsl.core.ref.AMSGraphTree
- public class AMSGraphTree
- extends Object
- implements InspectableGraph, InspectableTree
An AMSGraphTree implements a rooted InspectableTree that is also an
InspectableGraph. No vertex may have an inDegree greater than 1,
and only the root node may have inDegree of 0,
maintaining the parent-child hierarchy of the tree.
One possible modification to this data structure might be to implement
a Forest-Graph.
- Version:
- $Revision: 1.2 $, $Date: 1998/07/13 18:39:11 $
- Author:
- Andrew Schwerin (schwerin)
-
AMSGraphTree()
-
-
adjacentVertices(Vertex)
-
-
castEdge(Position)
-
-
castMutable(Position)
- Casting methods
-
castVertex(Position)
-
-
children(Position)
-
-
degree(Vertex)
-
-
destination(Edge)
-
-
directedEdges()
-
-
edges()
-
-
elements()
-
-
endVertices(Edge)
-
-
inAdjacentVertices(Vertex)
-
-
incidentEdges(Vertex)
-
-
inDegree(Vertex)
-
-
inIncidentEdges(Vertex)
-
-
insertChild(Position, Object)
-
-
insertDirectedEdge(Vertex, Vertex, Object)
-
-
insertRoot(Object)
-
-
insertVertex(Object)
- Insertion methods
-
isDirected(Edge)
-
-
isEmpty()
-
-
isExternal(Position)
-
-
isInternal(Position)
-
-
isRoot(Position)
- InspectableTree methods
-
newContainer()
- Container methods
-
numEdges()
-
-
numVertices()
- InspectableGraph methods
-
opposite(Vertex, Edge)
-
-
origin(Edge)
-
-
outAdjacentVertices(Vertex)
-
-
outDegree(Vertex)
-
-
outIncidentEdges(Vertex)
-
-
parent(Position)
-
-
positions()
- PositionalContainer methods
-
replace(Position, Object)
-
-
root()
-
-
siblings(Position)
-
-
size()
-
-
swap(Position, Position)
-
-
undirectedEdges()
-
-
vertices()
-
AMSGraphTree
public AMSGraphTree()
newContainer
public Container newContainer()
- Container methods
size
public int size()
isEmpty
public boolean isEmpty()
elements
public Enumeration elements()
positions
public Enumeration positions()
- PositionalContainer methods
replace
public Object replace(Position p,
Object obj) throws InvalidPositionException
swap
public void swap(Position a,
Position b)
numVertices
public int numVertices()
- InspectableGraph methods
numEdges
public int numEdges()
vertices
public Enumeration vertices()
edges
public Enumeration edges()
directedEdges
public Enumeration directedEdges()
undirectedEdges
public Enumeration undirectedEdges()
degree
public int degree(Vertex v) throws InvalidPositionException
inDegree
public int inDegree(Vertex v) throws InvalidPositionException
outDegree
public int outDegree(Vertex v) throws InvalidPositionException
adjacentVertices
public Enumeration adjacentVertices(Vertex v) throws InvalidPositionException
inAdjacentVertices
public Enumeration inAdjacentVertices(Vertex v) throws InvalidPositionException
outAdjacentVertices
public Enumeration outAdjacentVertices(Vertex v) throws InvalidPositionException
incidentEdges
public Enumeration incidentEdges(Vertex v) throws InvalidPositionException
inIncidentEdges
public Enumeration inIncidentEdges(Vertex v) throws InvalidPositionException
outIncidentEdges
public Enumeration outIncidentEdges(Vertex v) throws InvalidPositionException
endVertices
public Vertex[] endVertices(Edge e) throws InvalidPositionException
opposite
public Vertex opposite(Vertex v,
Edge e) throws InvalidPositionException, InvalidEdgeException
origin
public Vertex origin(Edge e) throws InvalidPositionException, InvalidEdgeException
destination
public Vertex destination(Edge e) throws InvalidPositionException, InvalidEdgeException
isDirected
public boolean isDirected(Edge e) throws InvalidEdgeException
isRoot
public boolean isRoot(Position p) throws InvalidPositionException, InvalidContainerException
- InspectableTree methods
isInternal
public boolean isInternal(Position p) throws InvalidContainerException, InvalidPositionException
isExternal
public boolean isExternal(Position p) throws InvalidContainerException, InvalidPositionException
root
public Position root() throws InvalidContainerException
parent
public Position parent(Position p) throws InvalidContainerException, InvalidPositionException
children
public Enumeration children(Position p) throws InvalidPositionException, InvalidContainerException
siblings
public Enumeration siblings(Position p) throws InvalidContainerException, InvalidPositionException
insertVertex
public Vertex insertVertex(Object info)
- Insertion methods
insertDirectedEdge
public Edge insertDirectedEdge(Vertex v1,
Vertex v2,
Object obj) throws InvalidPositionException, InvalidInsertionException
insertRoot
public Position insertRoot(Object info) throws InvalidInsertionException
insertChild
public Position insertChild(Position parent,
Object info) throws InvalidPositionException
castMutable
public MutablePosition castMutable(Position p) throws InvalidPositionException
- Casting methods
castVertex
public AMSGTVertex castVertex(Position p) throws InvalidPositionException
castEdge
public AMSGTEdge castEdge(Position p) throws InvalidPositionException
All Packages Class Hierarchy This Package Previous Next Index