|
JTS Topology Suite - v 1.12 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.vividsolutions.jts.planargraph.Subgraph
public class Subgraph
A subgraph of a PlanarGraph
.
A subgraph may contain any subset of Edge
s
from the parent graph.
It will also automatically contain all DirectedEdge
s
and Node
s associated with those edges.
No new objects are created when edges are added -
all associated components must already exist in the parent graph.
Field Summary | |
---|---|
protected java.util.List |
dirEdges
|
protected java.util.Set |
edges
|
protected NodeMap |
nodeMap
|
protected PlanarGraph |
parentGraph
|
Constructor Summary | |
---|---|
Subgraph(PlanarGraph parentGraph)
Creates a new subgraph of the given PlanarGraph |
Method Summary | |
---|---|
void |
add(Edge e)
Adds an Edge to the subgraph. |
boolean |
contains(Edge e)
Tests whether an Edge is contained in this subgraph |
java.util.Iterator |
dirEdgeIterator()
Returns an Iterator over the DirectedEdge s in this graph,
in the order in which they were added. |
java.util.Iterator |
edgeIterator()
Returns an Iterator over the Edge s in this graph,
in the order in which they were added. |
PlanarGraph |
getParent()
Gets the PlanarGraph which this subgraph
is part of. |
java.util.Iterator |
nodeIterator()
Returns an Iterator over the Node s in this graph. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected PlanarGraph parentGraph
protected java.util.Set edges
protected java.util.List dirEdges
protected NodeMap nodeMap
Constructor Detail |
---|
public Subgraph(PlanarGraph parentGraph)
PlanarGraph
parentGraph
- the parent graphMethod Detail |
---|
public PlanarGraph getParent()
PlanarGraph
which this subgraph
is part of.
public void add(Edge e)
Edge
to the subgraph.
The associated DirectedEdge
s and Node
s
are also added.
e
- the edge to addpublic java.util.Iterator dirEdgeIterator()
Iterator
over the DirectedEdge
s in this graph,
in the order in which they were added.
add(Edge)
public java.util.Iterator edgeIterator()
Iterator
over the Edge
s in this graph,
in the order in which they were added.
add(Edge)
public java.util.Iterator nodeIterator()
Iterator
over the Node
s in this graph.
public boolean contains(Edge e)
Edge
is contained in this subgraph
e
- the edge to test
true
if the edge is contained in this subgraph
|
JTS Topology Suite - v 1.12 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |