12 #ifndef CECH_COMPLEX_H_
13 #define CECH_COMPLEX_H_
15 #include <gudhi/Sphere_circumradius.h>
17 #include <gudhi/Debug_utils.h>
18 #include <gudhi/Cech_complex_blocker.h>
25 namespace cech_complex {
43 template <
typename Kernel,
typename SimplicialComplexForCechComplex>
47 using Vertex_handle =
typename SimplicialComplexForCechComplex::Vertex_handle;
48 using Filtration_value =
typename SimplicialComplexForCechComplex::Filtration_value;
51 using cech_blocker = Cech_blocker<SimplicialComplexForCechComplex, Cech_complex, Kernel>;
53 using Point_d =
typename cech_blocker::Point_d;
54 using Point_cloud = std::vector<Point_d>;
57 using FT =
typename cech_blocker::FT;
59 using Sphere =
typename cech_blocker::Sphere;
71 template<
typename InputPo
intRange >
74 point_cloud_.assign(std::begin(points), std::end(points));
76 cech_skeleton_graph_ = Gudhi::compute_proximity_graph<SimplicialComplexForCechComplex>(
77 point_cloud_, max_radius_, Sphere_circumradius<Kernel, Filtration_value>(exact));
89 GUDHI_CHECK(complex.num_vertices() == 0,
90 std::invalid_argument(
"Cech_complex::create_complex - simplicial complex is not empty"));
93 complex.insert_graph(cech_skeleton_graph_);
95 complex.expansion_with_blockers(dim_max, cech_blocker(&complex,
this));
99 Filtration_value
max_radius()
const {
return max_radius_; }
104 const Point_d&
get_point(Vertex_handle vertex)
const {
return point_cloud_[vertex]; }
119 Point_cloud point_cloud_;
120 std::vector<Sphere> cache_;
Cech complex class.
Definition: Cech_complex.h:44
const Point_d & get_point(Vertex_handle vertex) const
Definition: Cech_complex.h:104
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:72
std::vector< Sphere > & get_cache()
Definition: Cech_complex.h:109
const bool is_exact()
Check exact option.
Definition: Cech_complex.h:114
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:88
Filtration_value max_radius() const
Definition: Cech_complex.h:99
Graph simplicial complex methods.
Gudhi namespace.
Definition: SimplicialComplexForAlpha.h:14
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