EdgeGraph.h
/**********************************************************************
*
* GEOS - Geometry Engine Open Source
* http://geos.osgeo.org
*
* Copyright (C) 2020 Paul Ramsey <pramsey@cleverelephant.ca>
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Public Licence as published
* by the Free Software Foundation.
* See the COPYING file for more information.
*
**********************************************************************/
#pragma once
#include <geos/edgegraph/HalfEdge.h>
#include <geos/export.h>
#include <string>
#include <cassert>
#include <map>
#include <array>
#include <memory>
#include <vector>
#undef EDGEGRAPH_HEAPHACK
namespace geos {
namespace edgegraph { // geos.edgegraph
class GEOS_DLL EdgeGraph {
private:
std::deque<HalfEdge> edges;
std::map<geom::CoordinateXY, HalfEdge*> vertexMap;
HalfEdge* create(const geom::CoordinateXYZM& p0, const geom::CoordinateXYZM& p1);
protected:
virtual HalfEdge* createEdge(const geom::CoordinateXYZM& orig);
HalfEdge* insert(const geom::CoordinateXYZM& orig, const geom::CoordinateXYZM& dest, HalfEdge* eAdj);
public:
EdgeGraph() {};
virtual ~EdgeGraph() = default;
HalfEdge* addEdge(const geom::CoordinateXYZM& orig, const geom::CoordinateXYZM& dest);
static bool isValidEdge(const geom::CoordinateXY& orig, const geom::CoordinateXY& dest);
void getVertexEdges(std::vector<const HalfEdge*>& edgesOut);
HalfEdge* findEdge(const geom::CoordinateXY& orig, const geom::CoordinateXY& dest);
};
} // namespace geos.edgegraph
} // namespace geos
geos::edgegraph::EdgeGraph
Definition EdgeGraph.h:51
geos::edgegraph::EdgeGraph::isValidEdge
static bool isValidEdge(const geom::CoordinateXY &orig, const geom::CoordinateXY &dest)
geos::edgegraph::EdgeGraph::insert
HalfEdge * insert(const geom::CoordinateXYZM &orig, const geom::CoordinateXYZM &dest, HalfEdge *eAdj)
geos::edgegraph::EdgeGraph::addEdge
HalfEdge * addEdge(const geom::CoordinateXYZM &orig, const geom::CoordinateXYZM &dest)
geos::edgegraph::EdgeGraph::createEdge
virtual HalfEdge * createEdge(const geom::CoordinateXYZM &orig)
geos::edgegraph::EdgeGraph::findEdge
HalfEdge * findEdge(const geom::CoordinateXY &orig, const geom::CoordinateXY &dest)
geos::edgegraph::EdgeGraph::EdgeGraph
EdgeGraph()
Definition EdgeGraph.h:88
geos::edgegraph::HalfEdge
Definition HalfEdge.h:56
geos
Basic namespace for all GEOS functionalities.
Definition geos.h:38