#include <gudhi/Persistence_landscape_on_grid.h>
#include <iostream>
#include <utility>
#include <vector>
int main(int argc, char** argv) {
std::vector<std::pair<double, double> > persistence1;
std::vector<std::pair<double, double> > persistence2;
persistence1.push_back(std::make_pair(1, 2));
persistence1.push_back(std::make_pair(6, 8));
persistence1.push_back(std::make_pair(0, 4));
persistence1.push_back(std::make_pair(3, 8));
persistence2.push_back(std::make_pair(2, 9));
persistence2.push_back(std::make_pair(1, 6));
persistence2.push_back(std::make_pair(3, 5));
persistence2.push_back(std::make_pair(6, 10));
std::clog << "l1 : " << l1 << std::endl;
std::clog << "l2 : " << l2 << std::endl;
std::clog << "average : " << average << std::endl;
std::clog <<
"Distance : " << l1.
distance(l2) << std::endl;
average.
plot(
"average_landscape");
return 0;
}
A class implementing persistence landscapes by approximating them on a collection of grid points.
Definition: Persistence_landscape_on_grid.h:59
double compute_integral_of_landscape() const
Definition: Persistence_landscape_on_grid.h:140
double compute_scalar_product(const Persistence_landscape_on_grid &second)
Definition: Persistence_landscape_on_grid.h:877
double distance(const Persistence_landscape_on_grid &second, double power=1) const
Definition: Persistence_landscape_on_grid.h:864
double compute_maximum() const
Definition: Persistence_landscape_on_grid.h:468
void compute_average(const std::vector< Persistence_landscape_on_grid * > &to_average)
Definition: Persistence_landscape_on_grid.h:802
void plot(const char *filename, size_t from_, size_t to_) const
Definition: Persistence_landscape_on_grid.h:897
double compute_norm_of_landscape(double i) const
Definition: Persistence_landscape_on_grid.h:532