25#include <CGAL/Delaunay_triangulation_2.h>
26#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
27#include <CGAL/Fuzzy_sphere.h>
28#include <CGAL/Kd_tree.h>
29#include <CGAL/Search_traits_2.h>
30#include <CGAL/Triangulation_face_base_with_id_2.h>
31#include <CGAL/Triangulation_vertex_base_with_info_2.h>
40 using K = CGAL::Exact_predicates_inexact_constructions_kernel;
41 using Vb = CGAL::Triangulation_vertex_base_with_info_2<unsigned int, K>;
42 using Fb = CGAL::Triangulation_face_base_with_id_2<K>;
43 using Tds = CGAL::Triangulation_data_structure_2<Vb, Fb>;
44 using Delaunay = CGAL::Delaunay_triangulation_2<K, Tds>;
45 using Point = Delaunay::Point_2;
46 using Traits = CGAL::Search_traits_2<K>;
47 using Tree = CGAL::Kd_tree<Traits>;
48 using Fuzzy_sphere = CGAL::Fuzzy_sphere<Traits>;
55 void compute0Persistence(T &ph0,
bool parallelSort =
false);
58 void computeDelaunayRips0And1Persistence(T &ph,
bool parallelSort =
false);
61 void computeRips0And1Persistence(T &ph,
62 bool parallelSort =
false,
63 bool parallelMML =
false);
65 void exportRips1Generators(std::vector<Generator1> &generators);
71 std::vector<std::pair<Point, unsigned>> points_;
74 std::vector<FiltratedQuadEdge> urquhart_;
75 std::vector<FiltratedQuadEdge> rng_;
76 std::vector<FiltratedEdge> deathPoly_;
77 std::vector<double> birthPoly_;
80 void computeDelaunay();
81 void computeUrquhart(UnionFind &UF,
82 std::vector<FiltratedEdge> &maxDelaunay,
84 void compute1PH(std::vector<FiltratedQuadEdge>
const &critical,
86 MultidimensionalDiagram &ph);
89 [[nodiscard]]
static bool isLensEmpty(
Point const &p1,
93 [[nodiscard]]
static bool
94 isRightSemiLensEmpty(
Point const &p1,
Point const &p2, Tree
const &tree);
95 void reindexPolygons(UnionFind
const &UF,
96 std::vector<FiltratedEdge>
const &maxDelaunay,
97 std::vector<int> &indexPolys);
98 void computePolygonRipsDeath(
bool parallel,
100 std::vector<int>
const &indexPolys);
101 void pComputePolygonRipsDeath(UnionFind &UF,
102 std::vector<int>
const &indexPolys);
103 void executePolygonPairCells(
bool parallel,
105 std::vector<int>
const &indexPolys,
106 EdgeSets4 &ph)
const;
108 void static add0Pair(FiltratedQuadEdge
const &e, Diagram &ph) {
109 ph.emplace_back(FiltratedSimplex{{-1}, 0},
110 FiltratedSimplex{{e.e.first, e.e.second}, e.d});
113 void static add0Pair(FiltratedQuadEdge
const &e, EdgeSet &ph) {
114 ph.emplace_back(e.e);
boost::tuple< double, double > Point
TTK base class that computes the persistence diagram of a Rips complex of a planar point cloud using ...