|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjpaul.Graphs.DiGraph<Vertex>
jpaul.Graphs.ArcBasedDiGraph<Vertex>
public class ArcBasedDiGraph<Vertex>
Digraph based on a list of arcs. Created: Sun Feb 7 20:00:00 2005
Field Summary |
---|
Fields inherited from class jpaul.Graphs.DiGraph |
---|
CACHING |
Constructor Summary | |
---|---|
ArcBasedDiGraph(java.util.Collection<Pair<Vertex,Vertex>> arcs)
Constructs a digraph based on a collection of arcs between vertices. |
|
ArcBasedDiGraph(Relation<Vertex,Vertex> succs)
Constructs a digraph based on a set of arcs given as a successor relation. |
Method Summary | |
---|---|
ForwardNavigator<Vertex> |
getForwardNavigator()
Returns the forward navigator for this digraph. |
java.util.Set<Vertex> |
getRoots()
Returns the roots of this directed
graph. |
Methods inherited from class jpaul.Graphs.DiGraph |
---|
constructNavigator, dfs, diGraph, diGraph, findPath, findPath, forAllVertices, getComponentDiGraph, getNavigator, numArcs, numVertices, reverseDiGraph, subDiGraph, transitivePred, transitivePred, transitiveSucc, transitiveSucc, union, vertices |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ArcBasedDiGraph(java.util.Collection<Pair<Vertex,Vertex>> arcs)
public ArcBasedDiGraph(Relation<Vertex,Vertex> succs)
succs
- Relation between arc sources and arc targets.Method Detail |
---|
public java.util.Set<Vertex> getRoots()
DiGraph
this
directed
graph. By "roots of a digraph" we mean any set of
vertices such that one can explore the entire graph by
(transitively) navigating on their outgoing arcs (using the
next
method of the navigator). Notice that this
set is not uniquely defined; also, it is OK to return ALL the
vertices from the digraph.
getRoots
in class DiGraph<Vertex>
public ForwardNavigator<Vertex> getForwardNavigator()
DiGraph
this
digraph.
The default implementations returns the bi-directional
navigator (obtained by calling getNavigator
).
Note: You MUST overwrite at least one of
getNavigator
and
getForwardNavigator
.
getForwardNavigator
in class DiGraph<Vertex>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |