13#ifndef PERSISTENCE_HEAT_MAPS_H_
14#define PERSISTENCE_HEAT_MAPS_H_
33#include <gudhi/read_persistence_from_file.h>
35#include <gudhi/Debug_utils.h>
38namespace Persistence_representations {
52 double sigma_sqr = sigma * sigma;
58 std::vector<std::vector<double> > kernel(2 * pixel_radius + 1, std::vector<double>(2 * pixel_radius + 1, 0));
61 std::clog <<
"Kernel initialize \n";
62 std::clog <<
"pixel_radius : " << pixel_radius << std::endl;
63 std::clog <<
"kernel.size() : " << kernel.size() << std::endl;
66 for (
int x = -pixel_radius; x <= static_cast<int>(pixel_radius); x++) {
67 for (
int y = -pixel_radius; y <= static_cast<int>(pixel_radius); y++) {
68 double real_x = 2 * sigma * x / pixel_radius;
69 double real_y = 2 * sigma * y / pixel_radius;
70 r = std::sqrt(real_x * real_x + real_y * real_y);
71 kernel[x + pixel_radius][y + pixel_radius] = (std::exp(-(r * r) / sigma_sqr)) / (3.141592 * sigma_sqr);
72 sum += kernel[x + pixel_radius][y + pixel_radius];
77 for (std::size_t i = 0; i != kernel.size(); ++i) {
78 for (std::size_t j = 0; j != kernel[i].size(); ++j) {
84 std::clog <<
"Here is the kernel : \n";
85 for (std::size_t i = 0; i != kernel.size(); ++i) {
86 for (std::size_t j = 0; j != kernel[i].size(); ++j) {
87 std::clog << kernel[i][j] <<
" ";
89 std::clog << std::endl;
114 double operator()(
const std::pair<double, double>& point_in_diagram) {
return 1; }
127 double operator()(
const std::pair<double, double>& point_in_diagram)
130 return std::sqrt(std::pow((point_in_diagram.first - (point_in_diagram.first + point_in_diagram.second) / 2.0), 2) +
131 std::pow((point_in_diagram.second - (point_in_diagram.first + point_in_diagram.second) / 2.0), 2));
145 double operator()(
const std::pair<double, double>& point_in_diagram)
147 return std::pow((point_in_diagram.first - (point_in_diagram.first + point_in_diagram.second) / 2.0), 2) +
148 std::pow((point_in_diagram.second - (point_in_diagram.first + point_in_diagram.second) / 2.0), 2);
163 double operator()(
const std::pair<double, double>& point_in_diagram)
165 return std::atan(point_in_diagram.second - point_in_diagram.first);
178class weight_by_setting_maximal_interval_to_have_length_one
181 weight_by_setting_maximal_interval_to_have_length_one(
double len) : length_of_maximal_interval(len) {}
183 double operator()(
const std::pair<double, double>& point_in_diagram)
185 return (point_in_diagram.second - point_in_diagram.first) / this->length_of_maximal_interval;
189 double length_of_maximal_interval;
201template <
typename Scalling_of_kernels = constant_scaling_function>
212 number_of_functions_for_vectorization_(1),
213 number_of_functions_for_projections_to_reals_(1),
215 erase_below_diagonal_(false)
236 bool erase_below_diagonal =
false,
237 std::size_t number_of_pixels = 1000,
238 double min = std::numeric_limits<double>::max(),
239 double max = std::numeric_limits<double>::max())
240 : number_of_functions_for_vectorization_(1), number_of_functions_for_projections_to_reals_(1)
242 this->_construct(interval, filter, erase_below_diagonal, number_of_pixels, min, max);
266 bool erase_below_diagonal =
false,
267 std::size_t number_of_pixels = 1000,
268 double min = std::numeric_limits<double>::max(),
269 double max = std::numeric_limits<double>::max(),
270 unsigned int dimension = std::numeric_limits<unsigned int>::max())
271 : number_of_functions_for_vectorization_(1), number_of_functions_for_projections_to_reals_(1)
273 int dim = dimension == std::numeric_limits<unsigned int>::max() ? -1 :
static_cast<int>(dimension);
275 this->_construct(intervals_, filter, erase_below_diagonal, number_of_pixels, min, max);
283 const std::vector<std::pair<double, double> >& interval,
284 const std::function<
double(
const std::pair<double, double>&,
const std::pair<double, double>&)>& kernel,
285 std::size_t number_of_x_pixels,
286 std::size_t number_of_y_pixels,
293 heat_map_(number_of_y_pixels),
295 number_of_functions_for_vectorization_(1),
296 number_of_functions_for_projections_to_reals_(1)
298 double step_x = (max_x - min_x) / (number_of_x_pixels - 1);
299 double step_y = (max_y - min_y) / (number_of_y_pixels - 1);
301 int num_pts = interval.size();
302 for (std::size_t i = 0; i < number_of_y_pixels; i++) {
303 double y = min_y + i * step_y;
304 this->heat_map_[i].reserve(number_of_x_pixels);
305 for (std::size_t j = 0; j < number_of_x_pixels; j++) {
306 double x = min_x + j * step_x;
307 std::pair<double, double> grid_point(x, y);
308 double pixel_value = 0;
309 for (
int k = 0; k < num_pts; k++) pixel_value += this->f_(interval[k]) * kernel(interval[k], grid_point);
310 this->heat_map_[i].push_back(pixel_value);
319 const std::vector<std::pair<double, double> >& interval,
320 const std::function<
double(
const std::pair<double, double>&,
const std::pair<double, double>&)>& kernel)
322 number_of_functions_for_vectorization_(1),
323 number_of_functions_for_projections_to_reals_(1),
327 int num_pts = this->interval_.size();
328 for (
int i = 0; i < num_pts; i++) this->weights_.push_back(this->f_(this->interval_[i]));
370 if (this->heat_map_.size() != second.heat_map_.size()) {
372 std::clog <<
"this->heat_map_.size() : " << this->heat_map_.size()
373 <<
" \n second.heat_map_.size() : " << second.heat_map_.size() << std::endl;
377 if (this->min_ != second.min_) {
379 std::clog <<
"this->min_ : " << this->min_ <<
", second.min_ : " << second.min_ << std::endl;
383 if (this->max_ != second.max_) {
385 std::clog <<
"this->max_ : " << this->max_ <<
", second.max_ : " << second.max_ << std::endl;
410 std::clog <<
"The domains are not the same \n";
414 for (std::size_t i = 0; i != this->heat_map_.size(); ++i) {
415 for (std::size_t j = 0; j != this->heat_map_[i].size(); ++j) {
416 if (!
almost_equal(this->heat_map_[i][j], rhs.heat_map_[i][j])) {
418 std::clog <<
"this->heat_map_[" << i <<
"][" << j <<
"] = " << this->heat_map_[i][j] << std::endl;
419 std::clog <<
"rhs.heat_map_[" << i <<
"][" << j <<
"] = " << rhs.heat_map_[i][j] << std::endl;
436 void plot(
const char* filename)
const;
438 template <
typename Operation_type>
441 Operation_type&& operation)
446 std::cerr <<
"Sizes of the heat maps are not compatible. The program will now terminate \n";
448 throw std::invalid_argument(
"Sizes of the heat maps are not compatible. The program will now terminate \n");
451 result.min_ = first.min_;
452 result.max_ = first.max_;
453 result.heat_map_.reserve(first.heat_map_.size());
454 for (std::size_t i = 0; i != first.heat_map_.size(); ++i) {
455 std::vector<double> v;
456 v.reserve(first.heat_map_[i].size());
457 for (std::size_t j = 0; j != first.heat_map_[i].size(); ++j) {
458 v.push_back(operation(first.heat_map_[i][j], second.heat_map_[i][j]));
460 result.heat_map_.push_back(v);
474 result.min_ = this->min_;
475 result.max_ = this->max_;
476 result.heat_map_.reserve(this->heat_map_.size());
477 for (std::size_t i = 0; i != this->heat_map_.size(); ++i) {
478 std::vector<double> v;
479 v.reserve(this->heat_map_[i].size());
480 for (std::size_t j = 0; j != this->heat_map_[i].size(); ++j) {
481 v.push_back(this->heat_map_[i][j] * scalar);
483 result.heat_map_.push_back(v);
493 return operation_on_pair_of_heat_maps(first, second, std::plus<double>());
501 return operation_on_pair_of_heat_maps(first, second, std::minus<double>());
557 if (x == 0)
throw std::invalid_argument(
"In operator /=, division by 0. Program terminated.");
558 *
this = *
this * (1 / x);
568 std::vector<double>
vectorize(
int number_of_function)
const;
616 std::pair<double, double>
get_x_range()
const {
return std::make_pair(this->min_, this->max_); }
626 std::vector<std::vector<double> > heat_map_;
629 std::vector<std::vector<double> > _check_and_initialize_maps(
const std::vector<Persistence_heat_maps*>& maps);
630 void _construct(
const std::vector<std::pair<double, double> >& intervals,
632 bool erase_below_diagonal =
false,
633 std::size_t number_of_pixels = 1000,
634 double min = std::numeric_limits<double>::max(),
635 double max = std::numeric_limits<double>::max());
639 const bool discrete_ =
true;
640 std::size_t number_of_functions_for_vectorization_;
641 std::size_t number_of_functions_for_projections_to_reals_;
642 std::function<double(std::pair<double, double>, std::pair<double, double>)> kernel_;
643 std::vector<std::pair<double, double> > interval_;
644 std::vector<double> weights_;
647 Scalling_of_kernels f_;
648 bool erase_below_diagonal_;
652template <
typename Scalling_of_kernels>
653void Persistence_heat_maps<Scalling_of_kernels>::_construct(
654 const std::vector<std::pair<double, double> >& intervals,
655 const std::vector<std::vector<double> >& filter,
656 bool erase_below_diagonal,
657 std::size_t number_of_pixels,
662 std::clog <<
"Entering construct procedure \n";
665 Scalling_of_kernels f;
669 std::clog <<
"min and max passed to construct() procedure: " << min <<
" " << max << std::endl;
674 std::clog <<
"min and max parameters will be determined based on intervals \n";
677 min = std::numeric_limits<double>::max();
678 max = -std::numeric_limits<double>::max();
680 for (std::size_t i = 0; i != intervals.size(); ++i) {
681 if (intervals[i].first < min) min = intervals[i].first;
682 if (intervals[i].second > max) max = intervals[i].second;
688 min -= fabs(max - min) / 100;
689 max += fabs(max - min) / 100;
693 std::clog <<
"min_ : " << min << std::endl;
694 std::clog <<
"max_ : " << max << std::endl;
695 std::clog <<
"number_of_pixels : " << number_of_pixels << std::endl;
702 std::vector<std::vector<double> > heat_map_;
703 for (std::size_t i = 0; i != number_of_pixels; ++i) {
704 std::vector<double> v(number_of_pixels, 0);
705 heat_map_.push_back(v);
707 this->heat_map_ = heat_map_;
710 std::clog <<
"Done creating of the heat map, now we will fill in the structure \n";
713 for (std::size_t pt_nr = 0; pt_nr != intervals.size(); ++pt_nr) {
716 static_cast<int>((intervals[pt_nr].first - this->min_) / (this->max_ - this->min_) * number_of_pixels);
718 static_cast<int>((intervals[pt_nr].second - this->min_) / (this->max_ - this->min_) * number_of_pixels);
721 std::clog <<
"point : " << intervals[pt_nr].first <<
" , " << intervals[pt_nr].second << std::endl;
722 std::clog <<
"x_grid : " << x_grid << std::endl;
723 std::clog <<
"y_grid : " << y_grid << std::endl;
728 x_grid -= filter.size() / 2;
729 y_grid -= filter.size() / 2;
733 std::clog <<
"After shift : \n";
734 std::clog <<
"x_grid : " << x_grid << std::endl;
735 std::clog <<
"y_grid : " << y_grid << std::endl;
738 double scaling_value = this->f_(intervals[pt_nr]);
740 for (std::size_t i = 0; i != filter.size(); ++i) {
741 for (std::size_t j = 0; j != filter.size(); ++j) {
743 if (((x_grid + i) >= 0) && (x_grid + i < this->heat_map_.size()) && ((y_grid + j) >= 0) &&
744 (y_grid + j < this->heat_map_.size())) {
746 std::clog << y_grid + j <<
" " << x_grid + i << std::endl;
748 this->heat_map_[y_grid + j][x_grid + i] += scaling_value * filter[i][j];
750 std::clog <<
"Position : (" << x_grid + i <<
"," << y_grid + j
751 <<
") got increased by the value : " << filter[i][j] << std::endl;
759 if (erase_below_diagonal) {
760 for (std::size_t i = 0; i != this->heat_map_.size(); ++i) {
761 for (std::size_t j = i; j != this->heat_map_.size(); ++j) {
762 this->heat_map_[i][j] = 0;
768template <
typename Scalling_of_kernels>
769std::vector<std::vector<double> > Persistence_heat_maps<Scalling_of_kernels>::_check_and_initialize_maps(
770 const std::vector<Persistence_heat_maps*>& maps)
774 for (std::size_t i = 0; i != maps.size(); ++i) {
775 GUDHI_CHECK(maps[i]->heat_map_.size() == maps[0]->heat_map_.size(),
776 "Sizes of Persistence_heat_maps are not compatible.");
777 GUDHI_CHECK(maps[i]->heat_map_[0].size() == maps[0]->heat_map_[0].size(),
778 "Sizes of Persistence_heat_maps are not compatible.");
782 const auto& map = maps[0]->heat_map_;
783 return std::vector<std::vector<double> >(map.size(), std::vector<double>(map[0].size(), 0));
786template <
typename Scalling_of_kernels>
789 std::vector<std::vector<double> > heat_maps = this->_check_and_initialize_maps(maps);
791 std::vector<double> to_compute_median(maps.size());
792 for (std::size_t i = 0; i != heat_maps.size(); ++i) {
793 for (std::size_t j = 0; j != heat_maps[i].size(); ++j) {
794 for (std::size_t map_no = 0; map_no != maps.size(); ++map_no) {
795 to_compute_median[map_no] = maps[map_no]->heat_map_[i][j];
798 to_compute_median.begin(), to_compute_median.begin() + to_compute_median.size() / 2, to_compute_median.end());
799 heat_maps[i][j] = to_compute_median[to_compute_median.size() / 2];
802 this->heat_map_ = heat_maps;
803 this->min_ = maps[0]->min_;
804 this->max_ = maps[0]->max_;
807template <
typename Scalling_of_kernels>
810 std::vector<std::vector<double> > heat_maps = this->_check_and_initialize_maps(maps);
811 for (std::size_t i = 0; i != heat_maps.size(); ++i) {
812 for (std::size_t j = 0; j != heat_maps[i].size(); ++j) {
814 for (std::size_t map_no = 0; map_no != maps.size(); ++map_no) {
815 mean += maps[map_no]->heat_map_[i][j];
817 heat_maps[i][j] = mean /
static_cast<double>(maps.size());
820 this->heat_map_ = heat_maps;
821 this->min_ = maps[0]->min_;
822 this->max_ = maps[0]->max_;
825template <
typename Scalling_of_kernels>
827 const std::vector<Persistence_heat_maps*>& maps,
830 std::vector<std::vector<double> > heat_maps = this->_check_and_initialize_maps(maps);
832 for (std::size_t i = 0; i != heat_maps.size(); ++i) {
833 for (std::size_t j = 0; j != heat_maps[i].size(); ++j) {
834 std::size_t number_of_active_levels = 0;
835 for (std::size_t map_no = 0; map_no != maps.size(); ++map_no) {
836 if (maps[map_no]->heat_map_[i][j]) number_of_active_levels++;
838 if (number_of_active_levels > cutoff) {
839 heat_maps[i][j] = number_of_active_levels;
845 this->heat_map_ = heat_maps;
846 this->min_ = maps[0]->min_;
847 this->max_ = maps[0]->max_;
850template <
typename Scalling_of_kernels>
854 std::stringstream gnuplot_script;
855 gnuplot_script << filename <<
"_GnuplotScript";
857 out.open(gnuplot_script.str().c_str());
858 out <<
"plot '-' matrix with image" << std::endl;
859 for (std::size_t i = 0; i != this->heat_map_.size(); ++i) {
860 for (std::size_t j = 0; j != this->heat_map_[i].size(); ++j) {
861 out << this->heat_map_[i][j] <<
" ";
867 std::clog <<
"To visualize, install gnuplot and type the command: gnuplot -persist -e \"load \'"
868 << gnuplot_script.str().c_str() <<
"\'\"" << std::endl;
872template <
typename Scalling_of_kernels>
879 out << this->min_ <<
" " << this->max_ << std::endl;
880 for (std::size_t i = 0; i != this->heat_map_.size(); ++i) {
881 for (std::size_t j = 0; j != this->heat_map_[i].size(); ++j) {
882 out << this->heat_map_[i][j] <<
" ";
889template <
typename Scalling_of_kernels>
898 std::cerr <<
"The file : " << filename <<
" do not exist. The program will now terminate \n";
900 throw std::invalid_argument(
"The persistence landscape file do not exist.");
905 in >> this->min_ >> this->max_;
907 std::clog <<
"Reading the following values of min and max : " << this->min_ <<
" , " << this->max_ << std::endl;
911 std::getline(in, temp);
913 std::getline(in, temp);
914 std::stringstream lineSS;
917 std::vector<double> line_of_heat_map;
918 while (lineSS.good()) {
922 line_of_heat_map.push_back(point);
924 std::clog << point <<
" ";
928 std::clog << std::endl;
931 if (in.good()) this->heat_map_.push_back(line_of_heat_map);
935 std::clog <<
"Done \n";
940template <
typename Scalling_of_kernels>
943 std::vector<double> result;
947 std::clog <<
"No vectorize method in case of infinite dimensional vectorization" << std::endl;
953 std::size_t size_of_result = 0;
954 for (std::size_t i = 0; i != this->heat_map_.size(); ++i) {
955 size_of_result += this->heat_map_[i].size();
958 result.reserve(size_of_result);
960 for (std::size_t i = 0; i != this->heat_map_.size(); ++i) {
961 for (std::size_t j = 0; j != this->heat_map_[i].size(); ++j) {
962 result.push_back(this->heat_map_[i][j]);
969template <
typename Scalling_of_kernels>
973 if (this->discrete_) {
977 std::cerr <<
"The persistence images are of non compatible sizes. We cannot therefore compute distance between "
978 "them. The program will now terminate";
980 throw std::invalid_argument(
"The persistence images are of non compatible sizes.");
987 if (power < std::numeric_limits<double>::max()) {
988 for (std::size_t i = 0; i != this->heat_map_.size(); ++i) {
989 for (std::size_t j = 0; j != this->heat_map_[i].size(); ++j) {
990 distance += std::pow(std::fabs(this->heat_map_[i][j] - second.heat_map_[i][j]), power);
995 for (std::size_t i = 0; i != this->heat_map_.size(); ++i) {
996 for (std::size_t j = 0; j != this->heat_map_[i].size(); ++j) {
997 auto diff = std::fabs(this->heat_map_[i][j] - second.heat_map_[i][j]);
1005 2 * this->compute_scalar_product(second));
1009template <
typename Scalling_of_kernels>
1013 for (std::size_t i = 0; i != this->heat_map_.size(); ++i) {
1014 for (std::size_t j = 0; j != this->heat_map_[i].size(); ++j) {
1015 result += this->heat_map_[i][j];
1021template <
typename Scalling_of_kernels>
1023 const std::vector<Persistence_heat_maps*>& to_average)
1028template <
typename Scalling_of_kernels>
1036 std::cerr <<
"The persistence images are of non compatible sizes. We cannot therefore compute distance between "
1037 "them. The program will now terminate";
1039 throw std::invalid_argument(
"The persistence images are of non compatible sizes.");
1044 double scalar_prod = 0;
1045 for (std::size_t i = 0; i != this->heat_map_.size(); ++i) {
1046 for (std::size_t j = 0; j != this->heat_map_[i].size(); ++j) {
1047 scalar_prod += this->heat_map_[i][j] * second.heat_map_[i][j];
1052 int num_pts1 = this->interval_.size();
1053 int num_pts2 = second.interval_.size();
1054 double kernel_val = 0;
1055 for (
int i = 0; i < num_pts1; i++) {
1056 std::pair<double, double>
pi = this->interval_[i];
1057 for (
int j = 0; j < num_pts2; j++) {
1058 std::pair<double, double> pj = second.interval_[j];
1059 kernel_val += this->weights_[i] * second.weights_[j] * this->kernel_(
pi, pj);
A class implementing persistence heat maps.
Definition Persistence_heat_maps.h:203
std::size_t number_of_vectorize_functions() const
Definition Persistence_heat_maps.h:574
void compute_mean(const std::vector< Persistence_heat_maps * > &maps)
Definition Persistence_heat_maps.h:808
bool check_if_the_same(const Persistence_heat_maps &second) const
Definition Persistence_heat_maps.h:368
std::vector< double > vectorize(int number_of_function) const
Definition Persistence_heat_maps.h:941
friend Persistence_heat_maps operator*(const Persistence_heat_maps &A, double scalar)
Definition Persistence_heat_maps.h:515
friend Persistence_heat_maps operator*(double scalar, const Persistence_heat_maps &A)
Definition Persistence_heat_maps.h:507
Persistence_heat_maps & operator+=(const Persistence_heat_maps &rhs)
Definition Persistence_heat_maps.h:528
std::pair< double, double > get_y_range() const
Definition Persistence_heat_maps.h:621
Persistence_heat_maps operator*(double scalar)
Definition Persistence_heat_maps.h:523
std::size_t number_of_projections_to_R() const
Definition Persistence_heat_maps.h:588
bool operator!=(const Persistence_heat_maps &rhs) const
Definition Persistence_heat_maps.h:431
Persistence_heat_maps & operator*=(double x)
Definition Persistence_heat_maps.h:546
void print_to_file(const char *filename) const
Definition Persistence_heat_maps.h:873
void compute_percentage_of_active(const std::vector< Persistence_heat_maps * > &maps, std::size_t cutoff=1)
Definition Persistence_heat_maps.h:826
Persistence_heat_maps multiply_by_scalar(double scalar) const
Definition Persistence_heat_maps.h:471
Persistence_heat_maps & operator/=(double x)
Definition Persistence_heat_maps.h:555
Persistence_heat_maps & operator-=(const Persistence_heat_maps &rhs)
Definition Persistence_heat_maps.h:537
bool operator==(const Persistence_heat_maps &rhs) const
Definition Persistence_heat_maps.h:406
double project_to_R(int number_of_function) const
Definition Persistence_heat_maps.h:1010
friend Persistence_heat_maps operator-(const Persistence_heat_maps &first, const Persistence_heat_maps &second)
Definition Persistence_heat_maps.h:499
Persistence_heat_maps(const std::vector< std::pair< double, double > > &interval, const std::vector< std::vector< double > > &filter=create_Gaussian_filter(5, 1), bool erase_below_diagonal=false, std::size_t number_of_pixels=1000, double min=std::numeric_limits< double >::max(), double max=std::numeric_limits< double >::max())
Constructor. All parameters except interval are optional.
Definition Persistence_heat_maps.h:234
Persistence_heat_maps(const char *filename, const std::vector< std::vector< double > > &filter=create_Gaussian_filter(5, 1), bool erase_below_diagonal=false, std::size_t number_of_pixels=1000, double min=std::numeric_limits< double >::max(), double max=std::numeric_limits< double >::max(), unsigned int dimension=std::numeric_limits< unsigned int >::max())
Constructor from a file. All parameters except interval are optional.
Definition Persistence_heat_maps.h:264
Persistence_heat_maps()
Definition Persistence_heat_maps.h:209
Persistence_heat_maps(const std::vector< std::pair< double, double > > &interval, const std::function< double(const std::pair< double, double > &, const std::pair< double, double > &)> &kernel, std::size_t number_of_x_pixels, std::size_t number_of_y_pixels, double min_x=0, double max_x=1, double min_y=0, double max_y=1)
Definition Persistence_heat_maps.h:282
void compute_average(const std::vector< Persistence_heat_maps * > &to_average)
Definition Persistence_heat_maps.h:1022
std::pair< double, double > get_x_range() const
Definition Persistence_heat_maps.h:616
double get_min() const
Definition Persistence_heat_maps.h:396
double get_max() const
Definition Persistence_heat_maps.h:401
double distance(const Persistence_heat_maps &second_, double power=1) const
Definition Persistence_heat_maps.h:970
void load_from_file(const char *filename)
Definition Persistence_heat_maps.h:890
void compute_median(const std::vector< Persistence_heat_maps * > &maps)
Definition Persistence_heat_maps.h:787
Persistence_heat_maps(const std::vector< std::pair< double, double > > &interval, const std::function< double(const std::pair< double, double > &, const std::pair< double, double > &)> &kernel)
Definition Persistence_heat_maps.h:318
void plot(const char *filename) const
Definition Persistence_heat_maps.h:851
double compute_scalar_product(const Persistence_heat_maps &second_) const
Definition Persistence_heat_maps.h:1029
friend Persistence_heat_maps operator+(const Persistence_heat_maps &first, const Persistence_heat_maps &second)
Definition Persistence_heat_maps.h:491
Definition Persistence_heat_maps.h:161
Definition Persistence_heat_maps.h:112
Definition Persistence_heat_maps.h:125
Definition Persistence_heat_maps.h:143
This file contain an implementation of some common procedures used in the Persistence_representations...
constexpr double pi
Definition common_persistence_representations.h:45
std::vector< std::vector< double > > create_Gaussian_filter(std::size_t pixel_radius, double sigma)
Definition Persistence_heat_maps.h:46
bool almost_equal(double a, double b)
Definition common_persistence_representations.h:65
std::vector< std::pair< double, double > > read_persistence_intervals_in_one_dimension_from_file(std::string const &filename, int dimension=-1, double what_to_substitute_for_infinite_bar=-1)
Definition read_persistence_from_file.h:44
Gudhi namespace.
Definition SimplicialComplexForAlpha.h:14