diff options
author | pdlotko <pdlotko@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2017-05-04 09:30:04 +0000 |
---|---|---|
committer | pdlotko <pdlotko@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2017-05-04 09:30:04 +0000 |
commit | 176bf81a5f13a748e7449d8ec47ef809d507e9a6 (patch) | |
tree | b572459dd9b250e26a8fbceaf0ee8848de08a787 /src/Gudhi_stat/test | |
parent | 51cce89377cd64a1726f0b281dff8e54fd15a0e2 (diff) |
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
Diffstat (limited to 'src/Gudhi_stat/test')
-rw-r--r-- | src/Gudhi_stat/test/CMakeLists.txt | 5 | ||||
-rw-r--r-- | src/Gudhi_stat/test/persistence_lanscapes_on_grid_test.cpp | 4 | ||||
-rw-r--r-- | src/Gudhi_stat/test/persistence_lanscapes_test.cpp | 30 | ||||
-rw-r--r-- | src/Gudhi_stat/test/vector_representation_test.cpp | 6 |
4 files changed, 25 insertions, 20 deletions
diff --git a/src/Gudhi_stat/test/CMakeLists.txt b/src/Gudhi_stat/test/CMakeLists.txt index 62335c77..b8e9cc48 100644 --- a/src/Gudhi_stat/test/CMakeLists.txt +++ b/src/Gudhi_stat/test/CMakeLists.txt @@ -113,3 +113,8 @@ add_test(NAME persistence_intervals_with_distances_test # XML format for Jenkins xUnit plugin --log_format=XML --log_sink=${CMAKE_SOURCE_DIR}/persistence_intervals_with_distances_test_UT.xml --log_level=test_suite --report_level=no) endif (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1) + + + +#add_executable ( private_test private_test.cpp ) +#target_link_libraries(private_test ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) 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 971993ed..865a8280 100644 --- a/src/Gudhi_stat/test/persistence_lanscapes_on_grid_test.cpp +++ b/src/Gudhi_stat/test/persistence_lanscapes_on_grid_test.cpp @@ -229,10 +229,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_on_grid p( diag , 0. , 1. , 100 ); - 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_on_grid q( diag1 , 0. , 1. , 100 ); double dist_numeric_limit_max = p.distance( q,std::numeric_limits<double>::max() ); 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<double> 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<double>::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 ); } diff --git a/src/Gudhi_stat/test/vector_representation_test.cpp b/src/Gudhi_stat/test/vector_representation_test.cpp index 3ef3427c..5e185445 100644 --- a/src/Gudhi_stat/test/vector_representation_test.cpp +++ b/src/Gudhi_stat/test/vector_representation_test.cpp @@ -21,7 +21,7 @@ */ -#include <gudhi/persistence_vectors.h> +#include <gudhi/Persistence_vectors.h> #include <gudhi/common_persistence_representations.h> #include <iostream> @@ -319,10 +319,10 @@ BOOST_AUTO_TEST_CASE(check_distance_computations) 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" ); Vector_distances_in_diagram< Euclidean_distance > p( diag , 100 ); - 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" ); Vector_distances_in_diagram< Euclidean_distance > q( diag1 , 100 ); double dist_numeric_limit_max = p.distance( q,std::numeric_limits<double>::max() ); |