GEOS
3.4.2
Main Page
Related Pages
Namespaces
Classes
Files
File List
include
geos
planargraph
algorithm
ConnectedSubgraphFinder.h
1
/**********************************************************************
2
*
3
* GEOS - Geometry Engine Open Source
4
* http://geos.osgeo.org
5
*
6
* Copyright (C) 2001-2002 Vivid Solutions Inc.
7
* Copyright (C) 2005-2006 Refractions Research Inc.
8
*
9
* This is free software; you can redistribute and/or modify it under
10
* the terms of the GNU Lesser General Public Licence as published
11
* by the Free Software Foundation.
12
* See the COPYING file for more information.
13
*
14
**********************************************************************/
15
16
#ifndef GEOS_PLANARGRAPH_ALGO_CONNECTEDSUBGRAPHFINDER_H
17
#define GEOS_PLANARGRAPH_ALGO_CONNECTEDSUBGRAPHFINDER_H
18
19
#include <geos/export.h>
20
#include <geos/planargraph/PlanarGraph.h>
// for inlines
21
22
#include <stack>
23
#include <vector>
24
25
// Forward declarations
26
namespace
geos {
27
namespace
planargraph {
28
class
PlanarGraph;
29
class
Subgraph;
30
class
Node;
31
}
32
}
33
34
namespace
geos {
35
namespace
planargraph {
// geos::planargraph
36
namespace
algorithm {
// geos::planargraph::algorithm
37
43
class
GEOS_DLL
ConnectedSubgraphFinder
44
{
45
public
:
46
47
ConnectedSubgraphFinder
(
PlanarGraph
& newGraph)
48
:
49
graph(newGraph)
50
{}
51
60
void
getConnectedSubgraphs(std::vector<Subgraph *>& dest);
61
62
private
:
63
64
PlanarGraph
& graph;
65
67
Subgraph
* findSubgraph(
Node
* node);
68
69
76
void
addReachable(
Node
* node,
Subgraph
* subgraph);
77
83
void
addEdges(
Node
* node, std::stack<Node *>& nodeStack,
84
Subgraph
* subgraph);
85
86
// Declare type as noncopyable
87
ConnectedSubgraphFinder
(
const
ConnectedSubgraphFinder
& other);
88
ConnectedSubgraphFinder
& operator=(
const
ConnectedSubgraphFinder
& rhs);
89
};
90
91
}
// namespace geos::planargraph::algorithm
92
}
// namespace geos::planargraph
93
}
// namespace geos
94
95
#endif // GEOS_PLANARGRAPH_ALGO_CONNECTEDSUBGRAPHFINDER_H
96
Generated on Mon Aug 10 2015 02:11:04 for GEOS by
1.8.2