11 #ifndef CECH_COMPLEX_H_ 12 #define CECH_COMPLEX_H_ 15 #include <gudhi/graph_simplicial_complex.h> 16 #include <gudhi/Debug_utils.h> 17 #include <gudhi/Cech_complex_blocker.h> 25 namespace cech_complex {
43 template <
typename SimplicialComplexForProximityGraph,
typename ForwardPo
intRange>
47 using Vertex_handle =
typename SimplicialComplexForProximityGraph::Vertex_handle;
48 using Filtration_value =
typename SimplicialComplexForProximityGraph::Filtration_value;
49 using Proximity_graph = Gudhi::Proximity_graph<SimplicialComplexForProximityGraph>;
52 using Point_from_range_iterator =
typename boost::range_const_iterator<ForwardPointRange>::type;
53 using Point_from_range =
typename std::iterator_traits<Point_from_range_iterator>::value_type;
54 using Coordinate_iterator =
typename boost::range_const_iterator<Point_from_range>::type;
55 using Coordinate =
typename std::iterator_traits<Coordinate_iterator>::value_type;
59 using Point = std::vector<Coordinate>;
60 using Point_cloud = std::vector<Point>;
73 point_cloud_.reserve(boost::size(points));
74 for (
auto&& point : points) point_cloud_.emplace_back(std::begin(point), std::end(point));
76 cech_skeleton_graph_ = Gudhi::compute_proximity_graph<SimplicialComplexForProximityGraph>(
88 template <
typename SimplicialComplexForCechComplex>
90 GUDHI_CHECK(complex.num_vertices() == 0,
91 std::invalid_argument(
"Cech_complex::create_complex - simplicial complex is not empty"));
94 complex.insert_graph(cech_skeleton_graph_);
96 complex.expansion_with_blockers(dim_max,
97 Cech_blocker<SimplicialComplexForCechComplex, Cech_complex>(&complex,
this));
106 const Point&
get_point(Vertex_handle vertex)
const {
return point_cloud_[vertex]; }
109 Proximity_graph cech_skeleton_graph_;
110 Filtration_value max_radius_;
111 Point_cloud point_cloud_;
118 #endif // CECH_COMPLEX_H_ Cech_complex(const ForwardPointRange &points, Filtration_value max_radius)
Cech_complex constructor from a list of points.
Definition: Cech_complex.h:71
Definition: SimplicialComplexForAlpha.h:14
Global distance functions.
Compute the radius of the minimal enclosing ball between Points given by a range of coordinates...
Definition: distance_functions.h:64
const Point & get_point(Vertex_handle vertex) const
Definition: Cech_complex.h:106
Cech complex data structure.
Definition: Cech_complex.h:44
Filtration_value max_radius() const
Definition: Cech_complex.h:101
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:89