diff options
author | Vincent Rouvreau <vincent.rouvreau@inria.fr> | 2023-01-13 14:31:59 +0100 |
---|---|---|
committer | Vincent Rouvreau <vincent.rouvreau@inria.fr> | 2023-01-13 14:31:59 +0100 |
commit | d35581357525d02e3126e9fe901904cc764e1f5c (patch) | |
tree | 736241d96c9bd6813816d3ff2dd37966c85a24e4 /src/Alpha_complex/test/Delaunay_complex_Epick_dynamic_unit_test.cpp | |
parent | a44c1b5d51b3ecfd1a1ef1cacb029f52fbc3de49 (diff) |
code review: was not DRY at all
Diffstat (limited to 'src/Alpha_complex/test/Delaunay_complex_Epick_dynamic_unit_test.cpp')
-rw-r--r-- | src/Alpha_complex/test/Delaunay_complex_Epick_dynamic_unit_test.cpp | 41 |
1 files changed, 3 insertions, 38 deletions
diff --git a/src/Alpha_complex/test/Delaunay_complex_Epick_dynamic_unit_test.cpp b/src/Alpha_complex/test/Delaunay_complex_Epick_dynamic_unit_test.cpp index e04d86bb..956bab41 100644 --- a/src/Alpha_complex/test/Delaunay_complex_Epick_dynamic_unit_test.cpp +++ b/src/Alpha_complex/test/Delaunay_complex_Epick_dynamic_unit_test.cpp @@ -14,44 +14,9 @@ #include <CGAL/Epick_d.h> -#include <vector> -#include <limits> // NaN -#include <cmath> - -#include <gudhi/Alpha_complex.h> -// to construct a simplex_tree from Delaunay_triangulation -#include <gudhi/graph_simplicial_complex.h> -#include <gudhi/Simplex_tree.h> -#include <gudhi/Unitary_tests_utils.h> -#include <gudhi/random_point_generators.h> - -// Use dynamic_dimension_tag for the user to be able to set dimension -typedef CGAL::Epick_d< CGAL::Dynamic_dimension_tag > Inexact_kernel_d; - -using Simplex_tree = Gudhi::Simplex_tree<>; -using Simplex_handle = Simplex_tree::Simplex_handle; +#include "Delaunay_complex_unit_test.h" BOOST_AUTO_TEST_CASE(Delaunay_complex_inexact_kernel_dynamic_simplices_comparison) { - std::cout << "*****************************************************************************************************"; - using Point = typename Inexact_kernel_d::Point_d; - std::vector<Point> points; - // 50 points on a 4-sphere - points = Gudhi::generate_points_on_sphere_d<Inexact_kernel_d>(10, 5, 1.); - - Gudhi::alpha_complex::Alpha_complex<Inexact_kernel_d> alpha_complex(points); - - // Alpha complex - Simplex_tree stree_from_alpha_complex; - BOOST_CHECK(alpha_complex.create_complex(stree_from_alpha_complex)); - - // Delaunay complex - Simplex_tree stree_from_delaunay_complex; - BOOST_CHECK(alpha_complex.create_complex(stree_from_delaunay_complex, 0., false, true)); - - // Check all the simplices from alpha complex are in the Delaunay complex - for (auto f_simplex : stree_from_alpha_complex.complex_simplex_range()) { - Simplex_handle sh = stree_from_delaunay_complex.find(stree_from_alpha_complex.simplex_vertex_range(f_simplex)); - BOOST_CHECK(std::isnan(stree_from_delaunay_complex.filtration(sh))); - BOOST_CHECK(sh != stree_from_delaunay_complex.null_simplex()); - } + // Use dynamic_dimension_tag for the user to be able to set dimension + compare_delaunay_complex_simplices<CGAL::Epick_d< CGAL::Dynamic_dimension_tag >>(); } |