GEOS 3.11.1
|
#include <EdgeGraph.h>
Public Member Functions | |
EdgeGraph () | |
HalfEdge * | addEdge (const geom::Coordinate &orig, const geom::Coordinate &dest) |
void | getVertexEdges (std::vector< const HalfEdge * > &edgesOut) |
HalfEdge * | findEdge (const geom::Coordinate &orig, const geom::Coordinate &dest) |
Static Public Member Functions | |
static bool | isValidEdge (const geom::Coordinate &orig, const geom::Coordinate &dest) |
Protected Member Functions | |
HalfEdge * | createEdge (const geom::Coordinate &orig) |
HalfEdge * | insert (const geom::Coordinate &orig, const geom::Coordinate &dest, HalfEdge *eAdj) |
A graph comprised of HalfEdge
s. 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::Coordinate & | orig, |
const geom::Coordinate & | 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::Coordinate & | orig, |
const geom::Coordinate & | 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 |