Public Member Functions | |
| Persistence_intervals (const char *filename, unsigned dimension=std::numeric_limits< unsigned >::max()) | |
| Persistence_intervals (const std::vector< std::pair< double, double > > &intervals) | |
| std::pair< double, double > | get_x_range () const |
| std::pair< double, double > | get_y_range () const |
| std::vector< double > | length_of_dominant_intervals (size_t where_to_cut=100) const |
| std::vector< std::pair< double, double > > | dominant_intervals (size_t where_to_cut=100) const |
| std::vector< size_t > | histogram_of_lengths (size_t number_of_bins=10) const |
| std::vector< size_t > | cumulative_histogram_of_lengths (size_t number_of_bins=10) const |
| std::vector< double > | characteristic_function_of_diagram (double x_min, double x_max, size_t number_of_bins=10) const |
| std::vector< double > | cumulative_characteristic_function_of_diagram (double x_min, double x_max, size_t number_of_bins=10) const |
| std::vector< std::pair< double, size_t > > | compute_persistent_betti_numbers () const |
| std::vector< double > | k_n_n (size_t k, 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 |
| size_t | size () const |
| std::pair< double, double > | operator[] (size_t i) const |
| double | project_to_R (int number_of_function) const |
| size_t | number_of_projections_to_R () const |
| std::vector< double > | vectorize (int number_of_function) const |
| size_t | number_of_vectorize_functions () const |
Friends | |
| std::ostream & | operator<< (std::ostream &out, const Persistence_intervals &intervals) |
This class implements the following concepts: Vectorized_topological_data, Topological_data_with_distances, Real_valued_topological_data
| Gudhi::Persistence_representations::Persistence_intervals::Persistence_intervals | ( | const char * | filename, |
| unsigned | dimension = std::numeric_limits<unsigned>::max() |
||
| ) |
This is a constructor of a class Persistence_intervals from a text file. Each 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.
| Gudhi::Persistence_representations::Persistence_intervals::Persistence_intervals | ( | const std::vector< std::pair< double, double > > & | intervals | ) |
This is a constructor of a class Persistence_intervals from a vector of pairs. Each pair is assumed to represent a persistence interval. We assume that the first elements of pairs are smaller or equal the second elements of pairs.
| std::vector< double > Gudhi::Persistence_representations::Persistence_intervals::characteristic_function_of_diagram | ( | double | x_min, |
| double | x_max, | ||
| size_t | number_of_bins = 10 |
||
| ) | const |
In this procedure we assume that each barcode is a characteristic function of a hight equal to its length. The persistence diagram is a sum of such a functions. The procedure below construct a function being a sum of the characteristic functions of persistence intervals. The first two parameters are the range in which the function is to be computed and the last parameter is the number of bins in the discretization of the interval [_min,_max].
| std::vector< std::pair< double, size_t > > Gudhi::Persistence_representations::Persistence_intervals::compute_persistent_betti_numbers | ( | ) | const |
Compute the function of persistence Betti numbers. The returned value is a vector of pair. First element of each pair is a place where persistence Betti numbers change. Second element of each pair is the value of Persistence Betti numbers at that point.
| std::vector< double > Gudhi::Persistence_representations::Persistence_intervals::cumulative_characteristic_function_of_diagram | ( | double | x_min, |
| double | x_max, | ||
| size_t | number_of_bins = 10 |
||
| ) | const |
Cumulative version of the function characteristic_function_of_diagram
| std::vector< size_t > Gudhi::Persistence_representations::Persistence_intervals::cumulative_histogram_of_lengths | ( | size_t | number_of_bins = 10 | ) | const |
Based on a histogram of intervals lengths computed by the function histogram_of_lengths H the procedure below computes the cumulative histogram. The i-th position of the resulting histogram is the sum of values of H for the positions from 0 to i.
| std::vector< std::pair< double, double > > Gudhi::Persistence_representations::Persistence_intervals::dominant_intervals | ( | size_t | where_to_cut = 100 | ) | const |
Procedure that compute the vector of the dominant (i.e. the longest) persistence intervals. The parameter of
the procedure (set by default to 100) is the number of dominant intervals returned by the procedure.
|
inline |
This procedure returns x-range of a given persistence diagram.
|
inline |
This procedure returns y-range of a given persistence diagram.
| std::vector< size_t > Gudhi::Persistence_representations::Persistence_intervals::histogram_of_lengths | ( | size_t | number_of_bins = 10 | ) | const |
Procedure to compute a histogram of interval's length. A histogram is a block plot. The number of blocks is
determined by the first parameter of the function (set by default to 10). For the sake of argument let us assume that the length of the longest interval is 1 and the number of bins is
| std::vector< double > Gudhi::Persistence_representations::Persistence_intervals::k_n_n | ( | size_t | k, |
| size_t | where_to_cut = 10 |
||
| ) | const |
This is a non optimal procedure that compute vector of distances from each point of diagram to its k-th nearest neighbor (k is a parameter of the program). The resulting vector is by default truncated to 10 elements (this value can be changed by using the second parameter of the program). The points are returned in order from the ones which are farthest away from their k-th nearest neighbors.
| std::vector< double > Gudhi::Persistence_representations::Persistence_intervals::length_of_dominant_intervals | ( | size_t | where_to_cut = 100 | ) | const |
Procedure that compute the vector of lengths of the dominant (i.e. the longest) persistence intervals. The list is truncated at the parameter of the call where_to_cut (set by default to 100).
|
inline |
The function gives the number of possible projections to R. This function is required by the Real_valued_topological_data concept.
|
inline |
This function return the number of functions that allows vectorization of a persistence diagram. It is required in a concept Vectorized_topological_data.
|
inline |
Return the persistence interval at the given position. Note that intervals are not sorted with respect to their lengths.
|
inline |
Generating gnuplot script to plot the interval.
| double Gudhi::Persistence_representations::Persistence_intervals::project_to_R | ( | int | number_of_function | ) | const |
This is a simple function projecting the persistence intervals to a real number. The function we use here is a sum of squared lengths of intervals. It can be naturally interpreted as sum of step function, where the step hight it equal to the length of the interval. At the moment this function is not tested, since it is quite likely to be changed in the future. Given this, when using it, keep in mind that it will be most likely changed in the next versions.
|
inline |
Return number of points in the diagram.
|
inline |
Return a family of vectors obtained from the persistence diagram. The i-th vector consist of the length of i dominant persistence intervals.
|
friend |
Operator that send the diagram to a stream.
| GUDHI Version 3.4.1 - C++ library for Topological Data Analysis (TDA) and Higher Dimensional Geometry Understanding. - Copyright : MIT | Generated on Fri Jan 22 2021 10:27:48 for GUDHI by Doxygen 1.9.1 |