Finds all connected Subgraphs of a PlanarGraph.
More...
#include <ConnectedSubgraphFinder.h>
Finds all connected Subgraphs of a PlanarGraph.
Note: uses the isVisited
flag on the nodes.
Definition at line 43 of file ConnectedSubgraphFinder.h.
geos::planargraph::algorithm::ConnectedSubgraphFinder::ConnectedSubgraphFinder |
( |
PlanarGraph & |
newGraph | ) |
|
|
inline |
geos::planargraph::algorithm::ConnectedSubgraphFinder::ConnectedSubgraphFinder |
( |
const ConnectedSubgraphFinder & |
other | ) |
|
|
privatedelete |
void geos::planargraph::algorithm::ConnectedSubgraphFinder::addEdges |
( |
Node * |
node, |
|
|
std::stack< Node * > & |
nodeStack, |
|
|
Subgraph * |
subgraph |
|
) |
| |
|
private |
Adds the argument node and all its out edges to the subgraph.
- Parameters
-
node | the node to add |
nodeStack | the current set of nodes being traversed |
void geos::planargraph::algorithm::ConnectedSubgraphFinder::addReachable |
( |
Node * |
node, |
|
|
Subgraph * |
subgraph |
|
) |
| |
|
private |
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 |
Subgraph* geos::planargraph::algorithm::ConnectedSubgraphFinder::findSubgraph |
( |
Node * |
node | ) |
|
|
private |
void geos::planargraph::algorithm::ConnectedSubgraphFinder::getConnectedSubgraphs |
( |
std::vector< Subgraph * > & |
dest | ) |
|
Store newly allocated connected Subgraphs into the given std::vector.
Caller take responsibility in releasing memory associated with the subgraphs themself.
PlanarGraph& geos::planargraph::algorithm::ConnectedSubgraphFinder::graph |
|
private |
The documentation for this class was generated from the following file: