diff options
author | pdlotko <pdlotko@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2017-03-24 20:22:47 +0000 |
---|---|---|
committer | pdlotko <pdlotko@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2017-03-24 20:22:47 +0000 |
commit | ee086a78f61f1ac6dd14ecab6e34d6710c971f64 (patch) | |
tree | 91d7bec2f0d8bca9b84f31d523a82240d79cd12a /src | |
parent | 5b6290423812b24cc3f67a4a8e9c9027b9d95cd6 (diff) |
Answer to Marc's comments.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/gudhi_stat@2240 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: 20c02d536373553322a3e10eb4aacc2959db654a
Diffstat (limited to 'src')
47 files changed, 412 insertions, 436 deletions
diff --git a/src/Gudhi_stat/concept/Topological_data_with_averages.h b/src/Gudhi_stat/concept/Topological_data_with_averages.h index 67433860..aeeb94f0 100644 --- a/src/Gudhi_stat/concept/Topological_data_with_averages.h +++ b/src/Gudhi_stat/concept/Topological_data_with_averages.h @@ -25,6 +25,7 @@ /** \brief The concept Topological_data_with_averages describes the requirements * for a type to implement a container that allows computations of averages. + * Note that the average object after being computed is stored in *this. */ class Topological_data_with_averages { diff --git a/src/Gudhi_stat/concept/Topological_data_with_distances.h b/src/Gudhi_stat/concept/Topological_data_with_distances.h index 536ae821..1318b9d1 100644 --- a/src/Gudhi_stat/concept/Topological_data_with_distances.h +++ b/src/Gudhi_stat/concept/Topological_data_with_distances.h @@ -22,6 +22,10 @@ /** \brief The concept Topological_data_with_distances describes the requirements * for a type to implement a container that allows computations of distance to another contained of that type. + * The second parameter of the distance function allow to declare power of a distance. The exact meaning of that + * number will be different for different distances. A few examples are given below: + * In case of p-Wasserstein distance, the power is equal to p. power = std::limit<double>::max() for bottleneck distance. + * In case of L^p landscape distance, the power is equal to p. s */ class Topological_data_with_distances { diff --git a/src/Gudhi_stat/example/persistence_heat_maps.cpp b/src/Gudhi_stat/example/persistence_heat_maps.cpp index c8dde3cd..0e5f7b79 100644 --- a/src/Gudhi_stat/example/persistence_heat_maps.cpp +++ b/src/Gudhi_stat/example/persistence_heat_maps.cpp @@ -23,7 +23,7 @@ #include <gudhi/reader_utils.h> -#include <gudhi/concretizations/Persistence_heat_maps.h> +#include <gudhi/persistence_representations/Persistence_heat_maps.h> #include <iostream> #include <vector> @@ -91,121 +91,3 @@ int main( int argc , char** argv ) - - - -//Below I am storing the code used to generate tests for that functionality. -/* - std::vector< std::pair< double,double > > intervals; - intervals.push_back( std::make_pair(0.5,0.5) ); - std::vector< std::vector<double> > filter = create_Gaussian_filter(5,1); - Persistence_heat_maps p( intervals , filter , constant_function, false , 100 , 0 , 1 ); - p.plot( "heat_map_1" ); - - - std::vector< std::pair< double,double > > intervals2; - intervals2.push_back( std::make_pair(7,12) ); - Persistence_heat_maps q( intervals2 , filter , constant_function, false , 100 , 0 , 10 ); - q.plot( "heat_map_2" ); -*/ -/* - std::vector< std::pair< double,double > > intervals; - intervals.push_back( std::make_pair(0.5,0.5) ); - std::vector< std::vector<double> > filter = create_Gaussian_filter(5,1); - Persistence_heat_maps p( intervals , filter , constant_function, false , 10 , 0 , 1 ); - p.write_to_file( "aaa" ); - - Persistence_heat_maps q; - q.load_from_file( "aaa" ); - - cerr << ( p == q ) << endl; - */ - -/* - std::vector< std::vector<double> > filter = create_Gaussian_filter(30,1); - Persistence_heat_maps p( "file_with_diagram" , filter , constant_function, false , 100 , 0 , 1 ); - p.plot( "heat_map_1" ); -*/ - -/* - //test to construct persistence heat map: - std::vector< std::vector<double> > filter = create_Gaussian_filter(100,1); - Persistence_heat_maps p( "file_with_diagram" , filter , constant_function, false , 1000 , 0 , 1 ); - p.print_to_file( "persistence_heat_map_from_file_with_diagram" ); - - Persistence_heat_maps q; - q.load_from_file( "persistence_heat_map_from_file_with_diagram" ); - - cerr << (p == q) << endl; -*/ -/* - //test of computations of a mean: - std::vector< std::pair< double,double > > intervals; - intervals.push_back( std::make_pair(5,5) ); - std::vector< std::vector<double> > filter = create_Gaussian_filter(5,1); - Persistence_heat_maps p( intervals , filter , constant_function, false , 100 , 0 , 10 ); - p.plot( "heat_map_1" ); - - - std::vector< std::pair< double,double > > intervals2; - intervals2.push_back( std::make_pair(7,7) ); - Persistence_heat_maps q( intervals2 , filter , constant_function, false , 100 , 0 , 10 ); - q.plot( "heat_map_2" ); - - - Persistence_heat_maps av; - av.compute_average( { &P , &q } ); - av.plot( "average" ); -*/ - -/* - std::vector< std::vector<double> > filter = create_Gaussian_filter(30,1); - Persistence_heat_maps p( "file_with_diagram" , filter , constant_function, false , 1000 , 0 , 10 ); - Persistence_heat_maps q( "file_with_diagram_1" , filter , constant_function, false , 1000 , 0 , 10 ); - Persistence_heat_maps r( "file_with_diagram_2" , filter , constant_function, false , 1000 , 0 , 10 ); - Persistence_heat_maps av; - av.compute_average( {&p,&q,&r} ); - - av.print_to_file( "template_average_of_heat_maps" ); -*/ - -/* - std::vector< std::pair< double,double > > intervals; - intervals.push_back( std::make_pair(5,5) ); - std::vector< std::vector<double> > filter = create_Gaussian_filter(5,1); - Persistence_heat_maps p( intervals , filter , constant_function, false , 10 , 0 , 10 ); - p.plot( "heat_map_1" ); - - std::vector< std::pair< double,double > > intervals2; - intervals2.push_back( std::make_pair(7,7) ); - Persistence_heat_maps q( intervals2 , filter , constant_function, false , 10 , 0 , 10 ); - q.plot( "heat_map_2" ); - - Persistence_heat_maps median; - median.compute_median( {&p,&q} ); - median.plot( "median" ); -*/ - -/* - std::vector< std::vector<double> > filter = create_Gaussian_filter(30,1); - Persistence_heat_maps p( "file_with_diagram" , filter , constant_function, false , 1000 , 0 , 1 ); - Persistence_heat_maps q( "file_with_diagram_1" , filter , constant_function, false , 1000 , 0 , 1 ); - Persistence_heat_maps r( "file_with_diagram_2" , filter , constant_function, false , 1000 , 0 , 1 ); - Persistence_heat_maps median; - median.compute_median( {&p,&q,&r} ); - median.print_to_file( "template_median_of_heat_maps" ); -*/ - - -/* - std::vector< std::vector<double> > filter = create_Gaussian_filter(30,1); - Persistence_heat_maps p( "file_with_diagram" , filter , constant_function, false , 1000 , 0 , 1 ); - Persistence_heat_maps q( "file_with_diagram_1" , filter , constant_function, false , 1000 , 0 , 1 ); - Persistence_heat_maps r( "file_with_diagram_2" , filter , constant_function, false , 1000 , 0 , 1 ); - - Persistence_heat_maps percentage_of_active; - percentage_of_active.compute_percentage_of_active( {&p,&q,&r} , 0.1 ); - - percentage_of_active.print_to_file( "template_percentage_of_active_of_heat_maps" ); - //percentage_of_active.plot( "template_percentage_of_active_of_heat_maps" ); -*/ diff --git a/src/Gudhi_stat/example/persistence_intervals.cpp b/src/Gudhi_stat/example/persistence_intervals.cpp index 044ba3c3..04c758e6 100644 --- a/src/Gudhi_stat/example/persistence_intervals.cpp +++ b/src/Gudhi_stat/example/persistence_intervals.cpp @@ -23,7 +23,7 @@ #include <gudhi/reader_utils.h> -#include <gudhi/concretizations/Persistence_intervals.h> +#include <gudhi/persistence_representations/Persistence_intervals.h> #include <iostream> diff --git a/src/Gudhi_stat/example/persistence_landscape.cpp b/src/Gudhi_stat/example/persistence_landscape.cpp index bb1cecea..9385c408 100644 --- a/src/Gudhi_stat/example/persistence_landscape.cpp +++ b/src/Gudhi_stat/example/persistence_landscape.cpp @@ -22,7 +22,7 @@ -#include <gudhi/concretizations/Persistence_landscape.h> +#include <gudhi/persistence_representations/Persistence_landscape.h> @@ -90,129 +90,3 @@ int main( int argc , char** argv ) return 0; } - -//Below I am storing the code used to generate tests for that functionality. -/* -if ( argc != 2 ) - { - std::cerr << "To run this program, please provide a name of a file with persistence landscape \n"; - //return 1; - } - Persistence_landscape p("../test/data/file_with_diagram"); - - Persistence_landscape q; - q.load_landscape_from_file( "file_with_landscape_from_file_with_diagram" ); - - if ( p != q ) - { - cout << "Not equal \n"; - } - - double integral = p.compute_integral_of_landscape(); - cout << "integral : " << integral <<endl; - - //compute integral for each level separatelly - for ( size_t level = 0 ; level != p.size() ; ++level ) - { - cout << p.compute_integral_of_landscape( level ) << endl; - } - - //compute integral of p-th power of landscspe - for ( size_t power = 0 ; power != 5 ; ++power ) - { - cout << p.compute_integral_of_landscape( power ) << endl; - } - - cout << "Value of level 1 at 0 : " << p.compute_value_at_a_given_point(1,0.0) << endl; - cout << "Value of level 1 at 1 : " << p.compute_value_at_a_given_point(1,0.1) << endl; - cout << "Value of level 1 at 2 : " << p.compute_value_at_a_given_point(1,0.2) << endl; - cout << "Value of level 1 at 3 : " << p.compute_value_at_a_given_point(1,0.3) << endl; - - - cout << "Value of level 2 at 0 : " << p.compute_value_at_a_given_point(2,0.0) << endl; - cout << "Value of level 2 at 1 : " << p.compute_value_at_a_given_point(2,0.1) << endl; - cout << "Value of level 2 at 2 : " << p.compute_value_at_a_given_point(2,0.2) << endl; - cout << "Value of level 2 at 3 : " << p.compute_value_at_a_given_point(2,0.3) << endl; - - - cout << "Value of level 3 at 0 : " << p.compute_value_at_a_given_point(3,0.0) << endl; - cout << "Value of level 3 at 1 : " << p.compute_value_at_a_given_point(3,0.1) << endl; - cout << "Value of level 3 at 2 : " << p.compute_value_at_a_given_point(3,0.2) << endl; - cout << "Value of level 3 at 3 : " << p.compute_value_at_a_given_point(3,0.3) << endl; - - - - Persistence_landscape second; - second.load_landscape_from_file("file_with_landscape_from_file_with_diagram_1" ); - - Persistence_landscape sum = p + second; - Persistence_landscape difference = p - second; - Persistence_landscape multiply_by_scalar = 10*p; - - //sum.print_to_file("sum"); - //difference.print_to_file("difference"); - //multiply_by_scalar.print_to_file("multiply_by_scalar"); - - Persistence_landscape template_sum; - template_sum.load_landscape_from_file( "sum" ); - Persistence_landscape template_difference; - template_difference.load_landscape_from_file( "difference" ); - Persistence_landscape template_multiply_by_scalar; - template_multiply_by_scalar.load_landscape_from_file( "multiply_by_scalar" ); - - if ( sum != template_sum ) - { - cerr << "Problem with sums \n"; - } - if ( difference != template_difference ) - { - cerr << "Problem with differences \n"; - } - if ( multiply_by_scalar != template_multiply_by_scalar ) - { - cerr << "Problem with multiplication by scalar \n"; - } - - - - cout << "Maximum : " << p.compute_maximum() << endl; - - cout << "L^1 norm : " << p.compute_norm_of_landscape(1) << endl; - cout << "L^2 norm : " << p.compute_norm_of_landscape(2) << endl; - cout << "L^3 norm : " << p.compute_norm_of_landscape(3) << endl; - - - cout << "L^1 distance : " << compute_distance_of_landscapes(p,sum,1) << endl; - cout << "L^2 distance : " << compute_distance_of_landscapes(p,sum,2) << endl; - cout << "L^infty distance : " << compute_distance_of_landscapes(p,sum,std::numeric_limits<double>::max() ) << endl; - - { - Persistence_landscape p( "../test/data/file_with_diagram" ); - Persistence_landscape q( "../test/data/file_with_diagram_1" ); - Persistence_landscape av; - av.compute_average( {&p,&q} ); - - Persistence_landscape template_average; - template_average.load_landscape_from_file( "average" ); - if ( template_average != av ) - { - cerr << "We have a problem with average \n"; - } - } - - - { - Persistence_landscape p( "../test/data/file_with_diagram" ); - Persistence_landscape q( "../test/data/file_with_diagram_1" ); - cout << "L^1 distance : " << p.distance( &q ) << endl; - cout << "L^2 distance : " << p.distance( &q , 2) << endl; - cout << "L^infty distance : " << p.distance( &q , std::numeric_limits<double>::max() ) << endl; - } - - - { - Persistence_landscape p( "../test/data/file_with_diagram" ); - Persistence_landscape q( "../test/data/file_with_diagram_1" ); - cout << "Scalar product : " << p.compute_scalar_product( &q ) << endl; - } -*/ diff --git a/src/Gudhi_stat/example/persistence_landscape_on_grid.cpp b/src/Gudhi_stat/example/persistence_landscape_on_grid.cpp index 9133944d..d432d757 100644 --- a/src/Gudhi_stat/example/persistence_landscape_on_grid.cpp +++ b/src/Gudhi_stat/example/persistence_landscape_on_grid.cpp @@ -22,7 +22,7 @@ -#include <gudhi/concretizations/Persistence_landscape_on_grid.h> +#include <gudhi/persistence_representations/Persistence_landscape_on_grid.h> @@ -86,110 +86,3 @@ int main( int argc , char** argv ) return 0; } - - -//Below I am storing the code used to generate tests for that functionality. -/* - Persistence_landscape_on_grid l( "file_with_diagram_1" , 100 ); - l.print_to_file( "landscape_from_file_with_diagram_1" ); - - Persistence_landscape_on_grid g; - g.load_landscape_from_file( "landscape_from_file_with_diagram_1" ); - - cerr << ( l == g ); - */ - - /* - Persistence_landscape_on_grid l( "file_with_diagram_1" , 100 ); - cerr << l << endl; - cerr << l.compute_integral_of_landscape() << endl; - */ - - /* - Persistence_landscape_on_grid p( "file_with_diagram_1" , 100 ); - for ( size_t level = 0 ; level != 30 ; ++level ) - { - double integral = p.compute_integral_of_landscape( level ); - cerr << integral << endl; - } - */ - - /* - Persistence_landscape_on_grid p( "file_with_diagram_1" , 100 ); - for ( size_t power = 0 ; power != 5 ; ++power ) - { - double integral = p.compute_integral_of_landscape( (double)power ); - cerr << integral << endl; - } - */ - - /* - Persistence_landscape_on_grid p( "file_with_diagram_1" , 100 ); - double x = 0.0012321; - double dx = 0.05212; - for ( size_t i = 0 ; i != 10 ; ++i ) - { - cerr << p.compute_value_at_a_given_point(10,x) << endl; - x += dx; - } - */ - - /* - Persistence_landscape_on_grid p( "file_with_diagram_1",100 ); - Persistence_landscape_on_grid second("file_with_diagram_1",100 ); - Persistence_landscape_on_grid sum = p + second; - Persistence_landscape_on_grid difference = p - second; - Persistence_landscape_on_grid multiply_by_scalar = 10*p; - sum.print_to_file( "sum_on_grid_test" ); - difference.print_to_file( "difference_on_grid_test" ); - multiply_by_scalar.print_to_file( "multiply_by_scalar_on_grid_test" ); - */ - - - /* - Persistence_landscape_on_grid p( "file_with_diagram_1" , 0 , 1 , 100 ); - Persistence_landscape_on_grid second("file_with_diagram_1", 0 , 1 , 100 ); - Persistence_landscape_on_grid sum = p + second; - - cerr << "max : " << p.compute_maximum() << endl; - cerr << "1-norm : " << p.compute_norm_of_landscape(1) << endl; - cerr << "2-norm : " << p.compute_norm_of_landscape(2) << endl; - cerr << "3-norm : " << p.compute_norm_of_landscape(3) << endl; - - cerr << compute_distance_of_landscapes_on_grid(p,sum,1) << endl; - cerr << compute_distance_of_landscapes_on_grid(p,sum,2) << endl; - cerr << compute_distance_of_landscapes_on_grid(p,sum,-1) << endl; - */ - - /* - Persistence_landscape_on_grid p( "file_with_diagram", 0,1,100 ); - Persistence_landscape_on_grid q( "file_with_diagram_1", 0,1,100 ); - Persistence_landscape_on_grid av; - av.compute_average( {&p,&q} ); - av.print_to_file("average_on_a_grid"); - - Persistence_landscape_on_grid template_average; - template_average.load_landscape_from_file( "average_on_a_grid" ); - if ( template_average == av ) - { - cerr << "OK OK \n"; - }*/ - - /* - Persistence_landscape_on_grid p( "file_with_diagram" , 0,1,10000); - Persistence_landscape_on_grid q( "file_with_diagram_1" , 0,1,10000); - cerr << p.distance( &q )<< endl; - cerr << p.distance( &q , 2 ) << endl; - cerr << p.distance( &q , std::numeric_limits<double>::max() ) << endl; - */ - -/* - Persistence_landscape_on_grid p( "file_with_diagram", 0,1,10000 ); - Persistence_landscape_on_grid q( "file_with_diagram_1", 0,1,10000 ); - - //std::vector< std::pair< double,double > > aa; - //aa.push_back( std::make_pair( 0,1 ) ); - //Persistence_landscape_on_grid p( aa, 0,1,10 ); - //Persistence_landscape_on_grid q( aa, 0,1,10 ); - cerr << p.compute_scalar_product( &q ) << endl; -*/ diff --git a/src/Gudhi_stat/example/vector_representation.cpp b/src/Gudhi_stat/example/vector_representation.cpp index 981e63de..476deeba 100644 --- a/src/Gudhi_stat/example/vector_representation.cpp +++ b/src/Gudhi_stat/example/vector_representation.cpp @@ -22,7 +22,7 @@ -#include <gudhi/concretizations/Vector_distances_in_diagram.h> +#include <gudhi/persistence_representations/Vector_distances_in_diagram.h> #include <iostream> @@ -78,33 +78,3 @@ int main( int argc , char** argv ) return 0; } - - - - -/* - if ( argc < 2 ) - { - cout << "To run this program, please provide the name of a file with persistence diagram. If you provide two files, we will do distance, scalar produc and average computations \n"; - return 1; - } - - Vector_distances_in_diagram< Euclidean_distance<double> > p( argv[1] , 100 ); - cout << "This is a vector corresponding to the input persistence diagram : \n"; - cout << p << endl; - - - - if ( argc == 3 ) - { - Vector_distances_in_diagram< Euclidean_distance<double> > p_prime( argv[2] , 100); - - cout << "p_prime : " <<p_prime << endl; - - cout << "Distance between input persistence diagrams : " << p.distance( &p_prime ) << endl; - Vector_distances_in_diagram< Euclidean_distance<double> > average; - average.compute_average( {&p,&p_prime} ); - - cout << "Here is an average : " << average << endl; - } -*/ diff --git a/src/Gudhi_stat/include/gudhi/multiplicative_bootstrap.h b/src/Gudhi_stat/include/gudhi/multiplicative_bootstrap.h index b38536d9..c350349c 100644 --- a/src/Gudhi_stat/include/gudhi/multiplicative_bootstrap.h +++ b/src/Gudhi_stat/include/gudhi/multiplicative_bootstrap.h @@ -24,10 +24,10 @@ #define BOOTSTRAP_H //concretizations -#include <gudhi/concretizations/Vector_distances_in_diagram.h> -#include <gudhi/concretizations/Persistence_landscape.h> -#include <gudhi/concretizations/Persistence_landscape_on_grid.h> -#include <gudhi/concretizations/Persistence_heat_maps.h> +#include <gudhi/persistence_representations/Vector_distances_in_diagram.h> +#include <gudhi/persistence_representations/Persistence_landscape.h> +#include <gudhi/persistence_representations/Persistence_landscape_on_grid.h> +#include <gudhi/persistence_representations/Persistence_heat_maps.h> #ifdef GUDHI_USE_TBB #include <tbb/parallel_sort.h> diff --git a/src/Gudhi_stat/include/gudhi/topological_process.h b/src/Gudhi_stat/include/gudhi/topological_process.h index ac658aee..4a41c0a7 100644 --- a/src/Gudhi_stat/include/gudhi/topological_process.h +++ b/src/Gudhi_stat/include/gudhi/topological_process.h @@ -25,10 +25,10 @@ //concretizations -#include <gudhi/concretizations/Vector_distances_in_diagram.h> -#include <gudhi/concretizations/Persistence_landscape.h> -#include <gudhi/concretizations/Persistence_landscape_on_grid.h> -#include <gudhi/concretizations/Persistence_heat_maps.h> +#include <gudhi/persistence_representations/Vector_distances_in_diagram.h> +#include <gudhi/persistence_representations/Persistence_landscape.h> +#include <gudhi/persistence_representations/Persistence_landscape_on_grid.h> +#include <gudhi/persistence_representations/Persistence_heat_maps.h> #include <vector> #include <limits> diff --git a/src/Gudhi_stat/test/persistence_heat_maps_test.cpp b/src/Gudhi_stat/test/persistence_heat_maps_test.cpp index 4447ba37..fb094912 100644 --- a/src/Gudhi_stat/test/persistence_heat_maps_test.cpp +++ b/src/Gudhi_stat/test/persistence_heat_maps_test.cpp @@ -26,7 +26,7 @@ #define BOOST_TEST_MODULE "gudhi_stat" #include <boost/test/unit_test.hpp> #include <gudhi/reader_utils.h> -#include <gudhi/concretizations/Persistence_heat_maps.h> +#include <gudhi/persistence_representations/Persistence_heat_maps.h> #include <iostream> @@ -258,3 +258,121 @@ BOOST_AUTO_TEST_CASE(check_arythmetic_operations_for_heat_maps) } + + + +//Below I am storing the code used to generate tests for that functionality. +/* + std::vector< std::pair< double,double > > intervals; + intervals.push_back( std::make_pair(0.5,0.5) ); + std::vector< std::vector<double> > filter = create_Gaussian_filter(5,1); + Persistence_heat_maps p( intervals , filter , constant_function, false , 100 , 0 , 1 ); + p.plot( "heat_map_1" ); + + + std::vector< std::pair< double,double > > intervals2; + intervals2.push_back( std::make_pair(7,12) ); + Persistence_heat_maps q( intervals2 , filter , constant_function, false , 100 , 0 , 10 ); + q.plot( "heat_map_2" ); +*/ +/* + std::vector< std::pair< double,double > > intervals; + intervals.push_back( std::make_pair(0.5,0.5) ); + std::vector< std::vector<double> > filter = create_Gaussian_filter(5,1); + Persistence_heat_maps p( intervals , filter , constant_function, false , 10 , 0 , 1 ); + p.write_to_file( "aaa" ); + + Persistence_heat_maps q; + q.load_from_file( "aaa" ); + + cerr << ( p == q ) << endl; + */ + +/* + std::vector< std::vector<double> > filter = create_Gaussian_filter(30,1); + Persistence_heat_maps p( "file_with_diagram" , filter , constant_function, false , 100 , 0 , 1 ); + p.plot( "heat_map_1" ); +*/ + +/* + //test to construct persistence heat map: + std::vector< std::vector<double> > filter = create_Gaussian_filter(100,1); + Persistence_heat_maps p( "file_with_diagram" , filter , constant_function, false , 1000 , 0 , 1 ); + p.print_to_file( "persistence_heat_map_from_file_with_diagram" ); + + Persistence_heat_maps q; + q.load_from_file( "persistence_heat_map_from_file_with_diagram" ); + + cerr << (p == q) << endl; +*/ +/* + //test of computations of a mean: + std::vector< std::pair< double,double > > intervals; + intervals.push_back( std::make_pair(5,5) ); + std::vector< std::vector<double> > filter = create_Gaussian_filter(5,1); + Persistence_heat_maps p( intervals , filter , constant_function, false , 100 , 0 , 10 ); + p.plot( "heat_map_1" ); + + + std::vector< std::pair< double,double > > intervals2; + intervals2.push_back( std::make_pair(7,7) ); + Persistence_heat_maps q( intervals2 , filter , constant_function, false , 100 , 0 , 10 ); + q.plot( "heat_map_2" ); + + + Persistence_heat_maps av; + av.compute_average( { &P , &q } ); + av.plot( "average" ); +*/ + +/* + std::vector< std::vector<double> > filter = create_Gaussian_filter(30,1); + Persistence_heat_maps p( "file_with_diagram" , filter , constant_function, false , 1000 , 0 , 10 ); + Persistence_heat_maps q( "file_with_diagram_1" , filter , constant_function, false , 1000 , 0 , 10 ); + Persistence_heat_maps r( "file_with_diagram_2" , filter , constant_function, false , 1000 , 0 , 10 ); + Persistence_heat_maps av; + av.compute_average( {&p,&q,&r} ); + + av.print_to_file( "template_average_of_heat_maps" ); +*/ + +/* + std::vector< std::pair< double,double > > intervals; + intervals.push_back( std::make_pair(5,5) ); + std::vector< std::vector<double> > filter = create_Gaussian_filter(5,1); + Persistence_heat_maps p( intervals , filter , constant_function, false , 10 , 0 , 10 ); + p.plot( "heat_map_1" ); + + std::vector< std::pair< double,double > > intervals2; + intervals2.push_back( std::make_pair(7,7) ); + Persistence_heat_maps q( intervals2 , filter , constant_function, false , 10 , 0 , 10 ); + q.plot( "heat_map_2" ); + + Persistence_heat_maps median; + median.compute_median( {&p,&q} ); + median.plot( "median" ); +*/ + +/* + std::vector< std::vector<double> > filter = create_Gaussian_filter(30,1); + Persistence_heat_maps p( "file_with_diagram" , filter , constant_function, false , 1000 , 0 , 1 ); + Persistence_heat_maps q( "file_with_diagram_1" , filter , constant_function, false , 1000 , 0 , 1 ); + Persistence_heat_maps r( "file_with_diagram_2" , filter , constant_function, false , 1000 , 0 , 1 ); + Persistence_heat_maps median; + median.compute_median( {&p,&q,&r} ); + median.print_to_file( "template_median_of_heat_maps" ); +*/ + + +/* + std::vector< std::vector<double> > filter = create_Gaussian_filter(30,1); + Persistence_heat_maps p( "file_with_diagram" , filter , constant_function, false , 1000 , 0 , 1 ); + Persistence_heat_maps q( "file_with_diagram_1" , filter , constant_function, false , 1000 , 0 , 1 ); + Persistence_heat_maps r( "file_with_diagram_2" , filter , constant_function, false , 1000 , 0 , 1 ); + + Persistence_heat_maps percentage_of_active; + percentage_of_active.compute_percentage_of_active( {&p,&q,&r} , 0.1 ); + + percentage_of_active.print_to_file( "template_percentage_of_active_of_heat_maps" ); + //percentage_of_active.plot( "template_percentage_of_active_of_heat_maps" ); +*/ diff --git a/src/Gudhi_stat/test/persistence_intervals_test.cpp b/src/Gudhi_stat/test/persistence_intervals_test.cpp index 96d913e0..d46d009b 100644 --- a/src/Gudhi_stat/test/persistence_intervals_test.cpp +++ b/src/Gudhi_stat/test/persistence_intervals_test.cpp @@ -26,7 +26,7 @@ #define BOOST_TEST_MODULE "gudhi_stat" #include <boost/test/unit_test.hpp> #include <gudhi/reader_utils.h> -#include "gudhi/concretizations/Persistence_intervals.h" +#include "gudhi/persistence_representations/Persistence_intervals.h" #include <iostream> 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 84b01f3e..2e4ba8d9 100644 --- a/src/Gudhi_stat/test/persistence_lanscapes_on_grid_test.cpp +++ b/src/Gudhi_stat/test/persistence_lanscapes_on_grid_test.cpp @@ -26,7 +26,7 @@ #define BOOST_TEST_MODULE "gudhi_stat" #include <boost/test/unit_test.hpp> #include <gudhi/reader_utils.h> -#include <gudhi/concretizations/Persistence_landscape_on_grid.h> +#include <gudhi/persistence_representations/Persistence_landscape_on_grid.h> #include <iostream> @@ -247,3 +247,110 @@ BOOST_AUTO_TEST_CASE(check_computations_of_scalar_product) } + + +//Below I am storing the code used to generate tests for that functionality. +/* + Persistence_landscape_on_grid l( "file_with_diagram_1" , 100 ); + l.print_to_file( "landscape_from_file_with_diagram_1" ); + + Persistence_landscape_on_grid g; + g.load_landscape_from_file( "landscape_from_file_with_diagram_1" ); + + cerr << ( l == g ); + */ + + /* + Persistence_landscape_on_grid l( "file_with_diagram_1" , 100 ); + cerr << l << endl; + cerr << l.compute_integral_of_landscape() << endl; + */ + + /* + Persistence_landscape_on_grid p( "file_with_diagram_1" , 100 ); + for ( size_t level = 0 ; level != 30 ; ++level ) + { + double integral = p.compute_integral_of_landscape( level ); + cerr << integral << endl; + } + */ + + /* + Persistence_landscape_on_grid p( "file_with_diagram_1" , 100 ); + for ( size_t power = 0 ; power != 5 ; ++power ) + { + double integral = p.compute_integral_of_landscape( (double)power ); + cerr << integral << endl; + } + */ + + /* + Persistence_landscape_on_grid p( "file_with_diagram_1" , 100 ); + double x = 0.0012321; + double dx = 0.05212; + for ( size_t i = 0 ; i != 10 ; ++i ) + { + cerr << p.compute_value_at_a_given_point(10,x) << endl; + x += dx; + } + */ + + /* + Persistence_landscape_on_grid p( "file_with_diagram_1",100 ); + Persistence_landscape_on_grid second("file_with_diagram_1",100 ); + Persistence_landscape_on_grid sum = p + second; + Persistence_landscape_on_grid difference = p - second; + Persistence_landscape_on_grid multiply_by_scalar = 10*p; + sum.print_to_file( "sum_on_grid_test" ); + difference.print_to_file( "difference_on_grid_test" ); + multiply_by_scalar.print_to_file( "multiply_by_scalar_on_grid_test" ); + */ + + + /* + Persistence_landscape_on_grid p( "file_with_diagram_1" , 0 , 1 , 100 ); + Persistence_landscape_on_grid second("file_with_diagram_1", 0 , 1 , 100 ); + Persistence_landscape_on_grid sum = p + second; + + cerr << "max : " << p.compute_maximum() << endl; + cerr << "1-norm : " << p.compute_norm_of_landscape(1) << endl; + cerr << "2-norm : " << p.compute_norm_of_landscape(2) << endl; + cerr << "3-norm : " << p.compute_norm_of_landscape(3) << endl; + + cerr << compute_distance_of_landscapes_on_grid(p,sum,1) << endl; + cerr << compute_distance_of_landscapes_on_grid(p,sum,2) << endl; + cerr << compute_distance_of_landscapes_on_grid(p,sum,-1) << endl; + */ + + /* + Persistence_landscape_on_grid p( "file_with_diagram", 0,1,100 ); + Persistence_landscape_on_grid q( "file_with_diagram_1", 0,1,100 ); + Persistence_landscape_on_grid av; + av.compute_average( {&p,&q} ); + av.print_to_file("average_on_a_grid"); + + Persistence_landscape_on_grid template_average; + template_average.load_landscape_from_file( "average_on_a_grid" ); + if ( template_average == av ) + { + cerr << "OK OK \n"; + }*/ + + /* + Persistence_landscape_on_grid p( "file_with_diagram" , 0,1,10000); + Persistence_landscape_on_grid q( "file_with_diagram_1" , 0,1,10000); + cerr << p.distance( &q )<< endl; + cerr << p.distance( &q , 2 ) << endl; + cerr << p.distance( &q , std::numeric_limits<double>::max() ) << endl; + */ + +/* + Persistence_landscape_on_grid p( "file_with_diagram", 0,1,10000 ); + Persistence_landscape_on_grid q( "file_with_diagram_1", 0,1,10000 ); + + //std::vector< std::pair< double,double > > aa; + //aa.push_back( std::make_pair( 0,1 ) ); + //Persistence_landscape_on_grid p( aa, 0,1,10 ); + //Persistence_landscape_on_grid q( aa, 0,1,10 ); + cerr << p.compute_scalar_product( &q ) << endl; +*/ diff --git a/src/Gudhi_stat/test/persistence_lanscapes_test.cpp b/src/Gudhi_stat/test/persistence_lanscapes_test.cpp index dd010174..9b9f9d7b 100644 --- a/src/Gudhi_stat/test/persistence_lanscapes_test.cpp +++ b/src/Gudhi_stat/test/persistence_lanscapes_test.cpp @@ -26,7 +26,7 @@ #define BOOST_TEST_MODULE "gudhi_stat" #include <boost/test/unit_test.hpp> #include <gudhi/reader_utils.h> -#include <gudhi/concretizations/Persistence_landscape.h> +#include <gudhi/persistence_representations/Persistence_landscape.h> #include <iostream> @@ -217,3 +217,130 @@ BOOST_AUTO_TEST_CASE(check_computations_of_scalar_product) BOOST_CHECK( fabs( p.compute_scalar_product( q ) - 0.754498 ) <= 0.00001 ); } + + +//Below I am storing the code used to generate tests for that functionality. +/* +if ( argc != 2 ) + { + std::cerr << "To run this program, please provide a name of a file with persistence landscape \n"; + //return 1; + } + Persistence_landscape p("../test/data/file_with_diagram"); + + Persistence_landscape q; + q.load_landscape_from_file( "file_with_landscape_from_file_with_diagram" ); + + if ( p != q ) + { + cout << "Not equal \n"; + } + + double integral = p.compute_integral_of_landscape(); + cout << "integral : " << integral <<endl; + + //compute integral for each level separatelly + for ( size_t level = 0 ; level != p.size() ; ++level ) + { + cout << p.compute_integral_of_landscape( level ) << endl; + } + + //compute integral of p-th power of landscspe + for ( size_t power = 0 ; power != 5 ; ++power ) + { + cout << p.compute_integral_of_landscape( power ) << endl; + } + + cout << "Value of level 1 at 0 : " << p.compute_value_at_a_given_point(1,0.0) << endl; + cout << "Value of level 1 at 1 : " << p.compute_value_at_a_given_point(1,0.1) << endl; + cout << "Value of level 1 at 2 : " << p.compute_value_at_a_given_point(1,0.2) << endl; + cout << "Value of level 1 at 3 : " << p.compute_value_at_a_given_point(1,0.3) << endl; + + + cout << "Value of level 2 at 0 : " << p.compute_value_at_a_given_point(2,0.0) << endl; + cout << "Value of level 2 at 1 : " << p.compute_value_at_a_given_point(2,0.1) << endl; + cout << "Value of level 2 at 2 : " << p.compute_value_at_a_given_point(2,0.2) << endl; + cout << "Value of level 2 at 3 : " << p.compute_value_at_a_given_point(2,0.3) << endl; + + + cout << "Value of level 3 at 0 : " << p.compute_value_at_a_given_point(3,0.0) << endl; + cout << "Value of level 3 at 1 : " << p.compute_value_at_a_given_point(3,0.1) << endl; + cout << "Value of level 3 at 2 : " << p.compute_value_at_a_given_point(3,0.2) << endl; + cout << "Value of level 3 at 3 : " << p.compute_value_at_a_given_point(3,0.3) << endl; + + + + Persistence_landscape second; + second.load_landscape_from_file("file_with_landscape_from_file_with_diagram_1" ); + + Persistence_landscape sum = p + second; + Persistence_landscape difference = p - second; + Persistence_landscape multiply_by_scalar = 10*p; + + //sum.print_to_file("sum"); + //difference.print_to_file("difference"); + //multiply_by_scalar.print_to_file("multiply_by_scalar"); + + Persistence_landscape template_sum; + template_sum.load_landscape_from_file( "sum" ); + Persistence_landscape template_difference; + template_difference.load_landscape_from_file( "difference" ); + Persistence_landscape template_multiply_by_scalar; + template_multiply_by_scalar.load_landscape_from_file( "multiply_by_scalar" ); + + if ( sum != template_sum ) + { + cerr << "Problem with sums \n"; + } + if ( difference != template_difference ) + { + cerr << "Problem with differences \n"; + } + if ( multiply_by_scalar != template_multiply_by_scalar ) + { + cerr << "Problem with multiplication by scalar \n"; + } + + + + cout << "Maximum : " << p.compute_maximum() << endl; + + cout << "L^1 norm : " << p.compute_norm_of_landscape(1) << endl; + cout << "L^2 norm : " << p.compute_norm_of_landscape(2) << endl; + cout << "L^3 norm : " << p.compute_norm_of_landscape(3) << endl; + + + cout << "L^1 distance : " << compute_distance_of_landscapes(p,sum,1) << endl; + cout << "L^2 distance : " << compute_distance_of_landscapes(p,sum,2) << endl; + cout << "L^infty distance : " << compute_distance_of_landscapes(p,sum,std::numeric_limits<double>::max() ) << endl; + + { + Persistence_landscape p( "../test/data/file_with_diagram" ); + Persistence_landscape q( "../test/data/file_with_diagram_1" ); + Persistence_landscape av; + av.compute_average( {&p,&q} ); + + Persistence_landscape template_average; + template_average.load_landscape_from_file( "average" ); + if ( template_average != av ) + { + cerr << "We have a problem with average \n"; + } + } + + + { + Persistence_landscape p( "../test/data/file_with_diagram" ); + Persistence_landscape q( "../test/data/file_with_diagram_1" ); + cout << "L^1 distance : " << p.distance( &q ) << endl; + cout << "L^2 distance : " << p.distance( &q , 2) << endl; + cout << "L^infty distance : " << p.distance( &q , std::numeric_limits<double>::max() ) << endl; + } + + + { + Persistence_landscape p( "../test/data/file_with_diagram" ); + Persistence_landscape q( "../test/data/file_with_diagram_1" ); + cout << "Scalar product : " << p.compute_scalar_product( &q ) << endl; + } +*/ diff --git a/src/Gudhi_stat/test/vector_representation_test.cpp b/src/Gudhi_stat/test/vector_representation_test.cpp index dd84fc33..f69673dd 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/concretizations/Vector_distances_in_diagram.h> +#include <gudhi/persistence_representations/Vector_distances_in_diagram.h> #include <gudhi/common_gudhi_stat.h> #include <iostream> diff --git a/src/Gudhi_stat/utilities/Hausdorff_bootstrap.cpp b/src/Gudhi_stat/utilities/Hausdorff_bootstrap.cpp index 78c75bd4..7fd665c3 100644 --- a/src/Gudhi_stat/utilities/Hausdorff_bootstrap.cpp +++ b/src/Gudhi_stat/utilities/Hausdorff_bootstrap.cpp @@ -24,7 +24,7 @@ #include <gudhi/Hausdorff_distances.h> #include <gudhi/bootstrap.h> #include <gudhi/read_persitence_from_file.h> -#include <gudhi/concretizations/Vector_distances_in_diagram.h> +#include <gudhi/persistence_representations/Vector_distances_in_diagram.h> using namespace Gudhi; diff --git a/src/Gudhi_stat/utilities/Landscape_bootstrap.cpp b/src/Gudhi_stat/utilities/Landscape_bootstrap.cpp index 1b24771a..0827bfdf 100644 --- a/src/Gudhi_stat/utilities/Landscape_bootstrap.cpp +++ b/src/Gudhi_stat/utilities/Landscape_bootstrap.cpp @@ -23,9 +23,9 @@ //stat part: #include <gudhi/Hausdorff_distances.h> #include <gudhi/bootstrap.h> -#include <gudhi/concretizations/Persistence_landscape.h> +#include <gudhi/persistence_representations/Persistence_landscape.h> #include <gudhi/read_persitence_from_file.h> -#include <gudhi/concretizations/Vector_distances_in_diagram.h> +#include <gudhi/persistence_representations/Vector_distances_in_diagram.h> //persistence part: #include <gudhi/reader_utils.h> #include <gudhi/graph_simplicial_complex.h> diff --git a/src/Gudhi_stat/utilities/Multiplicative_bootstrap.cpp b/src/Gudhi_stat/utilities/Multiplicative_bootstrap.cpp index 92020c21..9a607251 100644 --- a/src/Gudhi_stat/utilities/Multiplicative_bootstrap.cpp +++ b/src/Gudhi_stat/utilities/Multiplicative_bootstrap.cpp @@ -24,7 +24,7 @@ #include <gudhi/Hausdorff_distances.h> #include <gudhi/multiplicative_bootstrap.h> #include <gudhi/read_persitence_from_file.h> -#include <gudhi/concretizations/Vector_distances_in_diagram.h> +#include <gudhi/persistence_representations/Vector_distances_in_diagram.h> using namespace Gudhi; using namespace Gudhi::Gudhi_stat; diff --git a/src/Gudhi_stat/utilities/permutation_test.cpp b/src/Gudhi_stat/utilities/permutation_test.cpp index dfbe3129..94f92d29 100644 --- a/src/Gudhi_stat/utilities/permutation_test.cpp +++ b/src/Gudhi_stat/utilities/permutation_test.cpp @@ -22,7 +22,7 @@ #include <gudhi/permutation_test.h> -#include <gudhi/concretizations/Persistence_landscape.h> +#include <gudhi/persistence_representations/Persistence_landscape.h> #include <iostream> #include <cstring> diff --git a/src/Gudhi_stat/utilities/persistence_heat_maps/average_persistence_heat_maps.cpp b/src/Gudhi_stat/utilities/persistence_heat_maps/average_persistence_heat_maps.cpp index 3ef863c6..901f1a03 100644 --- a/src/Gudhi_stat/utilities/persistence_heat_maps/average_persistence_heat_maps.cpp +++ b/src/Gudhi_stat/utilities/persistence_heat_maps/average_persistence_heat_maps.cpp @@ -22,7 +22,7 @@ -#include <gudhi/concretizations/Persistence_heat_maps.h> +#include <gudhi/persistence_representations/Persistence_heat_maps.h> diff --git a/src/Gudhi_stat/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp b/src/Gudhi_stat/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp index cb094dff..e4f5fca6 100644 --- a/src/Gudhi_stat/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp +++ b/src/Gudhi_stat/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp @@ -21,7 +21,7 @@ */ -#include <gudhi/concretizations/Persistence_heat_maps.h> +#include <gudhi/persistence_representations/Persistence_heat_maps.h> diff --git a/src/Gudhi_stat/utilities/persistence_heat_maps/compute_scalar_product_of_persistence_heat_maps.cpp b/src/Gudhi_stat/utilities/persistence_heat_maps/compute_scalar_product_of_persistence_heat_maps.cpp index 46edbc28..cdeba692 100644 --- a/src/Gudhi_stat/utilities/persistence_heat_maps/compute_scalar_product_of_persistence_heat_maps.cpp +++ b/src/Gudhi_stat/utilities/persistence_heat_maps/compute_scalar_product_of_persistence_heat_maps.cpp @@ -21,7 +21,7 @@ */ -#include <gudhi/concretizations/Persistence_heat_maps.h> +#include <gudhi/persistence_representations/Persistence_heat_maps.h> diff --git a/src/Gudhi_stat/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp b/src/Gudhi_stat/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp index d5f5d75f..5d2100aa 100644 --- a/src/Gudhi_stat/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp +++ b/src/Gudhi_stat/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp @@ -22,7 +22,7 @@ -#include <gudhi/concretizations/Persistence_heat_maps.h> +#include <gudhi/persistence_representations/Persistence_heat_maps.h> diff --git a/src/Gudhi_stat/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_arctan_of_their_persistence.cpp b/src/Gudhi_stat/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_arctan_of_their_persistence.cpp index 6c306566..8496e33e 100644 --- a/src/Gudhi_stat/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_arctan_of_their_persistence.cpp +++ b/src/Gudhi_stat/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_arctan_of_their_persistence.cpp @@ -22,7 +22,7 @@ -#include <gudhi/concretizations/Persistence_heat_maps.h> +#include <gudhi/persistence_representations/Persistence_heat_maps.h> diff --git a/src/Gudhi_stat/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_distance_from_diagonal.cpp b/src/Gudhi_stat/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_distance_from_diagonal.cpp index 6ac9e40c..83d4f3bc 100644 --- a/src/Gudhi_stat/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_distance_from_diagonal.cpp +++ b/src/Gudhi_stat/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_distance_from_diagonal.cpp @@ -21,7 +21,7 @@ */ -#include <gudhi/concretizations/Persistence_heat_maps.h> +#include <gudhi/persistence_representations/Persistence_heat_maps.h> diff --git a/src/Gudhi_stat/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_squared_distance_from_diagonal.cpp b/src/Gudhi_stat/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_squared_distance_from_diagonal.cpp index 91b3fb22..f62615f5 100644 --- a/src/Gudhi_stat/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_squared_distance_from_diagonal.cpp +++ b/src/Gudhi_stat/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_squared_distance_from_diagonal.cpp @@ -21,7 +21,7 @@ */ -#include <gudhi/concretizations/Persistence_heat_maps.h> +#include <gudhi/persistence_representations/Persistence_heat_maps.h> diff --git a/src/Gudhi_stat/utilities/persistence_heat_maps/create_pssk.cpp b/src/Gudhi_stat/utilities/persistence_heat_maps/create_pssk.cpp index ec35f81c..d38bb8b9 100644 --- a/src/Gudhi_stat/utilities/persistence_heat_maps/create_pssk.cpp +++ b/src/Gudhi_stat/utilities/persistence_heat_maps/create_pssk.cpp @@ -20,7 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include <gudhi/concretizations/PSSK.h> +#include <gudhi/persistence_representations/PSSK.h> diff --git a/src/Gudhi_stat/utilities/persistence_heat_maps/plot_persistence_heat_map.cpp b/src/Gudhi_stat/utilities/persistence_heat_maps/plot_persistence_heat_map.cpp index 39a46adb..59b14fe8 100644 --- a/src/Gudhi_stat/utilities/persistence_heat_maps/plot_persistence_heat_map.cpp +++ b/src/Gudhi_stat/utilities/persistence_heat_maps/plot_persistence_heat_map.cpp @@ -21,7 +21,7 @@ */ -#include <gudhi/concretizations/Persistence_heat_maps.h> +#include <gudhi/persistence_representations/Persistence_heat_maps.h> diff --git a/src/Gudhi_stat/utilities/persistence_intervals/compute_birth_death_range_in_persistence_diagram.cpp b/src/Gudhi_stat/utilities/persistence_intervals/compute_birth_death_range_in_persistence_diagram.cpp index 46711d27..145040fe 100644 --- a/src/Gudhi_stat/utilities/persistence_intervals/compute_birth_death_range_in_persistence_diagram.cpp +++ b/src/Gudhi_stat/utilities/persistence_intervals/compute_birth_death_range_in_persistence_diagram.cpp @@ -23,7 +23,7 @@ #include <gudhi/reader_utils.h> -#include <gudhi/concretizations/Persistence_intervals.h> +#include <gudhi/persistence_representations/Persistence_intervals.h> #include <iostream> #include <vector> diff --git a/src/Gudhi_stat/utilities/persistence_intervals/compute_number_of_dominant_intervals.cpp b/src/Gudhi_stat/utilities/persistence_intervals/compute_number_of_dominant_intervals.cpp index 8c263705..eeda703a 100644 --- a/src/Gudhi_stat/utilities/persistence_intervals/compute_number_of_dominant_intervals.cpp +++ b/src/Gudhi_stat/utilities/persistence_intervals/compute_number_of_dominant_intervals.cpp @@ -23,7 +23,7 @@ #include <gudhi/reader_utils.h> -#include <gudhi/concretizations/Persistence_intervals.h> +#include <gudhi/persistence_representations/Persistence_intervals.h> #include <iostream> diff --git a/src/Gudhi_stat/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp b/src/Gudhi_stat/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp index f21afdd2..db9c3f98 100644 --- a/src/Gudhi_stat/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp +++ b/src/Gudhi_stat/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp @@ -23,7 +23,7 @@ #include <gudhi/reader_utils.h> -#include <gudhi/concretizations/Persistence_intervals.h> +#include <gudhi/persistence_representations/Persistence_intervals.h> #include <iostream> @@ -44,7 +44,7 @@ int main( int argc , char** argv ) Persistence_intervals p( argv[1] ); std::vector< std::pair<double,double> > dominant_intervals = p.dominant_intervals( atoi( argv[2] ) ); - std::vector< size_t > histogram = p.histograms_of_lengths( 10 ); + std::vector< size_t > histogram = p.histogram_of_lengths( 10 ); std::stringstream gnuplot_script; gnuplot_script << argv[1] << "_Gnuplot_script"; diff --git a/src/Gudhi_stat/utilities/persistence_intervals/plot_persistence_Betti_numebrs.cpp b/src/Gudhi_stat/utilities/persistence_intervals/plot_persistence_Betti_numebrs.cpp index d12c4605..cb89f6b9 100644 --- a/src/Gudhi_stat/utilities/persistence_intervals/plot_persistence_Betti_numebrs.cpp +++ b/src/Gudhi_stat/utilities/persistence_intervals/plot_persistence_Betti_numebrs.cpp @@ -23,7 +23,7 @@ #include <gudhi/reader_utils.h> -#include <gudhi/concretizations/Persistence_intervals.h> +#include <gudhi/persistence_representations/Persistence_intervals.h> #include <iostream> diff --git a/src/Gudhi_stat/utilities/persistence_intervals/plot_persistence_intervals.cpp b/src/Gudhi_stat/utilities/persistence_intervals/plot_persistence_intervals.cpp index d2e49ef3..40f6fbaf 100644 --- a/src/Gudhi_stat/utilities/persistence_intervals/plot_persistence_intervals.cpp +++ b/src/Gudhi_stat/utilities/persistence_intervals/plot_persistence_intervals.cpp @@ -23,7 +23,7 @@ #include <gudhi/reader_utils.h> -#include <gudhi/concretizations/Persistence_intervals.h> +#include <gudhi/persistence_representations/Persistence_intervals.h> #include <gudhi/read_persitence_from_file.h> #include <iostream> diff --git a/src/Gudhi_stat/utilities/persistence_landscapes/average_landscapes.cpp b/src/Gudhi_stat/utilities/persistence_landscapes/average_landscapes.cpp index 35aec203..2a50acd8 100644 --- a/src/Gudhi_stat/utilities/persistence_landscapes/average_landscapes.cpp +++ b/src/Gudhi_stat/utilities/persistence_landscapes/average_landscapes.cpp @@ -22,7 +22,7 @@ -#include <gudhi/concretizations/Persistence_landscape.h> +#include <gudhi/persistence_representations/Persistence_landscape.h> diff --git a/src/Gudhi_stat/utilities/persistence_landscapes/compute_distance_of_landscapes.cpp b/src/Gudhi_stat/utilities/persistence_landscapes/compute_distance_of_landscapes.cpp index 937a902e..0b16ac26 100644 --- a/src/Gudhi_stat/utilities/persistence_landscapes/compute_distance_of_landscapes.cpp +++ b/src/Gudhi_stat/utilities/persistence_landscapes/compute_distance_of_landscapes.cpp @@ -20,7 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include <gudhi/concretizations/Persistence_landscape.h> +#include <gudhi/persistence_representations/Persistence_landscape.h> diff --git a/src/Gudhi_stat/utilities/persistence_landscapes/compute_scalar_product_of_landscapes.cpp b/src/Gudhi_stat/utilities/persistence_landscapes/compute_scalar_product_of_landscapes.cpp index 39772b9b..16a15174 100644 --- a/src/Gudhi_stat/utilities/persistence_landscapes/compute_scalar_product_of_landscapes.cpp +++ b/src/Gudhi_stat/utilities/persistence_landscapes/compute_scalar_product_of_landscapes.cpp @@ -20,7 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include <gudhi/concretizations/Persistence_landscape.h> +#include <gudhi/persistence_representations/Persistence_landscape.h> diff --git a/src/Gudhi_stat/utilities/persistence_landscapes/create_landscapes.cpp b/src/Gudhi_stat/utilities/persistence_landscapes/create_landscapes.cpp index b67ec566..5485bf2a 100644 --- a/src/Gudhi_stat/utilities/persistence_landscapes/create_landscapes.cpp +++ b/src/Gudhi_stat/utilities/persistence_landscapes/create_landscapes.cpp @@ -20,8 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include <gudhi/concretizations/Persistence_landscape.h> - +#include <gudhi/persistence_representations/Persistence_landscape.h> using namespace Gudhi; @@ -43,7 +42,8 @@ int main( int argc , char** argv ) std::cout << "Creating persistence landscapes...\n"; for ( size_t i = 0 ; i != filenames.size() ; ++i ) { - Persistence_landscape l( filenames[i] , 0 ); + //std::vector< std::pair< double , double > > pers = read_standard_file( filename ); + Persistence_landscape l( filenames[i] , 1 ); std::stringstream ss; ss << filenames[i] << ".land"; l.print_to_file( ss.str().c_str() ); diff --git a/src/Gudhi_stat/utilities/persistence_landscapes/plot_landscapes.cpp b/src/Gudhi_stat/utilities/persistence_landscapes/plot_landscapes.cpp index 0d72a17c..aad8e147 100644 --- a/src/Gudhi_stat/utilities/persistence_landscapes/plot_landscapes.cpp +++ b/src/Gudhi_stat/utilities/persistence_landscapes/plot_landscapes.cpp @@ -20,7 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include <gudhi/concretizations/Persistence_landscape.h> +#include <gudhi/persistence_representations/Persistence_landscape.h> diff --git a/src/Gudhi_stat/utilities/persistence_landscapes_on_grid/average_landscapes_on_grid.cpp b/src/Gudhi_stat/utilities/persistence_landscapes_on_grid/average_landscapes_on_grid.cpp index 2f6875b2..d3851734 100644 --- a/src/Gudhi_stat/utilities/persistence_landscapes_on_grid/average_landscapes_on_grid.cpp +++ b/src/Gudhi_stat/utilities/persistence_landscapes_on_grid/average_landscapes_on_grid.cpp @@ -20,7 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include <gudhi/concretizations/Persistence_landscape_on_grid.h> +#include <gudhi/persistence_representations/Persistence_landscape_on_grid.h> diff --git a/src/Gudhi_stat/utilities/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp b/src/Gudhi_stat/utilities/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp index 58c5ec47..29c37159 100644 --- a/src/Gudhi_stat/utilities/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp +++ b/src/Gudhi_stat/utilities/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp @@ -20,7 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include <gudhi/concretizations/Persistence_landscape_on_grid.h> +#include <gudhi/persistence_representations/Persistence_landscape_on_grid.h> diff --git a/src/Gudhi_stat/utilities/persistence_landscapes_on_grid/compute_scalar_product_of_landscapes_on_grid.cpp b/src/Gudhi_stat/utilities/persistence_landscapes_on_grid/compute_scalar_product_of_landscapes_on_grid.cpp index e1a4788f..326e5587 100644 --- a/src/Gudhi_stat/utilities/persistence_landscapes_on_grid/compute_scalar_product_of_landscapes_on_grid.cpp +++ b/src/Gudhi_stat/utilities/persistence_landscapes_on_grid/compute_scalar_product_of_landscapes_on_grid.cpp @@ -21,7 +21,7 @@ */ -#include <gudhi/concretizations/Persistence_landscape_on_grid.h> +#include <gudhi/persistence_representations/Persistence_landscape_on_grid.h> diff --git a/src/Gudhi_stat/utilities/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp b/src/Gudhi_stat/utilities/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp index 2b205513..4f36f02d 100644 --- a/src/Gudhi_stat/utilities/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp +++ b/src/Gudhi_stat/utilities/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp @@ -20,7 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include <gudhi/concretizations/Persistence_landscape_on_grid.h> +#include <gudhi/persistence_representations/Persistence_landscape_on_grid.h> diff --git a/src/Gudhi_stat/utilities/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp b/src/Gudhi_stat/utilities/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp index 27946075..b5687ea2 100644 --- a/src/Gudhi_stat/utilities/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp +++ b/src/Gudhi_stat/utilities/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp @@ -20,7 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include <gudhi/concretizations/Persistence_landscape_on_grid.h> +#include <gudhi/persistence_representations/Persistence_landscape_on_grid.h> diff --git a/src/Gudhi_stat/utilities/persistence_vectors/average_persistence_vectors.cpp b/src/Gudhi_stat/utilities/persistence_vectors/average_persistence_vectors.cpp index 3f6409c6..822d0e2a 100644 --- a/src/Gudhi_stat/utilities/persistence_vectors/average_persistence_vectors.cpp +++ b/src/Gudhi_stat/utilities/persistence_vectors/average_persistence_vectors.cpp @@ -21,7 +21,7 @@ */ -#include <gudhi/concretizations/Vector_distances_in_diagram.h> +#include <gudhi/persistence_representations/Vector_distances_in_diagram.h> diff --git a/src/Gudhi_stat/utilities/persistence_vectors/compute_distance_of_persistence_vectors.cpp b/src/Gudhi_stat/utilities/persistence_vectors/compute_distance_of_persistence_vectors.cpp index 2ca5989e..6d242cd1 100644 --- a/src/Gudhi_stat/utilities/persistence_vectors/compute_distance_of_persistence_vectors.cpp +++ b/src/Gudhi_stat/utilities/persistence_vectors/compute_distance_of_persistence_vectors.cpp @@ -20,7 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include <gudhi/concretizations/Vector_distances_in_diagram.h> +#include <gudhi/persistence_representations/Vector_distances_in_diagram.h> diff --git a/src/Gudhi_stat/utilities/persistence_vectors/compute_scalar_product_of_persistence_vectors.cpp b/src/Gudhi_stat/utilities/persistence_vectors/compute_scalar_product_of_persistence_vectors.cpp index 78c6ab91..e4c62194 100644 --- a/src/Gudhi_stat/utilities/persistence_vectors/compute_scalar_product_of_persistence_vectors.cpp +++ b/src/Gudhi_stat/utilities/persistence_vectors/compute_scalar_product_of_persistence_vectors.cpp @@ -20,7 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include <gudhi/concretizations/Vector_distances_in_diagram.h> +#include <gudhi/persistence_representations/Vector_distances_in_diagram.h> diff --git a/src/Gudhi_stat/utilities/persistence_vectors/create_persistence_vectors.cpp b/src/Gudhi_stat/utilities/persistence_vectors/create_persistence_vectors.cpp index f3cf7289..926e46fd 100644 --- a/src/Gudhi_stat/utilities/persistence_vectors/create_persistence_vectors.cpp +++ b/src/Gudhi_stat/utilities/persistence_vectors/create_persistence_vectors.cpp @@ -20,7 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include <gudhi/concretizations/Vector_distances_in_diagram.h> +#include <gudhi/persistence_representations/Vector_distances_in_diagram.h> diff --git a/src/Gudhi_stat/utilities/persistence_vectors/plot_persistence_vectors.cpp b/src/Gudhi_stat/utilities/persistence_vectors/plot_persistence_vectors.cpp index 06411283..0ef30be8 100644 --- a/src/Gudhi_stat/utilities/persistence_vectors/plot_persistence_vectors.cpp +++ b/src/Gudhi_stat/utilities/persistence_vectors/plot_persistence_vectors.cpp @@ -20,7 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include <gudhi/concretizations/Vector_distances_in_diagram.h> +#include <gudhi/persistence_representations/Vector_distances_in_diagram.h> |