summaryrefslogtreecommitdiff
path: root/src/Persistence_representations/test/persistence_lanscapes_test.cpp
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2018-01-08 14:04:26 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2018-01-08 14:04:26 +0000
commit97a6bdd67d8cff9bc8c0126df86be044d393583c (patch)
tree499987f6d0484e2ecccebc846ae288938c1da704 /src/Persistence_representations/test/persistence_lanscapes_test.cpp
parent8ce961c5d86845613a196e2a5b1e3ea724698d88 (diff)
clang-format files
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@3118 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: c8371fc65da4f9912b602a4f3a6701661e46580e
Diffstat (limited to 'src/Persistence_representations/test/persistence_lanscapes_test.cpp')
-rw-r--r--src/Persistence_representations/test/persistence_lanscapes_test.cpp60
1 files changed, 17 insertions, 43 deletions
diff --git a/src/Persistence_representations/test/persistence_lanscapes_test.cpp b/src/Persistence_representations/test/persistence_lanscapes_test.cpp
index e7267bec..e98ef894 100644
--- a/src/Persistence_representations/test/persistence_lanscapes_test.cpp
+++ b/src/Persistence_representations/test/persistence_lanscapes_test.cpp
@@ -35,12 +35,12 @@ using namespace Gudhi::Persistence_representations;
double epsilon = 0.0005;
-BOOST_AUTO_TEST_CASE(check_construction_of_landscape) {
+BOOST_AUTO_TEST_CASE(check_construction_of_landscape) {
std::vector<std::pair<double, double> > diag =
- read_persistence_intervals_in_one_dimension_from_file("data/file_with_diagram");
+ read_persistence_intervals_in_one_dimension_from_file("data/file_with_diagram");
Persistence_landscape p(diag);
- Persistence_landscape q;
- q.load_landscape_from_file("data/file_with_landscape_from_file_with_diagram");
+ Persistence_landscape q;
+ q.load_landscape_from_file("data/file_with_landscape_from_file_with_diagram");
BOOST_CHECK(p == q);
}
@@ -48,12 +48,10 @@ BOOST_AUTO_TEST_CASE(check_construction_of_landscape_form_gudhi_style_file) {
Persistence_landscape p("data/persistence_file_with_four_entries_per_line", 1);
// p.print_to_file("persistence_file_with_four_entries_per_line_landscape");
Persistence_landscape q;
- q.load_landscape_from_file("data/persistence_file_with_four_entries_per_line_landscape");
+ q.load_landscape_from_file("data/persistence_file_with_four_entries_per_line_landscape");
BOOST_CHECK(p == q);
}
-
-
BOOST_AUTO_TEST_CASE(check_computations_of_integrals) {
std::vector<std::pair<double, double> > diag =
read_persistence_intervals_in_one_dimension_from_file("data/file_with_diagram");
@@ -123,18 +121,18 @@ BOOST_AUTO_TEST_CASE(check_computations_of_values_on_different_points) {
read_persistence_intervals_in_one_dimension_from_file("data/file_with_diagram");
Persistence_landscape p(diag);
- GUDHI_TEST_FLOAT_EQUALITY_CHECK(p.compute_value_at_a_given_point(1, 0.0), 0. , epsilon);
+ GUDHI_TEST_FLOAT_EQUALITY_CHECK(p.compute_value_at_a_given_point(1, 0.0), 0., epsilon);
GUDHI_TEST_FLOAT_EQUALITY_CHECK(p.compute_value_at_a_given_point(1, 0.1), 0.0692324, epsilon);
- GUDHI_TEST_FLOAT_EQUALITY_CHECK(p.compute_value_at_a_given_point(1, 0.2), 0.163369 , epsilon);
- GUDHI_TEST_FLOAT_EQUALITY_CHECK(p.compute_value_at_a_given_point(1, 0.3), 0.217115 , epsilon);
- GUDHI_TEST_FLOAT_EQUALITY_CHECK(p.compute_value_at_a_given_point(2, 0.0), 0. , epsilon);
+ GUDHI_TEST_FLOAT_EQUALITY_CHECK(p.compute_value_at_a_given_point(1, 0.2), 0.163369, epsilon);
+ GUDHI_TEST_FLOAT_EQUALITY_CHECK(p.compute_value_at_a_given_point(1, 0.3), 0.217115, epsilon);
+ GUDHI_TEST_FLOAT_EQUALITY_CHECK(p.compute_value_at_a_given_point(2, 0.0), 0., epsilon);
GUDHI_TEST_FLOAT_EQUALITY_CHECK(p.compute_value_at_a_given_point(2, 0.1), 0.0633688, epsilon);
- GUDHI_TEST_FLOAT_EQUALITY_CHECK(p.compute_value_at_a_given_point(2, 0.2), 0.122361 , epsilon);
- GUDHI_TEST_FLOAT_EQUALITY_CHECK(p.compute_value_at_a_given_point(2, 0.3), 0.195401 , epsilon);
- GUDHI_TEST_FLOAT_EQUALITY_CHECK(p.compute_value_at_a_given_point(3, 0.0), 0. , epsilon);
+ GUDHI_TEST_FLOAT_EQUALITY_CHECK(p.compute_value_at_a_given_point(2, 0.2), 0.122361, epsilon);
+ GUDHI_TEST_FLOAT_EQUALITY_CHECK(p.compute_value_at_a_given_point(2, 0.3), 0.195401, epsilon);
+ GUDHI_TEST_FLOAT_EQUALITY_CHECK(p.compute_value_at_a_given_point(3, 0.0), 0., epsilon);
GUDHI_TEST_FLOAT_EQUALITY_CHECK(p.compute_value_at_a_given_point(3, 0.1), 0.0455386, epsilon);
GUDHI_TEST_FLOAT_EQUALITY_CHECK(p.compute_value_at_a_given_point(3, 0.2), 0.0954012, epsilon);
- GUDHI_TEST_FLOAT_EQUALITY_CHECK(p.compute_value_at_a_given_point(3, 0.3), 0.185282 , epsilon);
+ GUDHI_TEST_FLOAT_EQUALITY_CHECK(p.compute_value_at_a_given_point(3, 0.3), 0.185282, epsilon);
}
BOOST_AUTO_TEST_CASE(check_computations_sum_differences_and_multiplications) {
@@ -170,14 +168,14 @@ BOOST_AUTO_TEST_CASE(check_computations_of_maxima_and_norms) {
second.load_landscape_from_file("data/file_with_landscape_from_file_with_diagram_1");
Persistence_landscape sum = p + second;
- GUDHI_TEST_FLOAT_EQUALITY_CHECK(p.compute_maximum() , 0.431313, epsilon);
- GUDHI_TEST_FLOAT_EQUALITY_CHECK(p.compute_norm_of_landscape(1), 2.34992 , epsilon);
+ GUDHI_TEST_FLOAT_EQUALITY_CHECK(p.compute_maximum(), 0.431313, epsilon);
+ GUDHI_TEST_FLOAT_EQUALITY_CHECK(p.compute_norm_of_landscape(1), 2.34992, epsilon);
GUDHI_TEST_FLOAT_EQUALITY_CHECK(p.compute_norm_of_landscape(2), 0.706095, epsilon);
GUDHI_TEST_FLOAT_EQUALITY_CHECK(p.compute_norm_of_landscape(3), 0.501867, epsilon);
GUDHI_TEST_FLOAT_EQUALITY_CHECK(compute_distance_of_landscapes(p, sum, 1), 27.9323, epsilon);
GUDHI_TEST_FLOAT_EQUALITY_CHECK(compute_distance_of_landscapes(p, sum, 2), 2.35199, epsilon);
- GUDHI_TEST_FLOAT_EQUALITY_CHECK(compute_distance_of_landscapes(p, sum, std::numeric_limits<double>::max()),
- 0.464478, epsilon);
+ GUDHI_TEST_FLOAT_EQUALITY_CHECK(compute_distance_of_landscapes(p, sum, std::numeric_limits<double>::max()), 0.464478,
+ epsilon);
}
BOOST_AUTO_TEST_CASE(check_default_parameters_of_distances) {
@@ -232,30 +230,6 @@ BOOST_AUTO_TEST_CASE(check_computations_of_scalar_product) {
GUDHI_TEST_FLOAT_EQUALITY_CHECK(p.compute_scalar_product(q), 0.754498, epsilon);
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
// Below I am storing the code used to generate tests for that functionality.
/*
if ( argc != 2 )