19 #ifndef GEOS_PLANARGRAPH_PLANARGRAPH_H 20 #define GEOS_PLANARGRAPH_PLANARGRAPH_H 22 #include <geos/export.h> 23 #include <geos/planargraph/NodeMap.h> 29 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class 37 namespace planargraph {
45 namespace planargraph {
64 std::vector<Edge*> edges;
65 std::vector<DirectedEdge*> dirEdges;
100 dirEdges.push_back(dirEdge);
105 typedef std::vector<Edge *> EdgeContainer;
106 typedef EdgeContainer::iterator EdgeIterator;
123 return nodeMap.
find(pt);
131 return nodeMap.begin();
134 NodeMap::container::iterator nodeBegin() {
135 return nodeMap.begin();
138 NodeMap::container::const_iterator nodeBegin()
const {
139 return nodeMap.begin();
142 NodeMap::container::iterator nodeEnd() {
143 return nodeMap.end();
146 NodeMap::container::const_iterator nodeEnd()
const {
147 return nodeMap.end();
167 return dirEdges.begin();
172 return edges.begin();
181 return edges.begin();
211 void remove(
Edge *edge);
229 void remove(
Node *node);
236 std::vector<Node*>* findNodesOfDegree(std::size_t degree);
244 void findNodesOfDegree(std::size_t degree, std::vector<Node*>& to);
254 #endif // GEOS_PLANARGRAPH_PLANARGRAPH_H std::vector< DirectedEdge * >::iterator dirEdgeIterator()
Returns an Iterator over the DirectedEdges in this PlanarGraph, in the order in which they were added...
Definition: planargraph/PlanarGraph.h:166
std::vector< Edge * >::iterator edgeEnd()
Returns an iterator to one-past last Edge in this graph.
Definition: planargraph/PlanarGraph.h:189
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:60
Represents a directed edge in a PlanarGraph.
Definition: planargraph/DirectedEdge.h:46
void getNodes(std::vector< Node *> &nodes)
Returns the Nodes in this NodeMap, sorted in ascending order by angle with the positive x-axis...
void add(Node *node)
Adds a node to the std::map, replacing any that is already at that location.
Definition: planargraph/PlanarGraph.h:77
void getNodes(std::vector< Node *> &nodes)
Returns the Nodes in this PlanarGraph.
Definition: planargraph/PlanarGraph.h:156
std::vector< Edge * > * getEdges()
Returns the Edges that have been added to this PlanarGraph.
Definition: planargraph/PlanarGraph.h:198
void add(DirectedEdge *dirEdge)
Adds the Edge to this PlanarGraph.
Definition: planargraph/PlanarGraph.h:99
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25
Represents an undirected edge of a PlanarGraph.
Definition: planargraph/Edge.h:54
std::vector< Edge * >::iterator edgeIterator()
Alias for edgeBegin()
Definition: planargraph/PlanarGraph.h:171
std::vector< Edge * >::iterator edgeBegin()
Returns an iterator to first Edge in this graph.
Definition: planargraph/PlanarGraph.h:180
Node * add(Node *n)
Adds a node to the std::map, replacing any that is already at that location.
A node in a PlanarGraph is a location where 0 or more Edge meet.
Definition: planargraph/Node.h:45
NodeMap::container::iterator nodeIterator()
Returns an Iterator over the Nodes in this PlanarGraph.
Definition: planargraph/PlanarGraph.h:130
Node * findNode(const geom::Coordinate &pt)
Returns the Node at the given location, or null if no Node was there.
Definition: planargraph/PlanarGraph.h:122
Node * find(const geom::Coordinate &coord)
Returns the Node at the given location, or null if no Node was there.
A map of Node, indexed by the coordinate of the node.
Definition: planargraph/NodeMap.h:48
PlanarGraph()
Constructs a PlanarGraph without any Edges, DirectedEdges, or Nodes.
Definition: planargraph/PlanarGraph.h:113
Represents a directed graph which is embeddable in a planar surface.
Definition: planargraph/PlanarGraph.h:60