Class ConnectedSubgraphFinder
java.lang.Object
org.locationtech.jts.planargraph.algorithm.ConnectedSubgraphFinder
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
Adds the argument node and all its out edges to the subgraph.private void
addReachable
(Node startNode, Subgraph subgraph) Adds all nodes and edges reachable from this node to the subgraph.private Subgraph
findSubgraph
(Node node)
-
Field Details
-
graph
-
-
Constructor Details
-
ConnectedSubgraphFinder
-
-
Method Details
-
getConnectedSubgraphs
-
findSubgraph
-
addReachable
Adds all nodes and edges reachable from this node to the subgraph. Uses an explicit stack to avoid a large depth of recursion.- Parameters:
node
- a node known to be in the subgraph
-
addEdges
Adds the argument node and all its out edges to the subgraph.- Parameters:
node
- the node to addnodeStack
- the current set of nodes being traversed
-