From 78f1193dc1d9b5e03a2e4725f7b2fddda333b7ae Mon Sep 17 00:00:00 2001 From: skachano Date: Fri, 7 Oct 2016 10:29:09 +0000 Subject: Documented member functions git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/relaxed-witness@1677 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 7946666e5b994a9c76c1d7dc8e9bcdb4526afddf --- .../include/gudhi/Strong_witness_complex.h | 48 ++-------------------- .../include/gudhi/Witness_complex.h | 32 +++------------ 2 files changed, 8 insertions(+), 72 deletions(-) (limited to 'src/Witness_complex') diff --git a/src/Witness_complex/include/gudhi/Strong_witness_complex.h b/src/Witness_complex/include/gudhi/Strong_witness_complex.h index e125d307..1ce050ad 100644 --- a/src/Witness_complex/include/gudhi/Strong_witness_complex.h +++ b/src/Witness_complex/include/gudhi/Strong_witness_complex.h @@ -23,42 +23,14 @@ #ifndef STRONG_WITNESS_COMPLEX_H_ #define STRONG_WITNESS_COMPLEX_H_ -#include -#include -#include #include #include #include -#include -#include #include -#include -#include -#include #include "Active_witness/Active_witness.h" -#include #include - -// Needed for nearest neighbours -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -// Needed for the adjacency graph in bad link search -#include -#include -#include - namespace gss = Gudhi::spatial_searching; namespace Gudhi { @@ -102,21 +74,9 @@ private: //@{ - // Witness_range> - /* - * \brief Iterative construction of the (weak) witness complex. - * \details The witness complex is written in sc_ basing on a matrix knn of - * nearest neighbours of the form {witnesses}x{landmarks}. - * - * The type KNearestNeighbors can be seen as - * Witness_range>, where - * Witness_range and Closest_landmark_range are random access ranges. - * - * Constructor takes into account at most (dim+1) - * first landmarks from each landmark range to construct simplices. - * - * Landmarks are supposed to be in [0,nbL_-1] + * \brief Initializes member variables before constructing simplicial complex. + * \details The parameters should satisfy InputIterator C++ concepts. */ template< typename InputIteratorLandmarks, typename InputIteratorWitnesses > @@ -135,7 +95,7 @@ private: return landmarks_[vertex]; } - /** \brief Outputs the (weak) witness complex with + /** \brief Outputs the (strong) witness complex with * squared relaxation parameter 'max_alpha_square' * to simplicial complex 'complex'. * The parameter 'limit_dimension' represents the maximal dimension of the simplicial complex @@ -161,12 +121,10 @@ private: return false; } typeVectorVertex vv; - //ActiveWitnessList active_witnesses;// = new ActiveWitnessList(); for (unsigned i = 0; i != nbL; ++i) { // initial fill of 0-dimensional simplices vv = {i}; complex.insert_simplex(vv, Filtration_value(0.0)); - /* TODO Error if not inserted : normally no need here though*/ } for (auto w: witnesses_) { ActiveWitness aw(landmark_tree_.query_incremental_nearest_neighbors(w)); diff --git a/src/Witness_complex/include/gudhi/Witness_complex.h b/src/Witness_complex/include/gudhi/Witness_complex.h index 2a89306d..7b46e1c0 100644 --- a/src/Witness_complex/include/gudhi/Witness_complex.h +++ b/src/Witness_complex/include/gudhi/Witness_complex.h @@ -23,25 +23,13 @@ #ifndef WITNESS_COMPLEX_H_ #define WITNESS_COMPLEX_H_ -// Needed for the adjacency graph in bad link search -#include -#include -#include - -#include - #include "Active_witness/Active_witness.h" #include -#include #include #include #include -#include -#include #include -#include -#include namespace gss = Gudhi::spatial_searching; @@ -93,18 +81,8 @@ private: //@{ /* - * \brief Iterative construction of the (weak) witness complex. - * \details The witness complex is written in sc_ basing on a matrix knn of - * nearest neighbours of the form {witnesses}x{landmarks}. - * - * The type KNearestNeighbors can be seen as - * Witness_range>, where - * Witness_range and Closest_landmark_range are random access ranges. - * - * Constructor takes into account at most (dim+1) - * first landmarks from each landmark range to construct simplices. - * - * Landmarks are supposed to be in [0,nbL_-1] + * \brief Initializes member variables before constructing simplicial complex. + * \details The parameters should satisfy InputIterator C++ concepts. */ template< typename InputIteratorLandmarks, typename InputIteratorWitnesses > @@ -126,6 +104,8 @@ private: /** \brief Outputs the (weak) witness complex with * squared relaxation parameter 'max_alpha_square' * to simplicial complex 'complex'. + * The parameter 'limit_dimension' represents the maximal dimension of the simplicial complex + * (default value = no limit). */ template < typename SimplicialComplexForWitness > bool create_complex(SimplicialComplexForWitness& complex, @@ -146,14 +126,12 @@ private: return false; } typeVectorVertex vv; - ActiveWitnessList active_witnesses;// = new ActiveWitnessList(); + ActiveWitnessList active_witnesses; for (unsigned i = 0; i != nbL; ++i) { // initial fill of 0-dimensional simplices // by doing it we don't assume that landmarks are necessarily witnesses themselves anymore - //counter++; vv = {i}; complex.insert_simplex(vv, Filtration_value(0.0)); - /* TODO Error if not inserted : normally no need here though*/ } Landmark_id k = 1; /* current dimension in iterative construction */ for (auto w: witnesses_) -- cgit v1.2.3