From c89ae478ea5d6685c862533fac1aea973e9cda02 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Tue, 31 Jul 2018 14:33:49 +0000 Subject: Add unitary tests and documentation Fix debug exception mechanism git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/alpha_complex_3d_module_vincent@3712 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 43f66f3843981ab9cd74c117c2b1c6bb9b94810b --- src/Alpha_complex/include/gudhi/Alpha_complex_3d.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/Alpha_complex/include/gudhi/Alpha_complex_3d.h') diff --git a/src/Alpha_complex/include/gudhi/Alpha_complex_3d.h b/src/Alpha_complex/include/gudhi/Alpha_complex_3d.h index f37c0816..15acd7bd 100644 --- a/src/Alpha_complex/include/gudhi/Alpha_complex_3d.h +++ b/src/Alpha_complex/include/gudhi/Alpha_complex_3d.h @@ -216,8 +216,8 @@ public: static_assert(AlphaComplex3dOptions::periodic, "This constructor is not available for non-periodic versions of Alpha_complex_3d"); // Checking if the cuboid is the same in x,y and z direction. If not, CGAL will not process it. - GUDHI_CHECK((x_max - x_min == y_max - y_min) || - (x_max - x_min == z_max - z_min) || + GUDHI_CHECK((x_max - x_min == y_max - y_min) && + (x_max - x_min == z_max - z_min) && (z_max - z_min == y_max - y_min), std::invalid_argument("The size of the cuboid in every directions is not the same.")); @@ -295,8 +295,8 @@ public: GUDHI_CHECK((weights.size() == points.size()), std::invalid_argument("Points number in range different from weights range number")); // Checking if the cuboid is the same in x,y and z direction. If not, CGAL will not process it. - GUDHI_CHECK((x_max - x_min == y_max - y_min) || - (x_max - x_min == z_max - z_min) || + GUDHI_CHECK((x_max - x_min == y_max - y_min) && + (x_max - x_min == z_max - z_min) && (z_max - z_min == y_max - y_min), std::invalid_argument("The size of the cuboid in every directions is not the same.")); @@ -312,7 +312,7 @@ public: #endif while ((index < weights.size()) && (index < points.size())) { - GUDHI_CHECK((weights[index] < maximal_possible_weight) || (weights[index] >= 0), + GUDHI_CHECK((weights[index] < maximal_possible_weight) && (weights[index] >= 0), std::invalid_argument("Invalid weight at line" + std::to_string(index + 1) + ". Must be positive and less than maximal possible weight = 1/64*cuboid length " "squared, which is not an acceptable input.")); -- cgit v1.2.3