#include <iostream>
#include <limits>
#include <vector>
#include <utility>
#include <gudhi/Persistence_intervals.h>
int main(int argc, char** argv)
{
if ((argc != 3) && (argc != 2)) {
std::clog << "This program creates a gnuplot script from a single persistence diagram file (*.pers).\n"
<< "To run this program, please provide the name of a file with persistence diagram.\n"
<< "The second optional parameter of a program is the dimension of the persistence that is to be used. "
<< "If your file contains only birth-death pairs, you can skip this parameter.\n";
return 1;
}
unsigned dimension = std::numeric_limits<unsigned>::max();
int dim = -1;
if (argc == 3) {
dim = atoi(argv[2]);
}
if (dim >= 0) {
dimension = (unsigned)dim;
}
std::vector<std::pair<double, double> > intervals =
Persistence_intervals b(intervals);
return 0;
}
This class implements the following concepts: Vectorized_topological_data, Topological_data_with_dist...
Definition Persistence_intervals.h:51
void plot(const char *filename, double min_x=std::numeric_limits< double >::max(), double max_x=std::numeric_limits< double >::max(), double min_y=std::numeric_limits< double >::max(), double max_y=std::numeric_limits< double >::max()) const
Definition Persistence_intervals.h:187
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