diff options
author | pdlotko <pdlotko@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2017-04-12 13:07:58 +0000 |
---|---|---|
committer | pdlotko <pdlotko@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2017-04-12 13:07:58 +0000 |
commit | 8f4c961a93fe928d06c7776a9e8f5ecd00fab9ca (patch) | |
tree | 0222aa7a5db950b15e7b1adf9f75cec2204c55fa /src/Gudhi_stat/include/gudhi/persistence_representations/Persistence_landscape.h | |
parent | e729d07cc53e4b6a189ebbfbfe4eb5db5449fbe0 (diff) |
a few more correction. First of all, bottleneck distance is added (although there is something strange in the results, FG has been pinged about this). Second of all, all the programs in utylites should now read general files (and dimension of persistence to be read is one of the parameteds of files). This still need to be tested and will be tested soon.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/gudhi_stat@2339 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: e60d14f07db223646597230d7f0bd78dd090bc0b
Diffstat (limited to 'src/Gudhi_stat/include/gudhi/persistence_representations/Persistence_landscape.h')
-rw-r--r-- | src/Gudhi_stat/include/gudhi/persistence_representations/Persistence_landscape.h | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/Gudhi_stat/include/gudhi/persistence_representations/Persistence_landscape.h b/src/Gudhi_stat/include/gudhi/persistence_representations/Persistence_landscape.h index 0d8fe5fe..681f5d8d 100644 --- a/src/Gudhi_stat/include/gudhi/persistence_representations/Persistence_landscape.h +++ b/src/Gudhi_stat/include/gudhi/persistence_representations/Persistence_landscape.h @@ -80,7 +80,7 @@ public: * Constructor that reads persistence intervals from file and creates persistence landscape. The format of the input file is the following: in each line we put birth-death pair. Last line is assumed * to be empty. Even if the points within a line are not ordered, they will be ordered while the input is read. **/ - Persistence_landscape(const char* filename , size_t dimension = 0); + Persistence_landscape(const char* filename , size_t dimension = std::numeric_limits<unsigned>::max() ); @@ -548,13 +548,18 @@ Persistence_landscape::Persistence_landscape(const char* filename , size_t dimen if ( dbg ) { std::cerr << "Using constructor : Persistence_landscape(char* filename)" << std::endl; - } - //standard file with barcode - //std::vector< std::pair< double , double > > barcode = read_standard_persistence_file( filename ); - //gudhi file with barcode - std::vector< std::pair< double , double > > barcode = read_gudhi_persistence_file_in_one_dimension( filename , dimension ); - this->construct_persistence_landscape_from_barcode( barcode ); - this->set_up_numbers_of_functions_for_vectorization_and_projections_to_reals(); + } + std::vector< std::pair< double , double > > barcode; + if ( dimension == std::numeric_limits<unsigned>::max() ) + { + barcode = read_persistence_intervals_in_one_dimension_from_file( filename ); + } + else + { + barcode = read_persistence_intervals_in_one_dimension_from_file( filename , dimension ); + } + this->construct_persistence_landscape_from_barcode( barcode ); + this->set_up_numbers_of_functions_for_vectorization_and_projections_to_reals(); } |