From 897783d59fbe6ac6bca89a18ab893fa76cf990c9 Mon Sep 17 00:00:00 2001 From: pdlotko Date: Fri, 28 Apr 2017 06:48:29 +0000 Subject: Answers to Vincent's comments. git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/gudhi_stat@2383 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 67e837dc1620294b3538c6f4a0515be5bde53fa9 --- .../include/gudhi/Persistence_heat_maps.h | 2 ++ .../include/gudhi/Persistence_intervals.h | 2 ++ .../gudhi/Persistence_intervals_with_distances.h | 4 ++-- .../include/gudhi/Persistence_landscape.h | 23 +++++++++------------- .../include/gudhi/Persistence_landscape_on_grid.h | 4 +++- src/Gudhi_stat/include/gudhi/persistence_vectors.h | 2 ++ 6 files changed, 20 insertions(+), 17 deletions(-) (limited to 'src/Gudhi_stat/include') diff --git a/src/Gudhi_stat/include/gudhi/Persistence_heat_maps.h b/src/Gudhi_stat/include/gudhi/Persistence_heat_maps.h index 78cbed20..59e58e41 100644 --- a/src/Gudhi_stat/include/gudhi/Persistence_heat_maps.h +++ b/src/Gudhi_stat/include/gudhi/Persistence_heat_maps.h @@ -487,6 +487,8 @@ public: /** * This function is required by the Real_valued_topological_data concept. It returns various projections od the persistence heat map to a real line. + * At the moment this function is not tested, since it is quite likelly to be changed in the future. Given this, when using it, keep in mind that it + * will be most likelly changed in the next versions. **/ double project_to_R( int number_of_function )const; /** diff --git a/src/Gudhi_stat/include/gudhi/Persistence_intervals.h b/src/Gudhi_stat/include/gudhi/Persistence_intervals.h index 95e6ae91..539d38e5 100644 --- a/src/Gudhi_stat/include/gudhi/Persistence_intervals.h +++ b/src/Gudhi_stat/include/gudhi/Persistence_intervals.h @@ -223,6 +223,8 @@ public: /** * This is a simple function projectig the persistence intervals to a real number. The function we use here is a sum of squared lendgths of intervals. It can be naturally interpreted as * sum of step function, where the step hight it equal to the length of the interval. + * At the moment this function is not tested, since it is quite likelly to be changed in the future. Given this, when using it, keep in mind that it + * will be most likelly changed in the next versions. **/ double project_to_R( int number_of_function )const; /** diff --git a/src/Gudhi_stat/include/gudhi/Persistence_intervals_with_distances.h b/src/Gudhi_stat/include/gudhi/Persistence_intervals_with_distances.h index 60343dc1..7ef711e9 100644 --- a/src/Gudhi_stat/include/gudhi/Persistence_intervals_with_distances.h +++ b/src/Gudhi_stat/include/gudhi/Persistence_intervals_with_distances.h @@ -24,7 +24,7 @@ #define Persistence_intervals_WITH_DISTANCES_H_ -#include +#include #include namespace Gudhi @@ -44,7 +44,7 @@ public: * exception will be thrown. * The last parameter, tolerance, it is an additiv error of the approimation, set by default to zero. **/ - double distance( const Persistence_intervals_with_distances& second , double power = std::numeric_limits< double >::max() , double tolerance = 0) const + double distance( const Persistence_intervals_with_distances& second , double power = std::numeric_limits< double >::max() , double tolerance = 0) const { if ( power >= std::numeric_limits< double >::max() ) { diff --git a/src/Gudhi_stat/include/gudhi/Persistence_landscape.h b/src/Gudhi_stat/include/gudhi/Persistence_landscape.h index 9150e507..9a177b60 100644 --- a/src/Gudhi_stat/include/gudhi/Persistence_landscape.h +++ b/src/Gudhi_stat/include/gudhi/Persistence_landscape.h @@ -347,6 +347,8 @@ public: /** * The number of projections to R is defined to the number of nonzero landscape functions. I-th projection is an integral of i-th landscape function over whole R. * This function is required by the Real_valued_topological_data concept. + * At the moment this function is not tested, since it is quite likelly to be changed in the future. Given this, when using it, keep in mind that it + * will be most likelly changed in the next versions. **/ double project_to_R( int number_of_function )const { @@ -543,24 +545,17 @@ protected: - Persistence_landscape::Persistence_landscape(const char* filename , size_t dimension) -{ - bool dbg = false; - - if ( dbg ) +{ + std::vector< std::pair< double , double > > barcode; + if ( dimension < std::numeric_limits::max() ) { - std::cerr << "Using constructor : Persistence_landscape(char* filename)" << std::endl; - } - std::vector< std::pair< double , double > > barcode; - if ( dimension == std::numeric_limits::max() ) - { - barcode = read_persistence_intervals_in_one_dimension_from_file( filename ); - } + barcode = read_persistence_intervals_in_one_dimension_from_file( filename , dimension ); + } else { - barcode = read_persistence_intervals_in_one_dimension_from_file( filename , dimension ); - } + barcode = read_persistence_intervals_in_one_dimension_from_file( filename ); + } this->construct_persistence_landscape_from_barcode( barcode ); this->set_up_numbers_of_functions_for_vectorization_and_projections_to_reals(); } diff --git a/src/Gudhi_stat/include/gudhi/Persistence_landscape_on_grid.h b/src/Gudhi_stat/include/gudhi/Persistence_landscape_on_grid.h index de5c74ac..ed9c14ea 100644 --- a/src/Gudhi_stat/include/gudhi/Persistence_landscape_on_grid.h +++ b/src/Gudhi_stat/include/gudhi/Persistence_landscape_on_grid.h @@ -865,7 +865,9 @@ public: /** * The number of projections to R is defined to the number of nonzero landscape functions. I-th projection is an integral of i-th landscape function over whole R. - * This function is required by the Real_valued_topological_data concept. + * This function is required by the Real_valued_topological_data concept. + * At the moment this function is not tested, since it is quite likelly to be changed in the future. Given this, when using it, keep in mind that it + * will be most likelly changed in the next versions. **/ double project_to_R( int number_of_function )const { diff --git a/src/Gudhi_stat/include/gudhi/persistence_vectors.h b/src/Gudhi_stat/include/gudhi/persistence_vectors.h index 9ed32fc1..d623dd0d 100644 --- a/src/Gudhi_stat/include/gudhi/persistence_vectors.h +++ b/src/Gudhi_stat/include/gudhi/persistence_vectors.h @@ -177,6 +177,8 @@ public: //Implementations of functions for various concepts. /** * Compute projection to real numbers of persistence vector. This function is required by the Real_valued_topological_data concept + * At the moment this function is not tested, since it is quite likelly to be changed in the future. Given this, when using it, keep in mind that it + * will be most likelly changed in the next versions. **/ double project_to_R( int number_of_function )const; /** -- cgit v1.2.3