summaryrefslogtreecommitdiff
path: root/src/Gudhi_stat/include/gudhi/persistence_representations/Persistence_heat_maps.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Gudhi_stat/include/gudhi/persistence_representations/Persistence_heat_maps.h')
-rw-r--r--src/Gudhi_stat/include/gudhi/persistence_representations/Persistence_heat_maps.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/Gudhi_stat/include/gudhi/persistence_representations/Persistence_heat_maps.h b/src/Gudhi_stat/include/gudhi/persistence_representations/Persistence_heat_maps.h
index f82f3100..3cfd52f5 100644
--- a/src/Gudhi_stat/include/gudhi/persistence_representations/Persistence_heat_maps.h
+++ b/src/Gudhi_stat/include/gudhi/persistence_representations/Persistence_heat_maps.h
@@ -230,14 +230,14 @@ public:
**/
/**
* Construction that takes at the input the following parameters:
- * (1) A a name of a file with persistence intervals. The file shold be readable by the function read_standard_persistence_file. All other parameters are optional. They are:
+ * (1) A a name of a file with persistence intervals. The file shold be readable by the function read_persistence_intervals_in_one_dimension_from_file. All other parameters are optional. They are:
* (2) a Gausian filter generated by create_Gaussian_filter filter (the default value of this vaiable is a Gaussian filter of a radius 5),
* (3) a boolean value which determines if the area of image below diagonal should, or should not be erased (it will be erased by default).
* (4) a number of pixels in each direction (set to 1000 by default).
* (5) a min x and y value of points that are to be taken into account. By default it is set to std::numeric_limits<double>::max(), in which case the program compute the values based on the data,
* (6) a max x and y value of points that are to be taken into account. By default it is set to std::numeric_limits<double>::max(), in which case the program compute the values based on the data.
**/
- Persistence_heat_maps( const char* filename , std::vector< std::vector<double> > filter = create_Gaussian_filter(5,1), bool erase_below_diagonal = false , size_t number_of_pixels = 1000 , double min_ = std::numeric_limits<double>::max() , double max_ = std::numeric_limits<double>::max() );
+ Persistence_heat_maps( const char* filename , std::vector< std::vector<double> > filter = create_Gaussian_filter(5,1), bool erase_below_diagonal = false , size_t number_of_pixels = 1000 , double min_ = std::numeric_limits<double>::max() , double max_ = std::numeric_limits<double>::max() , unsigned dimension = std::numeric_limits<unsigned>::max() );
/**
@@ -695,9 +695,17 @@ Persistence_heat_maps<Scalling_of_kernels>::Persistence_heat_maps( const std::ve
template <typename Scalling_of_kernels>
Persistence_heat_maps<Scalling_of_kernels>::Persistence_heat_maps( const char* filename ,
std::vector< std::vector<double> > filter,
- bool erase_below_diagonal , size_t number_of_pixels , double min_ , double max_ )
+ bool erase_below_diagonal , size_t number_of_pixels , double min_ , double max_ , unsigned dimension )
{
- std::vector< std::pair< double , double > > intervals_ = read_standard_persistence_file( filename );
+ std::vector< std::pair< double , double > > intervals_;
+ if ( dimension == std::numeric_limits<unsigned>::max() )
+ {
+ intervals_ = read_persistence_intervals_in_one_dimension_from_file( filename );
+ }
+ else
+ {
+ intervals_ = read_persistence_intervals_in_one_dimension_from_file( filename , dimension );
+ }
this->construct( intervals_ , filter, erase_below_diagonal , number_of_pixels , min_ , max_ );
this->set_up_parameters_for_basic_classes();
}