summaryrefslogtreecommitdiff
path: root/src/Cech_complex
diff options
context:
space:
mode:
Diffstat (limited to 'src/Cech_complex')
-rw-r--r--src/Cech_complex/include/gudhi/Cech_complex.h2
-rw-r--r--src/Cech_complex/include/gudhi/Cech_complex_blocker.h10
2 files changed, 6 insertions, 6 deletions
diff --git a/src/Cech_complex/include/gudhi/Cech_complex.h b/src/Cech_complex/include/gudhi/Cech_complex.h
index 7c2e31ac..1cae7b0b 100644
--- a/src/Cech_complex/include/gudhi/Cech_complex.h
+++ b/src/Cech_complex/include/gudhi/Cech_complex.h
@@ -97,7 +97,7 @@ class Cech_complex {
complex.insert_graph(cech_skeleton_graph_);
// expand the graph until dimension dim_max
complex.expansion_with_blockers(dim_max,
- Cech_blocker<SimplicialComplexForCechComplex, ForwardPointRange>(complex, this));
+ Cech_blocker<SimplicialComplexForCechComplex, ForwardPointRange>(&complex, this));
}
/** @return max_radius value given at construction. */
diff --git a/src/Cech_complex/include/gudhi/Cech_complex_blocker.h b/src/Cech_complex/include/gudhi/Cech_complex_blocker.h
index c082815d..6755c826 100644
--- a/src/Cech_complex/include/gudhi/Cech_complex_blocker.h
+++ b/src/Cech_complex/include/gudhi/Cech_complex_blocker.h
@@ -68,7 +68,7 @@ class Cech_blocker {
* \return true if the simplex radius is greater than the Cech_complex max_radius*/
bool operator()(Simplex_handle sh) {
Point_cloud points;
- for (auto vertex : simplicial_complex_.simplex_vertex_range(sh)) {
+ for (auto vertex : sc_ptr_->simplex_vertex_range(sh)) {
points.push_back(Point(cc_ptr_->point_iterator(vertex)->begin(),
cc_ptr_->point_iterator(vertex)->end()));
#ifdef DEBUG_TRACES
@@ -80,17 +80,17 @@ class Cech_blocker {
if (radius > cc_ptr_->max_radius())
std::cout << "radius > max_radius => expansion is blocked\n";
#endif // DEBUG_TRACES
- simplicial_complex_.assign_filtration(sh, radius);
+ sc_ptr_->assign_filtration(sh, radius);
return (radius > cc_ptr_->max_radius());
}
/** \internal \brief Cech complex blocker constructor. */
- Cech_blocker(SimplicialComplexForCech& simplicial_complex, Cech_complex* cc_ptr)
- : simplicial_complex_(simplicial_complex),
+ Cech_blocker(SimplicialComplexForCech* sc_ptr, Cech_complex* cc_ptr)
+ : sc_ptr_(sc_ptr),
cc_ptr_(cc_ptr) {
}
private:
- SimplicialComplexForCech simplicial_complex_;
+ SimplicialComplexForCech* sc_ptr_;
Cech_complex* cc_ptr_;
};