A class implementing persistence vectors. More...
Public Member Functions | |
Vector_distances_in_diagram () | |
Vector_distances_in_diagram (const std::vector< std::pair< double, double > > &intervals, size_t where_to_cut) | |
Vector_distances_in_diagram (const char *filename, size_t where_to_cut, unsigned dimension=std::numeric_limits< unsigned >::max()) | |
double | vector_in_position (size_t position) const |
size_t | size () const |
void | write_to_file (const char *filename) const |
void | print_to_file (const char *filename) const |
void | load_from_file (const char *filename) |
bool | operator== (const Vector_distances_in_diagram &second) 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 |
void | compute_average (const std::vector< Vector_distances_in_diagram *> &to_average) |
double | distance (const Vector_distances_in_diagram &second, double power=1) const |
double | compute_scalar_product (const Vector_distances_in_diagram &second) const |
std::vector< double > | output_for_visualization () const |
void | plot (const char *filename) const |
std::pair< double, double > | get_x_range () const |
std::pair< double, double > | get_y_range () const |
Vector_distances_in_diagram | multiply_by_scalar (double scalar) const |
Vector_distances_in_diagram | operator* (double scalar) |
Vector_distances_in_diagram | operator+= (const Vector_distances_in_diagram &rhs) |
Vector_distances_in_diagram | operator-= (const Vector_distances_in_diagram &rhs) |
Vector_distances_in_diagram | operator*= (double x) |
Vector_distances_in_diagram | operator/= (double x) |
Friends | |
template<typename K > | |
std::ostream & | operator<< (std::ostream &out, const Vector_distances_in_diagram< K > &d) |
Vector_distances_in_diagram | operator+ (const Vector_distances_in_diagram &first, const Vector_distances_in_diagram &second) |
Vector_distances_in_diagram | operator- (const Vector_distances_in_diagram &first, const Vector_distances_in_diagram &second) |
Vector_distances_in_diagram | operator* (double scalar, const Vector_distances_in_diagram &A) |
Vector_distances_in_diagram | operator* (const Vector_distances_in_diagram &A, double scalar) |
A class implementing persistence vectors.
This is an implementation of idea presented in the paper Stable Topological Signatures for Points on 3D Shapes [16] .
The parameter of the class is the class that computes distance used to construct the vectors. The typical function is either Euclidean of maximum (Manhattan) distance.
This class implements the following concepts: Vectorized_topological_data, Topological_data_with_distances, Real_valued_topological_data, Topological_data_with_averages, Topological_data_with_scalar_product
|
inline |
The default constructor.
Gudhi::Persistence_representations::Vector_distances_in_diagram< F >::Vector_distances_in_diagram | ( | const std::vector< std::pair< double, double > > & | intervals, |
size_t | where_to_cut | ||
) |
The constructor that takes as an input a multiset of persistence intervals (given as vector of birth-death pairs). The second parameter is the desired length of the output vectors.
Gudhi::Persistence_representations::Vector_distances_in_diagram< F >::Vector_distances_in_diagram | ( | const char * | filename, |
size_t | where_to_cut, | ||
unsigned | dimension = std::numeric_limits<unsigned>::max() |
||
) |
The constructor taking as an input a file with birth-death pairs. The second parameter is the desired length of the output vectors.
void Gudhi::Persistence_representations::Vector_distances_in_diagram< F >::compute_average | ( | const std::vector< Vector_distances_in_diagram< F > *> & | to_average | ) |
Compute a average of two persistent vectors. This function is required by Topological_data_with_averages concept.
double Gudhi::Persistence_representations::Vector_distances_in_diagram< F >::compute_scalar_product | ( | const Vector_distances_in_diagram< F > & | second | ) | const |
Compute a scalar product of two persistent vectors. This function is required in Topological_data_with_scalar_product concept.
double Gudhi::Persistence_representations::Vector_distances_in_diagram< F >::distance | ( | const Vector_distances_in_diagram< F > & | second, |
double | power = 1 |
||
) | const |
Compute a distance of two persistent vectors. This function is required in Topological_data_with_distances concept. For max norm distance, set power to std::numeric_limits<double>::max()
|
inline |
The x-range of the persistence vector.
|
inline |
The y-range of the persistence vector.
void Gudhi::Persistence_representations::Vector_distances_in_diagram< F >::load_from_file | ( | const char * | filename | ) |
Loading a vector to a file.
|
inline |
This function implements an operation of multiplying Vector_distances_in_diagram by a scalar.
|
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 vector. It is required in a concept Vectorized_topological_data.
|
inline |
This function computes a product of an object of a type Vector_distances_in_diagram with real number.
|
inline |
*= operator for Vector_distances_in_diagram.
|
inline |
+= operator for Vector_distances_in_diagram.
|
inline |
-= operator for Vector_distances_in_diagram.
|
inline |
/= operator for Vector_distances_in_diagram.
|
inline |
Comparison operators:
|
inline |
For visualization use output from vectorize and build histograms.
|
inline |
Create a gnuplot script to visualize the data structure.
|
inline |
Write a vector to a file.
double Gudhi::Persistence_representations::Vector_distances_in_diagram< F >::project_to_R | ( | int | number_of_function | ) | const |
Compute projection to real numbers of persistence vector. This function is required by the Real_valued_topological_data concept 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 a size of a vector.
|
inline |
This procedure gives the value of a vector on a given position.
std::vector< double > Gudhi::Persistence_representations::Vector_distances_in_diagram< F >::vectorize | ( | int | number_of_function | ) | const |
Compute a vectorization of a persistent vectors. It is required in a concept Vectorized_topological_data.
void Gudhi::Persistence_representations::Vector_distances_in_diagram< F >::write_to_file | ( | const char * | filename | ) | const |
Write a vector to a file.
|
friend |
This function computes a product of an object of a type Vector_distances_in_diagram with real number.
|
friend |
This function computes a product of an object of a type Vector_distances_in_diagram with real number.
|
friend |
This function computes a sum of two objects of a type Vector_distances_in_diagram.
|
friend |
This function computes a difference of two objects of a type Vector_distances_in_diagram.
|
friend |
Writing 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 09:41:16 for GUDHI by Doxygen 1.8.13 |