18#include <geos/export.h>
20#include <geos/planargraph/GraphComponent.h>
21#include <geos/planargraph/DirectedEdgeStar.h>
22#include <geos/geom/Coordinate.h>
44class GEOS_DLL
Node:
public GraphComponent {
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&
112 return deStar.getDegree();
123 return deStar.getIndex(edge);
129 Node& operator=(
const Node&) =
delete;
A sorted collection of DirectedEdge which leave a Node in a PlanarGraph.
Definition planargraph/DirectedEdgeStar.h:42
Represents a directed edge in a PlanarGraph.
Definition planargraph/DirectedEdge.h:45
Represents an undirected edge of a PlanarGraph.
Definition planargraph/Edge.h:55
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
Contains classes to implement a planar graph data structure.
Definition namespaces.h:293
std::ostream & operator<<(std::ostream &, const DirectedEdge &)
Output operator.
Basic namespace for all GEOS functionalities.
Definition geos.h:38