8using boost::geometry::area;
9using boost::geometry::intersection;
64 isSame &= (
a.x == b.x);
65 isSame &= (
a.y == b.y);
103 if (w_x<=0 || w_y<=0){
105 return StatusCode::FAILURE;
114 return StatusCode::SUCCESS;
152 return StatusCode::FAILURE;
158 construct_voronoi(mypts.begin(), mypts.end(), &vd);
163 int csi = cell.source_index();
167 int csi_ngbr = edge->twin()->cell()->source_index() ;
168 if (edge->is_primary()){
177 }
while (edge != cell.incident_edge() );
198 double den = std::abs(in)+std::abs(out);
199 if (den < std::numeric_limits<double>::epsilon())
return true;
200 if ( fabs(in-out)/den > 1e4) {
210 double sum = 0;
for (
double voroarea :
m_area_cells) sum+=voroarea;
217 return StatusCode::FAILURE;
219 return StatusCode::SUCCESS;
225 std::deque<VoronoiPolygonBoost> pol3;
230 if ( !pol3.empty() ){
235 return area(pol3.at(0));
#define ATH_MSG_WARNING(x)
boost::geometry::model::d2::point_xy< double > VoronoiPointBoost
boost::polygon::voronoi_diagram< double >::cell_type VoronoiCellBoost
boost::polygon::voronoi_diagram< double >::edge_type VoronoiEdgeBoost
boost::polygon::voronoi_diagram< double >::vertex_type VoronoiVtxBoost
boost::polygon::voronoi_diagram< double > VoronoiBoost
Jakub Cuth May 2015.
boost::geometry::model::polygon< VoronoiPointBoost > VoronoiPolygonBoost
std::vector< std::string > intersection(std::vector< std::string > &v1, std::vector< std::string > &v2)
std::string description
glabal timer - how long have I taken so far?
bool operator!=(const Point &a, const Point &b)
Point Center(const Point &a, const Point &b)
Point operator+(const Point &a, const Point &b)
Point operator-(const Point &a, const Point &b)
bool operator==(const Point &a, const Point &b)
Point Norm(const Point &a)
Point operator*(double a, const Point &b)
double coord
Type of coordination system.
hold the test vectors and ease the comparison
size_t findPointIndex(const Point &a) const
StatusCode checkStatus(const VoronoiBoost &vd, size_t n_cells_processed)
bool checkSameNumber(double in, double out, const std::string &description)
Point interpolateInfinityVertex(const int i_a, const int i_b)
std::vector< double > m_area_cells
float getCellArea(const coord x, const coord y) const
StatusCode createVoronoiDiagram()
StatusCode initialize()
Dummy implementation of the initialisation function.
double intersectionAndArea(JetVoronoiDiagramHelpers::Polygon const &geo1, JetVoronoiDiagramHelpers::Polygon const &geo2, JetVoronoiDiagramHelpers::Polygon &out)
Diagram(const std::string &name)
Default object of 2D space.
List of points in 2D space.
void Add(coord x, coord y)
void FillVoroPolygon(VoronoiPolygonBoost &out) const