summaryrefslogtreecommitdiff
path: root/src/Gudhi_stat/test/persistence_lanscapes_on_grid_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Gudhi_stat/test/persistence_lanscapes_on_grid_test.cpp')
-rw-r--r--src/Gudhi_stat/test/persistence_lanscapes_on_grid_test.cpp20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/Gudhi_stat/test/persistence_lanscapes_on_grid_test.cpp b/src/Gudhi_stat/test/persistence_lanscapes_on_grid_test.cpp
index e935cb97..971993ed 100644
--- a/src/Gudhi_stat/test/persistence_lanscapes_on_grid_test.cpp
+++ b/src/Gudhi_stat/test/persistence_lanscapes_on_grid_test.cpp
@@ -23,7 +23,7 @@
#define BOOST_TEST_DYN_LINK
-#define BOOST_TEST_MODULE "gudhi_stat"
+#define BOOST_TEST_MODULE "Persistence_representations"
#include <boost/test/unit_test.hpp>
#include <gudhi/reader_utils.h>
#include <gudhi/Persistence_landscape_on_grid.h>
@@ -36,10 +36,6 @@ using namespace Gudhi;
using namespace Gudhi::Persistence_representations;
-double epsilon = 0.0000005;
-
-
-
BOOST_AUTO_TEST_CASE(check_construction_of_landscape)
@@ -231,6 +227,20 @@ BOOST_AUTO_TEST_CASE(check_computations_of_maxima_and_norms)
BOOST_CHECK( fabs(compute_distance_of_landscapes_on_grid(p,sum,std::numeric_limits<double>::max()) - 0.45 ) <= 0.00001 );
}
+BOOST_AUTO_TEST_CASE(check_default_parameters_of_distances )
+{
+ std::vector< std::pair< double , double > > diag = read_standard_persistence_file( "data/file_with_diagram" );
+ Persistence_landscape_on_grid p( diag , 0. , 1. , 100 );
+
+ std::vector< std::pair< double , double > > diag1 = read_standard_persistence_file( "data/file_with_diagram_1" );
+ Persistence_landscape_on_grid q( diag1 , 0. , 1. , 100 );
+
+ double dist_numeric_limit_max = p.distance( q,std::numeric_limits<double>::max() );
+ double dist_infinity = p.distance( q,std::numeric_limits<double>::infinity() );
+
+ BOOST_CHECK( dist_numeric_limit_max == dist_infinity );
+}
+