GEOS 3.14.0dev
Public Types | Public Member Functions | List of all members
geos::planargraph::NodeMap Class Reference

A map of Node, indexed by the coordinate of the node. More...

#include <NodeMap.h>

Public Types

typedef std::map< geom::Coordinate, Node *, geom::CoordinateLessThancontainer
 

Public Member Functions

 NodeMap ()
 Constructs a NodeMap without any Nodes.
 
container & getNodeMap ()
 
Nodeadd (Node *n)
 Adds a node to the std::map, replacing any that is already at that location.
 
Noderemove (geom::Coordinate &pt)
 Removes the Node at the given location, and returns it (or null if no Node was there).
 
Nodefind (const geom::Coordinate &coord)
 Returns the Node at the given location, or null if no Node was there.
 
container::iterator iterator ()
 Returns an Iterator over the Nodes in this NodeMap, sorted in ascending order by angle with the positive x-axis.
 
container::iterator begin ()
 
container::const_iterator begin () const
 
container::iterator end ()
 
container::const_iterator end () const
 
void getNodes (std::vector< Node * > &nodes)
 Returns the Nodes in this NodeMap, sorted in ascending order by angle with the positive x-axis.
 

Detailed Description

A map of Node, indexed by the coordinate of the node.

Member Function Documentation

◆ add()

Node * geos::planargraph::NodeMap::add ( Node n)

Adds a node to the std::map, replacing any that is already at that location.

Returns
the added node

Referenced by geos::planargraph::PlanarGraph::add().

◆ getNodes()

void geos::planargraph::NodeMap::getNodes ( std::vector< Node * > &  nodes)

Returns the Nodes in this NodeMap, sorted in ascending order by angle with the positive x-axis.

Parameters
nodes: the nodes are push_back'ed here

Referenced by geos::planargraph::PlanarGraph::getNodes().


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