11#ifndef CECH_COMPLEX_H_
12#define CECH_COMPLEX_H_
14#include <gudhi/Sphere_circumradius.h>
16#include <gudhi/Debug_utils.h>
17#include <gudhi/Cech_complex_blocker.h>
24namespace cech_complex {
42template <
typename Kernel,
typename SimplicialComplexForCechComplex>
46 using Vertex_handle =
typename SimplicialComplexForCechComplex::Vertex_handle;
47 using Filtration_value =
typename SimplicialComplexForCechComplex::Filtration_value;
50 using cech_blocker = Cech_blocker<SimplicialComplexForCechComplex, Cech_complex, Kernel>;
52 using Point_d =
typename cech_blocker::Point_d;
53 using Point_cloud = std::vector<Point_d>;
56 using FT =
typename cech_blocker::FT;
58 using Sphere =
typename cech_blocker::Sphere;
70 template<
typename InputPo
intRange >
73 point_cloud_.assign(std::begin(points), std::end(points));
75 cech_skeleton_graph_ = Gudhi::compute_proximity_graph<SimplicialComplexForCechComplex>(
76 point_cloud_, max_radius_, Sphere_circumradius<Kernel, Filtration_value>(exact));
88 GUDHI_CHECK(complex.num_vertices() == 0,
89 std::invalid_argument(
"Cech_complex::create_complex - simplicial complex is not empty"));
92 complex.insert_graph(cech_skeleton_graph_);
94 complex.expansion_with_blockers(dim_max, cech_blocker(&complex,
this));
98 Filtration_value
max_radius()
const {
return max_radius_; }
103 const Point_d&
get_point(Vertex_handle vertex)
const {
return point_cloud_[vertex]; }
118 Point_cloud point_cloud_;
119 std::vector<Sphere> cache_;
Cech complex class.
Definition: Cech_complex.h:43
Cech_complex(const InputPointRange &points, Filtration_value max_radius, const bool exact=false)
Cech_complex constructor from a range of points.
Definition: Cech_complex.h:71
const Point_d & get_point(Vertex_handle vertex) const
Definition: Cech_complex.h:103
std::vector< Sphere > & get_cache()
Definition: Cech_complex.h:108
const bool is_exact()
Check exact option.
Definition: Cech_complex.h:113
void create_complex(SimplicialComplexForCechComplex &complex, int dim_max)
Initializes the simplicial complex from the proximity graph and expands it until a given maximal dime...
Definition: Cech_complex.h:87
Filtration_value max_radius() const
Definition: Cech_complex.h:98
Graph simplicial complex methods.
typename boost::adjacency_list< boost::vecS, boost::vecS, boost::directedS, boost::property< vertex_filtration_t, typename SimplicialComplexForProximityGraph::Filtration_value >, boost::property< edge_filtration_t, typename SimplicialComplexForProximityGraph::Filtration_value > > Proximity_graph
Proximity_graph contains the vertices and edges with their filtration values in order to store the re...
Definition: graph_simplicial_complex.h:45
Value type for a filtration function on a cell complex.
Definition: FiltrationValue.h:20