19 #ifndef GEOS_PLANARGRAPH_PLANARGRAPH_H 20 #define GEOS_PLANARGRAPH_PLANARGRAPH_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 {
103 dirEdges.push_back(dirEdge);
129 return nodeMap.
find(pt);
136 NodeMap::container::iterator
139 return nodeMap.
begin();
142 NodeMap::container::iterator
145 return nodeMap.
begin();
148 NodeMap::container::const_iterator
151 return nodeMap.
begin();
154 NodeMap::container::iterator
157 return nodeMap.
end();
160 NodeMap::container::const_iterator
163 return nodeMap.
end();
186 std::vector<DirectedEdge*>::iterator
189 return dirEdges.begin();
193 std::vector<Edge*>::iterator
196 return edges.begin();
204 std::vector<Edge*>::iterator
207 return edges.begin();
215 std::vector<Edge*>::iterator
240 void remove(
Edge* edge);
258 void remove(
Node* node);
265 std::vector<Node*>* findNodesOfDegree(std::size_t degree);
273 void findNodesOfDegree(std::size_t degree, std::vector<Node*>& to);
283 #endif // GEOS_PLANARGRAPH_PLANARGRAPH_H void getNodes(std::vector< Node * > &nodes)
Returns the Nodes in this PlanarGraph.
std::vector< DirectedEdge * >::iterator dirEdgeIterator()
Returns an Iterator over the DirectedEdges in this PlanarGraph, in the order in which they were added...
std::vector< Edge * > EdgeContainer
std::vector< Edge * >::iterator edgeEnd()
Returns an iterator to one-past last Edge in this graph.
Coordinate is the lightweight class used to store coordinates.
Represents a directed edge in a PlanarGraph.
container::iterator begin()
NodeMap::container::const_iterator nodeEnd() const
void add(Node *node)
Adds a node to the std::map, replacing any that is already at that location.
std::vector< Edge * > * getEdges()
NodeMap::container::iterator nodeBegin()
void add(DirectedEdge *dirEdge)
Adds the Edge to this PlanarGraph.
container::iterator end()
NodeMap::container::const_iterator nodeBegin() const
Basic namespace for all GEOS functionalities.
Represents an undirected edge of a PlanarGraph.
std::vector< Edge * >::iterator edgeIterator()
Alias for edgeBegin()
std::vector< Edge * > edges
std::vector< Edge * >::iterator edgeBegin()
Returns an iterator to first Edge in this graph.
EdgeContainer::iterator EdgeIterator
void getNodes(std::vector< Node * > &nodes)
Returns the Nodes in this NodeMap, sorted in ascending order by angle with the positive x-axis...
std::vector< DirectedEdge * > dirEdges
Node * add(Node *n)
Adds a node to the std::map, replacing any that is already at that location.
NodeMap::container::iterator nodeEnd()
A node in a PlanarGraph is a location where 0 or more Edge meet.
NodeMap::container::iterator nodeIterator()
Returns an Iterator over the Nodes in this PlanarGraph.
Node * findNode(const geom::Coordinate &pt)
Returns the Node at the given location, or null if no Node was there.
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.
PlanarGraph()
Constructs a PlanarGraph without any Edges, DirectedEdges, or Nodes.
Represents a directed graph which is embeddable in a planar surface.