Class Subgraph
java.lang.Object
org.locationtech.jts.planargraph.Subgraph
A subgraph of a
PlanarGraph.
A subgraph may contain any subset of Edges
from the parent graph.
It will also automatically contain all DirectedEdges
and Nodes 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
FieldsModifier and TypeFieldDescriptionprotected Listprotected Setprotected NodeMapprotected PlanarGraph -
Constructor Summary
ConstructorsConstructorDescriptionSubgraph(PlanarGraph parentGraph) Creates a new subgraph of the givenPlanarGraph -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds anEdgeto the subgraph.booleanTests whether anEdgeis contained in this subgraphReturns anIteratorover theDirectedEdges in this graph, in the order in which they were added.Gets thePlanarGraphwhich this subgraph is part of.
-
Field Details
-
parentGraph
-
edges
-
dirEdges
-
nodeMap
-
-
Constructor Details
-
Subgraph
Creates a new subgraph of the givenPlanarGraph- Parameters:
parentGraph- the parent graph
-
-
Method Details
-
getParent
Gets thePlanarGraphwhich this subgraph is part of.- Returns:
- the parent PlanarGraph
-
add
- Parameters:
e- the edge to add
-
dirEdgeIterator
Returns anIteratorover theDirectedEdges in this graph, in the order in which they were added.- Returns:
- an iterator over the directed edges
- See Also:
-
edgeIterator
-
nodeIterator
-
contains
-