#include <gudhi/Simplex_tree.h>
#include <gudhi/Persistent_cohomology.h>
#include <iostream>
#include <vector>
#include <cstdint>
static const bool store_key = true;
typedef std::uint8_t Simplex_key;
};
int main() {
const short edge01[] = {0, 1};
const short edge02[] = {0, 2};
const short edge12[] = {1, 2};
const short edge03[] = {0, 3};
const short edge13[] = {1, 3};
const short edge35[] = {3, 5};
const short vertex4[] = {4};
pcoh.init_coefficients(2);
pcoh.compute_persistent_cohomology();
pcoh.output_diagram();
std::clog << std::endl;
std::clog << "The Betti numbers are : ";
for (int i = 0; i < 3; i++)
std::clog << "b" << i << " = " << pcoh.betti_number(i) << " ; ";
std::clog << std::endl;
}
Simplex Tree data structure for representing simplicial complexes.
Definition: Simplex_tree.h:95
std::pair< Simplex_handle, bool > insert_simplex_and_subfaces(const InputVertexRange &Nsimplex, Filtration_value filtration=0)
Insert a N-simplex and all his subfaces, from a N-simplex represented by a range of Vertex_handles,...
Definition: Simplex_tree.h:942
std::pair< Simplex_handle, bool > insert_simplex(const InputVertexRange &simplex, Filtration_value filtration=0)
Insert a simplex, represented by a range of Vertex_handles, in the simplicial complex.
Definition: Simplex_tree.h:913
Structure representing the coefficient field .
Definition: Field_Zp.h:27
Computes the persistent cohomology of a filtered complex.
Definition: Persistent_cohomology.h:54
Definition: simplex_tree_options.h:63
Handle type for the vertices of a cell complex.
Definition: VertexHandle.h:15