GEOS  3.9.1dev
Public Member Functions | Private Member Functions | Private Attributes | List of all members
geos::planargraph::algorithm::ConnectedSubgraphFinder Class Reference

Finds all connected Subgraphs of a PlanarGraph. More...

#include <ConnectedSubgraphFinder.h>

Collaboration diagram for geos::planargraph::algorithm::ConnectedSubgraphFinder:
[legend]

Public Member Functions

 ConnectedSubgraphFinder (PlanarGraph &newGraph)
 
void getConnectedSubgraphs (std::vector< Subgraph * > &dest)
 Store newly allocated connected Subgraphs into the given std::vector. More...
 

Private Member Functions

SubgraphfindSubgraph (Node *node)
 Returns a newly allocated Subgraph. More...
 
void addReachable (Node *node, Subgraph *subgraph)
 
void addEdges (Node *node, std::stack< Node * > &nodeStack, Subgraph *subgraph)
 
 ConnectedSubgraphFinder (const ConnectedSubgraphFinder &other)=delete
 
ConnectedSubgraphFinderoperator= (const ConnectedSubgraphFinder &rhs)=delete
 

Private Attributes

PlanarGraphgraph
 

Detailed Description

Finds all connected Subgraphs of a PlanarGraph.

Note: uses the isVisited flag on the nodes.

Definition at line 43 of file ConnectedSubgraphFinder.h.

Constructor & Destructor Documentation

geos::planargraph::algorithm::ConnectedSubgraphFinder::ConnectedSubgraphFinder ( PlanarGraph newGraph)
inline

Definition at line 46 of file ConnectedSubgraphFinder.h.

geos::planargraph::algorithm::ConnectedSubgraphFinder::ConnectedSubgraphFinder ( const ConnectedSubgraphFinder other)
privatedelete

Member Function Documentation

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
nodethe node to add
nodeStackthe 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
nodea node known to be in the subgraph
Subgraph* geos::planargraph::algorithm::ConnectedSubgraphFinder::findSubgraph ( Node node)
private

Returns a newly allocated Subgraph.

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.

ConnectedSubgraphFinder& geos::planargraph::algorithm::ConnectedSubgraphFinder::operator= ( const ConnectedSubgraphFinder rhs)
privatedelete

Member Data Documentation

PlanarGraph& geos::planargraph::algorithm::ConnectedSubgraphFinder::graph
private

Definition at line 63 of file ConnectedSubgraphFinder.h.


The documentation for this class was generated from the following file: