#include <gudhi/Cech_complex.h>
#include <gudhi/Simplex_tree.h>
#include <CGAL/Epeck_d.h>
#include <iostream>
#include <string>
#include <vector>
int main() {
using Kernel = CGAL::Epeck_d<CGAL::Dimension_tag<2>>;
using Point = typename Kernel::Point_d;
using Point_cloud = std::vector<Point>;
Point_cloud points;
points.emplace_back(1., 0.);
points.emplace_back(0., 1.);
points.emplace_back(2., 1.);
points.emplace_back(3., 2.);
points.emplace_back(0., 3.);
points.emplace_back(3. + std::sqrt(3.), 3.);
points.emplace_back(1., 4.);
points.emplace_back(3., 4.);
points.emplace_back(2., 4. + std::sqrt(3.));
points.emplace_back(0., 4.);
points.emplace_back(-0.5, 2.);
Cech_complex cech_complex_from_points(points, max_radius);
cech_complex_from_points.create_complex(stree, 2);
std::clog <<
"Cech complex is of dimension " << stree.
dimension() <<
" - " << stree.
num_simplices() <<
" simplices - "
std::clog << "Iterator on Cech complex simplices in the filtration order, with [filtration value]:" << std::endl;
std::clog << " ( ";
std::clog << vertex << " ";
}
std::clog << ") -> "
std::clog << std::endl;
}
return 0;
}
Options::Filtration_value Filtration_value
Type for the value of the filtration function.
Definition: Simplex_tree.h:102
Filtration_simplex_range const & filtration_simplex_range(Indexing_tag=Indexing_tag())
Returns a range over the simplices of the simplicial complex, in the order of the filtration.
Definition: Simplex_tree.h:338
Simplex_vertex_range simplex_vertex_range(Simplex_handle sh) const
Returns a range over the vertices of a simplex.
Definition: Simplex_tree.h:349
static Filtration_value filtration(Simplex_handle sh)
Returns the filtration value of a simplex.
Definition: Simplex_tree.h:614
size_t num_vertices() const
Returns the number of vertices in the complex.
Definition: Simplex_tree.h:651
size_t num_simplices()
Returns the number of simplices in the simplex_tree.
Definition: Simplex_tree.h:664
Cech complex class.
Definition: Cech_complex.h:44
Value type for a filtration function on a cell complex.
Definition: FiltrationValue.h:20