

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
public interface Forest<V,E>
An interface for a graph which consists of a collection of rooted directed acyclic graphs.
Method Summary  

int 
getChildCount(V vertex)
Returns the number of children that vertex has in this tree. 
Collection<E> 
getChildEdges(V vertex)
Returns the edges connecting vertex to its children
in this tree. 
Collection<V> 
getChildren(V vertex)
Returns the children of vertex in this tree. 
V 
getParent(V vertex)
Returns the parent of vertex in this tree. 
E 
getParentEdge(V vertex)
Returns the edge connecting vertex to its parent in
this tree. 
Collection<Tree<V,E>> 
getTrees()
Returns a view of this graph as a collection of Tree instances. 
Methods inherited from interface edu.uci.ics.jung.graph.Graph 

addEdge, addEdge, getDest, getEndpoints, getInEdges, getOpposite, getOutEdges, getPredecessorCount, getPredecessors, getSource, getSuccessorCount, getSuccessors, inDegree, isDest, isPredecessor, isSource, isSuccessor, outDegree 
Methods inherited from interface edu.uci.ics.jung.graph.Hypergraph 

addEdge, addEdge, addVertex, containsEdge, containsVertex, degree, findEdge, findEdgeSet, getDefaultEdgeType, getEdgeCount, getEdgeCount, getEdges, getEdges, getEdgeType, getIncidentCount, getIncidentEdges, getIncidentVertices, getNeighborCount, getNeighbors, getVertexCount, getVertices, isIncident, isNeighbor, removeEdge, removeVertex 
Method Detail 

Collection<Tree<V,E>> getTrees()
Tree
instances.
Tree
sV getParent(V vertex)
vertex
in this tree.
(If vertex
is the root, returns null
.)
The parent of a vertex is defined as being its predecessor in the
(unique) shortest path from the root to this vertex.
This is a convenience method which is equivalent to
Graph.getPredecessors(vertex).iterator().next()
.
vertex
in this treeGraph.getPredecessors(Object)
,
getParentEdge(Object)
E getParentEdge(V vertex)
vertex
to its parent in
this tree.
(If vertex
is the root, returns null
.)
The parent of a vertex is defined as being its predecessor in the
(unique) shortest path from the root to this vertex.
This is a convenience method which is equivalent to
Graph.getInEdges(vertex).iterator().next()
,
and also to Graph.findEdge(vertex, getParent(vertex))
.
vertex
to its parent, or
null
if vertex
is the rootGraph.getInEdges(Object)
,
getParent(Object)
Collection<V> getChildren(V vertex)
vertex
in this tree.
The children of a vertex are defined as being the successors of
that vertex on the respective (unique) shortest paths from the root to
those vertices.
This is syntactic (maple) sugar for getSuccessors(vertex)
.
vertex
 the vertex whose children are to be returned
Collection
of children of vertex
in this treeGraph.getSuccessors(Object)
,
getChildEdges(Object)
Collection<E> getChildEdges(V vertex)
vertex
to its children
in this tree.
The children of a vertex are defined as being the successors of
that vertex on the respective (unique) shortest paths from the root to
those vertices.
This is syntactic (maple) sugar for getOutEdges(vertex)
.
vertex
 the vertex whose child edges are to be returned
Collection
of edges connecting
vertex
to its children in this treeGraph.getOutEdges(Object)
,
getChildren(Object)
int getChildCount(V vertex)
vertex
has in this tree.
The children of a vertex are defined as being the successors of
that vertex on the respective (unique) shortest paths from the root to
those vertices.
This is syntactic (maple) sugar for getSuccessorCount(vertex)
.
vertex
 the vertex whose child edges are to be returned
Collection
of edges connecting
vertex
to its children in this treegetChildEdges(Object)
,
getChildren(Object)
,
Graph.getSuccessorCount(Object)


PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 