11#ifndef CECH_COMPLEX_H_
12#define CECH_COMPLEX_H_
16#include <gudhi/Debug_utils.h>
17#include <gudhi/Cech_complex_blocker.h>
25namespace cech_complex {
43template <
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_;
Compute the radius of the minimal enclosing ball between Points given by a range of coordinates....
Definition: distance_functions.h:64
Cech complex data structure.
Definition: Cech_complex.h:44
Cech_complex(const ForwardPointRange &points, Filtration_value max_radius)
Cech_complex constructor from a list of points.
Definition: Cech_complex.h:71
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
Filtration_value max_radius() const
Definition: Cech_complex.h:101
const Point & get_point(Vertex_handle vertex) const
Definition: Cech_complex.h:106
Global distance functions.
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