summaryrefslogtreecommitdiff
path: root/src/Cech_complex/include/gudhi/Cech_complex_blocker.h
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2018-02-20 16:03:52 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2018-02-20 16:03:52 +0000
commit0586a149b5bb3a4b65b63b2ab7d3ecdd9682ee1b (patch)
treed982ba2389a24fbccc92d6a6d147c5e323bd4f5d /src/Cech_complex/include/gudhi/Cech_complex_blocker.h
parent4a91726c9500e4b7ffe469192aa1140650c3d094 (diff)
tests and utils fix
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/cechcomplex_vincent@3253 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 5786a8a7e4b16750f29fac99ca61926158542cfd
Diffstat (limited to 'src/Cech_complex/include/gudhi/Cech_complex_blocker.h')
-rw-r--r--src/Cech_complex/include/gudhi/Cech_complex_blocker.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/Cech_complex/include/gudhi/Cech_complex_blocker.h b/src/Cech_complex/include/gudhi/Cech_complex_blocker.h
index 25fab909..f8738be0 100644
--- a/src/Cech_complex/include/gudhi/Cech_complex_blocker.h
+++ b/src/Cech_complex/include/gudhi/Cech_complex_blocker.h
@@ -39,6 +39,20 @@ namespace cech_complex {
template<typename SimplicialComplexForCechComplex, typename ForwardPointRange>
class Cech_complex;
+/** \internal
+ * \class Cech_blocker
+ * \brief Cech complex blocker.
+ *
+ * \ingroup cech_complex
+ *
+ * \details
+ * Cech blocker is an oracle constructed from a Cech_complex and a simplicial complex.
+ *
+ * \tparam SimplicialComplexForProximityGraph furnishes `Simplex_handle` and `Filtration_value` type definition,
+ * `simplex_vertex_range(Simplex_handle sh)`and `assign_filtration(Simplex_handle sh, Filtration_value filt)` methods.
+ *
+ * \tparam ForwardPointRange is required by the pointer on Chech_complex for type definition.
+ */
template <typename SimplicialComplexForCech, typename ForwardPointRange>
class Cech_blocker {
private:
@@ -52,10 +66,15 @@ class Cech_blocker {
using Cech_complex = Gudhi::cech_complex::Cech_complex<SimplicialComplexForCech, ForwardPointRange>;
public:
+ /** \internal \brief Cech complex blocker operator() - the oracle - assigns the filtration value from the simplex
+ * radius and returns if the simplex expansion must be blocked.
+ * \param[in] sh The Simplex_handle.
+ * \return true if the simplex radius is greater than the Cech_complex threshold*/
bool operator()(Simplex_handle sh) {
Point_cloud points;
for (auto vertex : simplicial_complex_.simplex_vertex_range(sh)) {
- points.push_back(*(cc_ptr_->point(vertex)));
+ points.push_back(Point(cc_ptr_->point_iterator(vertex)->begin(),
+ cc_ptr_->point_iterator(vertex)->end()));
#ifdef DEBUG_TRACES
std::cout << "#(" << vertex << ")#";
#endif // DEBUG_TRACES
@@ -68,6 +87,8 @@ class Cech_blocker {
simplicial_complex_.assign_filtration(sh, radius);
return (radius > cc_ptr_->threshold());
}
+
+ /** \internal \brief Cech complex blocker constructor. */
Cech_blocker(SimplicialComplexForCech& simplicial_complex, Cech_complex* cc_ptr)
: simplicial_complex_(simplicial_complex),
cc_ptr_(cc_ptr) {