GEOS
3.14.0dev
|
#include <EdgeGraph.h>
Public Member Functions | |
EdgeGraph () | |
HalfEdge * | addEdge (const geom::CoordinateXYZM &orig, const geom::CoordinateXYZM &dest) |
void | getVertexEdges (std::vector< const HalfEdge * > &edgesOut) |
HalfEdge * | findEdge (const geom::CoordinateXY &orig, const geom::CoordinateXY &dest) |
Static Public Member Functions | |
static bool | isValidEdge (const geom::CoordinateXY &orig, const geom::CoordinateXY &dest) |
Protected Member Functions | |
HalfEdge * | createEdge (const geom::CoordinateXYZM &orig) |
HalfEdge * | insert (const geom::CoordinateXYZM &orig, const geom::CoordinateXYZM &dest, HalfEdge *eAdj) |
A graph comprised of HalfEdges. It supports tracking the vertices in the graph via edges incident on them, to allow efficient lookup of edges and vertices.
This class may be subclassed to use a different subclass of HalfEdge, by overriding createEdge. If additional logic is required to initialize edges then addEdge can be overridden as well.
|
inline |
Initialized
HalfEdge* geos::edgegraph::EdgeGraph::addEdge | ( | const geom::CoordinateXYZM & | orig, |
const geom::CoordinateXYZM & | dest | ||
) |
Adds an edge between the coordinates orig and dest to this graph. Only valid edges can be added (in particular, zero-length segments cannot be added)
orig | the edge origin location |
dest | the edge destination location. |
|
protected |
HalfEdge* geos::edgegraph::EdgeGraph::findEdge | ( | const geom::CoordinateXY & | orig, |
const geom::CoordinateXY & | dest | ||
) |
Finds an edge in this graph with the given origin and destination, if one exists.
orig | the origin location |
dest | the destination location. |
|
protected |
Inserts an edge not already present into the graph.
orig | the edge origin location |
dest | the edge destination location |
eAdj | an existing edge with same orig (if any) |
|
static |
Tests if the given coordinates form a valid edge (with non-zero length).
orig | the start coordinate |
dest | the end coordinate |