11 #ifndef CECH_COMPLEX_H_
12 #define CECH_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;
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]; }
111 Point_cloud point_cloud_;
118 #endif // CECH_COMPLEX_H_