Loading...
Searching...
No Matches
Gudhi::Persistence_representations::Persistence_intervals_with_distances Class Reference

This class implements the following concepts: Vectorized_topological_data, Topological_data_with_distances, Real_valued_topological_data. More...

#include <gudhi/Persistence_intervals_with_distances.h>

Public Member Functions

double distance (const Persistence_intervals_with_distances &second, double power=std::numeric_limits< double >::max(), double tolerance=(std::numeric_limits< double >::min)()) const
 Computes the distance to the persistence diagram given as a parameter.
 Persistence_intervals (const char *filename, unsigned int dimension=std::numeric_limits< unsigned int >::max())
 Constructor from a text file.
 Persistence_intervals (const std::vector< std::pair< double, double > > &intervals)
 Constructor from a vector of pairs.
Public Member Functions inherited from Gudhi::Persistence_representations::Persistence_intervals
 Persistence_intervals (const char *filename, unsigned int dimension=std::numeric_limits< unsigned int >::max())
 Constructor from a text file.
 Persistence_intervals (const std::vector< std::pair< double, double > > &intervals)
 Constructor from a vector of pairs.
std::pair< double, double > get_x_range () const
std::pair< double, double > get_y_range () const
std::vector< double > length_of_dominant_intervals (std::size_t where_to_cut=100) const
std::vector< std::pair< double, double > > dominant_intervals (std::size_t where_to_cut=100) const
std::vector< std::size_t > histogram_of_lengths (std::size_t number_of_bins=10) const
std::vector< std::size_t > cumulative_histogram_of_lengths (std::size_t number_of_bins=10) const
std::vector< double > characteristic_function_of_diagram (double x_min, double x_max, std::size_t number_of_bins=10) const
std::vector< double > cumulative_characteristic_function_of_diagram (double x_min, double x_max, std::size_t number_of_bins=10) const
std::vector< std::pair< double, std::size_t > > compute_persistent_betti_numbers () const
std::vector< double > k_n_n (std::size_t k, std::size_t where_to_cut=10) const
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
std::size_t size () const
const std::pair< double, double > & operator[] (std::size_t i) const
double project_to_R (int number_of_function) const
std::size_t number_of_projections_to_R () const
std::vector< double > vectorize (int number_of_function) const
std::size_t number_of_vectorize_functions () const

Detailed Description

Member Function Documentation

◆ distance()

double Gudhi::Persistence_representations::Persistence_intervals_with_distances::distance ( const Persistence_intervals_with_distances & second,
double power = std::numeric_limits<double>::max(),
double tolerance = (std::numeric_limits<double>::min)() ) const
inline

Computes the distance to the persistence diagram given as a parameter.

Parameters
secondDiagram to which to compute the distance.
powerIt is here in case we would like to compute \( power^{th} \) Wasserstein distance. At the moment, this method only implement Bottleneck distance, which is infinity Wasserstein distance. Therefore any power which is not the default std::numeric_limits<double>::max() will be ignored and an exception will be thrown.
toleranceIt is the additive error of the approximation, set by default to zero.

◆ Persistence_intervals() [1/2]

Gudhi::Persistence_representations::Persistence_intervals::Persistence_intervals ( const char * filename,
unsigned int dimension = std::numeric_limits<unsigned int>::max() )
inline

Constructor from a text file.

Parameters
filenameEach line of the input file is supposed to contain two numbers of a type double (or convertible to double) representing the birth and the death of the persistence interval. If the pairs are not sorted so that birth <= death, then the constructor will sort then that way. It is possible to have a third value at the begining of a line which represent the dimension of the interval.
dimensionIf anything other than std::numeric_limits<unsigned int>::max(), only the intervals in this given dimension are token into account if the dimension is given in the file lines. Ignored otherwise. Default value: std::numeric_limits<double>::max().

◆ Persistence_intervals() [2/2]

Gudhi::Persistence_representations::Persistence_intervals::Persistence_intervals ( const std::vector< std::pair< double, double > > & intervals)
inline

Constructor from a vector of pairs.

Parameters
intervalsEach pair in the vector is assumed to represent a persistence interval \( (b, d) \), such that \( b \leq d \).

The documentation for this class was generated from the following file: