summaryrefslogtreecommitdiff
path: root/src/Alpha_complex/include/gudhi/Alpha_complex.h
diff options
context:
space:
mode:
authorROUVREAU Vincent <vincent.rouvreau@inria.fr>2020-09-11 11:55:55 +0200
committerROUVREAU Vincent <vincent.rouvreau@inria.fr>2020-09-11 11:55:55 +0200
commit171ddab9b7a50f0303d7201fa547dbfb445f9698 (patch)
treee8464dd61a45c9c6a84b929e3eb00692f186d6b2 /src/Alpha_complex/include/gudhi/Alpha_complex.h
parent9922407fe6f5d8872522157555c3573e95930ac3 (diff)
Requires CGAL >= 5.1. Fix is_gabriel computation
Diffstat (limited to 'src/Alpha_complex/include/gudhi/Alpha_complex.h')
-rw-r--r--src/Alpha_complex/include/gudhi/Alpha_complex.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Alpha_complex/include/gudhi/Alpha_complex.h b/src/Alpha_complex/include/gudhi/Alpha_complex.h
index 8e9fe773..4316d9bc 100644
--- a/src/Alpha_complex/include/gudhi/Alpha_complex.h
+++ b/src/Alpha_complex/include/gudhi/Alpha_complex.h
@@ -210,6 +210,11 @@ class Alpha_complex {
<< std::endl;
#endif
+#if CGAL_VERSION_NR < 1050101000
+ // Make compilation fail if weighted and CGAL < 5.1
+ static_assert(!Weighted, "Weighted Alpha_complex is only available for CGAL >= 5.1");
+#endif
+
auto first = std::begin(points);
auto last = std::end(points);
@@ -457,8 +462,7 @@ class Alpha_complex {
while(shortiter != enditer && *longiter == *shortiter) { ++longiter; ++shortiter; }
Vertex_handle extra = *longiter;
auto const& cache=get_cache(complex, f_boundary);
- bool is_gab = kernel_.get_squared_distance(kernel_.get_circumcenter(cache), get_point_(extra)) >=
- kernel_.get_squared_radius(cache);
+ bool is_gab = kernel_.is_gabriel(cache, get_point_(extra));
#ifdef DEBUG_TRACES
std::clog << " | Tau is_gabriel(Sigma)=" << is_gab << " - vertexForGabriel=" << extra << std::endl;
#endif // DEBUG_TRACES