Class ConnectedSubgraphFinder
- java.lang.Object
-
- org.locationtech.jts.planargraph.algorithm.ConnectedSubgraphFinder
-
public class ConnectedSubgraphFinder extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private PlanarGraph
graph
-
Constructor Summary
Constructors Constructor Description ConnectedSubgraphFinder(PlanarGraph graph)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
addEdges(Node node, java.util.Stack nodeStack, Subgraph subgraph)
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)
java.util.List
getConnectedSubgraphs()
-
-
-
Field Detail
-
graph
private PlanarGraph graph
-
-
Constructor Detail
-
ConnectedSubgraphFinder
public ConnectedSubgraphFinder(PlanarGraph graph)
-
-
Method Detail
-
getConnectedSubgraphs
public java.util.List getConnectedSubgraphs()
-
addReachable
private void addReachable(Node startNode, Subgraph subgraph)
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
-
-