From 176bf81a5f13a748e7449d8ec47ef809d507e9a6 Mon Sep 17 00:00:00 2001 From: pdlotko Date: Thu, 4 May 2017 09:30:04 +0000 Subject: Fixing Marc's comments git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/gudhi_stat@2394 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 24336d02a44474c9aaed8e6ce244f1f6bb2aed3b --- src/Gudhi_stat/test/persistence_lanscapes_test.cpp | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'src/Gudhi_stat/test/persistence_lanscapes_test.cpp') diff --git a/src/Gudhi_stat/test/persistence_lanscapes_test.cpp b/src/Gudhi_stat/test/persistence_lanscapes_test.cpp index e401e075..253b06d7 100644 --- a/src/Gudhi_stat/test/persistence_lanscapes_test.cpp +++ b/src/Gudhi_stat/test/persistence_lanscapes_test.cpp @@ -44,7 +44,7 @@ double epsilon = 0.0000005; BOOST_AUTO_TEST_CASE(check_construction_of_landscape) { - std::vector< std::pair< double , double > > diag = read_standard_persistence_file( "data/file_with_diagram" ); + std::vector< std::pair< double , double > > diag = 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" ); @@ -64,7 +64,7 @@ BOOST_AUTO_TEST_CASE(check_construction_of_landscape_form_gudhi_style_file) BOOST_AUTO_TEST_CASE(check_computations_of_integrals) { - std::vector< std::pair< double , double > > diag = read_standard_persistence_file( "data/file_with_diagram" ); + std::vector< std::pair< double , double > > diag = read_persistence_intervals_in_one_dimension_from_file( "data/file_with_diagram" ); Persistence_landscape p( diag ); double integral = p.compute_integral_of_landscape(); //cerr << integral << " " << 2.34992 << endl; @@ -74,7 +74,7 @@ BOOST_AUTO_TEST_CASE(check_computations_of_integrals) BOOST_AUTO_TEST_CASE(check_computations_of_integrals_for_each_level_separatelly) { - std::vector< std::pair< double , double > > diag = read_standard_persistence_file( "data/file_with_diagram" ); + std::vector< std::pair< double , double > > diag = read_persistence_intervals_in_one_dimension_from_file( "data/file_with_diagram" ); Persistence_landscape p( diag ); std::vector< double > integrals_fir_different_levels; @@ -118,7 +118,7 @@ BOOST_AUTO_TEST_CASE(check_computations_of_integrals_for_each_level_separatelly) BOOST_AUTO_TEST_CASE(check_computations_of_integrals_of_powers_of_landscape) { - std::vector< std::pair< double , double > > diag = read_standard_persistence_file( "data/file_with_diagram" ); + std::vector< std::pair< double , double > > diag = read_persistence_intervals_in_one_dimension_from_file( "data/file_with_diagram" ); Persistence_landscape p( diag ); std::vector integrals_fir_different_powers; @@ -137,7 +137,7 @@ BOOST_AUTO_TEST_CASE(check_computations_of_integrals_of_powers_of_landscape) BOOST_AUTO_TEST_CASE(check_computations_of_values_on_different_points) { - std::vector< std::pair< double , double > > diag = read_standard_persistence_file( "data/file_with_diagram" ); + std::vector< std::pair< double , double > > diag = read_persistence_intervals_in_one_dimension_from_file( "data/file_with_diagram" ); Persistence_landscape p( diag ); @@ -158,7 +158,7 @@ BOOST_AUTO_TEST_CASE(check_computations_of_values_on_different_points) BOOST_AUTO_TEST_CASE(check_computations_sum_differences_and_multiplications) { - std::vector< std::pair< double , double > > diag = read_standard_persistence_file( "data/file_with_diagram" ); + std::vector< std::pair< double , double > > diag = read_persistence_intervals_in_one_dimension_from_file( "data/file_with_diagram" ); Persistence_landscape p( diag ); Persistence_landscape second; second.load_landscape_from_file("data/file_with_landscape_from_file_with_diagram_1" ); @@ -186,7 +186,7 @@ BOOST_AUTO_TEST_CASE(check_computations_sum_differences_and_multiplications) BOOST_AUTO_TEST_CASE(check_computations_of_maxima_and_norms) { - std::vector< std::pair< double , double > > diag = read_standard_persistence_file( "data/file_with_diagram" ); + std::vector< std::pair< double , double > > diag = read_persistence_intervals_in_one_dimension_from_file( "data/file_with_diagram" ); Persistence_landscape p( diag ); Persistence_landscape second; second.load_landscape_from_file("data/file_with_landscape_from_file_with_diagram_1" ); @@ -204,10 +204,10 @@ BOOST_AUTO_TEST_CASE(check_computations_of_maxima_and_norms) BOOST_AUTO_TEST_CASE(check_default_parameters_of_distances ) { - std::vector< std::pair< double , double > > diag = read_standard_persistence_file( "data/file_with_diagram" ); + std::vector< std::pair< double , double > > diag = read_persistence_intervals_in_one_dimension_from_file( "data/file_with_diagram" ); Persistence_landscape p( diag ); - std::vector< std::pair< double , double > > diag1 = read_standard_persistence_file( "data/file_with_diagram_1" ); + std::vector< std::pair< double , double > > diag1 = read_persistence_intervals_in_one_dimension_from_file( "data/file_with_diagram_1" ); Persistence_landscape q( diag1 ); double dist_numeric_limit_max = p.distance( q,std::numeric_limits::max() ); @@ -218,9 +218,9 @@ BOOST_AUTO_TEST_CASE(check_default_parameters_of_distances ) BOOST_AUTO_TEST_CASE(check_computations_of_averages) { - std::vector< std::pair< double , double > > diag = read_standard_persistence_file( "data/file_with_diagram" ); + std::vector< std::pair< double , double > > diag = read_persistence_intervals_in_one_dimension_from_file( "data/file_with_diagram" ); Persistence_landscape p( diag ); - std::vector< std::pair< double , double > > diag2 = read_standard_persistence_file( "data/file_with_diagram_1" ); + std::vector< std::pair< double , double > > diag2 = read_persistence_intervals_in_one_dimension_from_file( "data/file_with_diagram_1" ); Persistence_landscape q( diag2 ); Persistence_landscape av; av.compute_average( {&p,&q} ); @@ -235,9 +235,9 @@ BOOST_AUTO_TEST_CASE(check_computations_of_averages) BOOST_AUTO_TEST_CASE(check_computations_of_distances) { - std::vector< std::pair< double , double > > diag = read_standard_persistence_file( "data/file_with_diagram" ); + std::vector< std::pair< double , double > > diag = read_persistence_intervals_in_one_dimension_from_file( "data/file_with_diagram" ); Persistence_landscape p( diag ); - std::vector< std::pair< double , double > > diag2 = read_standard_persistence_file( "data/file_with_diagram_1" ); + std::vector< std::pair< double , double > > diag2 = read_persistence_intervals_in_one_dimension_from_file( "data/file_with_diagram_1" ); Persistence_landscape q( diag2 ); BOOST_CHECK( fabs( p.distance( q )- 25.5824) <= 0.00005 ); BOOST_CHECK( fabs( p.distance( q , 2) - 2.12636 ) <= 0.00001 ); @@ -247,9 +247,9 @@ BOOST_AUTO_TEST_CASE(check_computations_of_distances) BOOST_AUTO_TEST_CASE(check_computations_of_scalar_product) { - std::vector< std::pair< double , double > > diag = read_standard_persistence_file( "data/file_with_diagram" ); + std::vector< std::pair< double , double > > diag = read_persistence_intervals_in_one_dimension_from_file( "data/file_with_diagram" ); Persistence_landscape p( diag ); - std::vector< std::pair< double , double > > diag2 = read_standard_persistence_file( "data/file_with_diagram_1" ); + std::vector< std::pair< double , double > > diag2 = read_persistence_intervals_in_one_dimension_from_file( "data/file_with_diagram_1" ); Persistence_landscape q( diag2 ); BOOST_CHECK( fabs( p.compute_scalar_product( q ) - 0.754498 ) <= 0.00001 ); } -- cgit v1.2.3