18#include <geos/export.h>
20#include <geos/planargraph/GraphComponent.h>
21#include <geos/planargraph/DirectedEdgeStar.h>
22#include <geos/geom/Coordinate.h>
26namespace planargraph {
33namespace planargraph {
48 geom::CoordinateXY
pt;
55 friend std::ostream& operator << (std::ostream& os,
const Node&);
65 explicit Node(
const geom::CoordinateXY& newPt)
70 ~Node()
override =
default;
75 const geom::CoordinateXY&
129 Node& operator=(
const Node&) =
delete;
A sorted collection of DirectedEdge which leave a Node in a PlanarGraph.
Definition planargraph/DirectedEdgeStar.h:42
void add(DirectedEdge *de)
Adds a new member to this DirectedEdgeStar.
std::size_t getDegree() const
Returns the number of edges around the Node associated with this DirectedEdgeStar.
Definition planargraph/DirectedEdgeStar.h:98
int getIndex(const Edge *edge) const
Returns the zero-based index of the given Edge, after sorting in ascending order by angle with the po...
Represents a directed edge in a PlanarGraph.
Definition planargraph/DirectedEdge.h:45
Represents an undirected edge of a PlanarGraph.
Definition planargraph/Edge.h:55
The base class for all graph component classes.
Definition planargraph/GraphComponent.h:45
A node in a PlanarGraph is a location where 0 or more Edge meet.
Definition planargraph/Node.h:44
static std::vector< Edge * > getEdgesBetween(const Node *node0, const Node *node1)
Returns all Edges that connect the two nodes (which are assumed to be different).
Node(const geom::CoordinateXY &newPt)
Constructs a Node with the given location.
Definition planargraph/Node.h:65
DirectedEdgeStar deStar
The collection of DirectedEdges that leave this Node.
Definition planargraph/Node.h:51
size_t getDegree() const
Returns the number of edges around this Node.
Definition planargraph/Node.h:110
geom::CoordinateXY pt
The location of this Node.
Definition planargraph/Node.h:48
const geom::CoordinateXY & getCoordinate() const
Returns the location of this Node.
Definition planargraph/Node.h:76
DirectedEdgeStar * getOutEdges()
Returns the collection of DirectedEdges that leave this Node.
Definition planargraph/Node.h:95
void addOutEdge(DirectedEdge *de)
Adds an outgoing DirectedEdge to this Node.
Definition planargraph/Node.h:85
int getIndex(Edge *edge)
Returns the zero-based index of the given Edge, after sorting in ascending order by angle with the po...
Definition planargraph/Node.h:121
std::ostream & operator<<(std::ostream &, const DirectedEdge &)
Output operator.
Basic namespace for all GEOS functionalities.
Definition geos.h:38