12 #ifndef UTILS_PERSISTENCE_COMPUTE_H_
13 #define UTILS_PERSISTENCE_COMPUTE_H_
16 #include <gudhi/Simplex_tree.h>
18 #include <gudhi/Persistent_cohomology.h>
19 #include <gudhi/Rips_complex.h>
23 struct Persistence_params {
29 Persistence_params(
int p_,
double th_,
int max_dim_ = 10,
double min_pers_ = 0)
30 : p(p_), threshold(th_), max_dim(max_dim_), min_pers(min_pers_) { }
38 typedef typename SkBlComplex::Vertex_handle Vertex_handle;
39 typedef typename SkBlComplex::Edge_handle Edge_handle;
51 typedef std::vector<double> Point_t;
52 std::vector< Point_t > points;
53 points.reserve(complex.num_vertices());
54 for (
auto v : complex.vertex_range()) {
55 const auto & pt = complex.point(v);
56 Point_t pt_to_add(pt.cartesian_begin(), pt.cartesian_end());
57 points.emplace_back(std::move(pt_to_add));
75 stream <<
"persistence: \n";
76 stream <<
"p dimension birth death: \n";
Compute the Euclidean distance between two Points given by a range of coordinates....
Definition: distance_functions.h:34
Options::Filtration_value Filtration_value
Type for the value of the filtration function.
Definition: Simplex_tree.h:82
Structure representing the coefficient field .
Definition: Field_Zp.h:27
Computes the persistent cohomology of a filtered complex.
Definition: Persistent_cohomology.h:52
void output_diagram(std::ostream &ostream=std::cout)
Output the persistence diagram in ostream.
Definition: Persistent_cohomology.h:561
void compute_persistent_cohomology(Filtration_value min_interval_length=0)
Compute the persistent homology of the filtered simplicial complex.
Definition: Persistent_cohomology.h:172
void init_coefficients(int charac)
Initializes the coefficient field.
Definition: Persistent_cohomology.h:156
Rips complex data structure.
Definition: Rips_complex.h:45
void create_complex(SimplicialComplexForRips &complex, int dim_max)
Initializes the simplicial complex from the Rips graph and expands it until a given maximal dimension...
Definition: Rips_complex.h:101
Definition: Persistence_compute.h:36
Persistence_compute(SkBlComplex &complex, std::ostream &stream, const Persistence_params ¶ms)
Compute persistence parameters : unsigned dim_max double threshold int p for coefficient Z_p.
Definition: Persistence_compute.h:48
Global distance functions.
Graph simplicial complex methods.
Value type for a filtration function on a cell complex.
Definition: FiltrationValue.h:20