Skip to content

Instantly share code, notes, and snippets.

@tinko92
tinko92 / Readme.txt
Created April 22, 2020 12:45
Benchmarking the speed of side predicates
The following file benchmarks the side predicates found in the current (as of writing this) develop branch of Boost.Geometry.
At best this provides a rough estimate because it is based on artifical data and run in isolation.
I used the following command to compile the program:
g++ -I../geometry/include -O3 -march=native benchmark.cpp
@tinko92
tinko92 / Readme.txt
Last active April 19, 2020 14:32
Verifying the correctness of side_robust
The program below is meant to verify the correctness of the orientation predicate (side strategy) implemented in
boost/geometry/extensions/triangulation/strategies/cartesian/side_robust.hpp .
It depends on Boost, CGAL, MPFR and GMP. Because it uses a Boost.Geometry extension, it requires the develop tree of
Boost.Geometry (at commit 10ecf6565b64800f6935fea81216564b2bbe1598 at the time of writing this).
I compiled it with the command:
g++ -DNDEBUG -lmpfr -lgmp -lCGAL -I/path/to/boost/develop/tree/include -O3 -march=haswell main.cpp
@tinko92
tinko92 / big_polygon.wkt
Last active October 21, 2019 11:15
Rejection sampling via complex hull vs. rejection sampling via envelope
POLYGON((13.8157247310001 48.7664301560001,13.7858557540001 48.724778951,13.7835819910001 48.7152704880001,13.7887496340001 48.7165107230001,13.7993949790001 48.7026097620001,13.8043559160001 48.6995608520001,13.8168616120001 48.6955817670001,13.8035290930001 48.687158508,13.8009452720001 48.6752212530001,13.8062162680001 48.6429234830001,13.8054927980001 48.6261286420001,13.8023922110001 48.6117109180001,13.7961910400001 48.598585104,13.7790344640001 48.573935446,13.7742802330001 48.5692070520001,13.7660120030001 48.5637551880001,13.7580538330001 48.5614814250001,13.7372799070001 48.5592593390001,13.7338692630001 48.559776103,13.725394328 48.5483814500001,13.7165059810001 48.5216905720001,13.714335571 48.5232150270001,13.6733561600001 48.5354881800001,13.6580599360001 48.551094463,13.6418335370001 48.5591043090001,13.6243669020001 48.565357158,13.5207039790001 48.5845807910001,13.4872176520001 48.581583557,13.4545581460001 48.5734445190001,13.4455664470001 48.5679151410001,13.4400887450001 48.560964661,13.44