21 #include <geos/export.h> 22 #include <geos/planargraph/NodeMap.h> 28 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class 36 namespace planargraph {
44 namespace planargraph {
63 std::vector<Edge*> edges;
64 std::vector<DirectedEdge*> dirEdges;
102 dirEdges.push_back(dirEdge);
107 typedef std::vector<Edge*> EdgeContainer;
108 typedef EdgeContainer::iterator EdgeIterator;
128 return nodeMap.
find(pt);
135 NodeMap::container::iterator
138 return nodeMap.begin();
141 NodeMap::container::iterator
144 return nodeMap.begin();
147 NodeMap::container::const_iterator
150 return nodeMap.begin();
153 NodeMap::container::iterator
156 return nodeMap.end();
159 NodeMap::container::const_iterator
162 return nodeMap.end();
185 std::vector<DirectedEdge*>::iterator
188 return dirEdges.begin();
191 std::vector<DirectedEdge*>::iterator
194 return dirEdges.begin();
197 std::vector<DirectedEdge*>::iterator
200 return dirEdges.end();
204 std::vector<Edge*>::iterator
207 return edges.begin();
215 std::vector<Edge*>::iterator
218 return edges.begin();
226 std::vector<Edge*>::iterator
251 void remove(
Edge* edge);
269 void remove(
Node* node);
276 std::vector<Node*>* findNodesOfDegree(std::size_t degree);
284 void findNodesOfDegree(std::size_t degree, std::vector<Node*>& to);
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:186
std::vector< Edge * >::iterator edgeEnd()
Returns an iterator to one-past last Edge in this graph.
Definition: planargraph/PlanarGraph.h:227
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:216
Represents a directed edge in a PlanarGraph.
Definition: planargraph/DirectedEdge.h:45
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:76
void getNodes(std::vector< Node *> &nodes)
Returns the Nodes in this PlanarGraph.
Definition: planargraph/PlanarGraph.h:172
std::vector< Edge * > * getEdges()
Definition: planargraph/PlanarGraph.h:237
void add(DirectedEdge *dirEdge)
Adds the Edge to this PlanarGraph.
Definition: planargraph/PlanarGraph.h:100
Basic namespace for all GEOS functionalities.
Definition: Angle.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:205
std::vector< Edge * >::iterator edgeBegin()
Returns an iterator to first Edge in this graph.
Definition: planargraph/PlanarGraph.h:216
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:44
NodeMap::container::iterator nodeIterator()
Returns an Iterator over the Nodes in this PlanarGraph.
Definition: planargraph/PlanarGraph.h:136
Node * findNode(const geom::Coordinate &pt)
Returns the Node at the given location, or null if no Node was there.
Definition: planargraph/PlanarGraph.h:126
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:47
PlanarGraph()
Constructs a PlanarGraph without any Edges, DirectedEdges, or Nodes.
Definition: planargraph/PlanarGraph.h:115
Represents a directed graph which is embeddable in a planar surface.
Definition: planargraph/PlanarGraph.h:59