diff options
author | skachano <skachano@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2016-01-20 10:34:31 +0000 |
---|---|---|
committer | skachano <skachano@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2016-01-20 10:34:31 +0000 |
commit | 9bb012812fe7789fe5cc8cb5cd0aa4212e0af221 (patch) | |
tree | d49f98392ea6a74e85b0a8423b8baa0f18eedb1a /src/Witness_complex/include | |
parent | e8afd1278aac5b5d76c5171092dca5954961431a (diff) |
Added the forgotten concept, added asserts nbP >= nbL, some header_defines
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/witness@981 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: d7c27be6bb66c79cf73971a80659079b1c8b12e5
Diffstat (limited to 'src/Witness_complex/include')
4 files changed, 10 insertions, 8 deletions
diff --git a/src/Witness_complex/include/gudhi/Landmark_choice_by_furthest_point.h b/src/Witness_complex/include/gudhi/Landmark_choice_by_furthest_point.h index 163975c9..8dfec99c 100644 --- a/src/Witness_complex/include/gudhi/Landmark_choice_by_furthest_point.h +++ b/src/Witness_complex/include/gudhi/Landmark_choice_by_furthest_point.h @@ -20,8 +20,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef GUDHI_LANDMARK_CHOICE_BY_FURTHEST_POINT_H_ -#define GUDHI_LANDMARK_CHOICE_BY_FURTHEST_POINT_H_ +#ifndef LANDMARK_CHOICE_BY_FURTHEST_POINT_H_ +#define LANDMARK_CHOICE_BY_FURTHEST_POINT_H_ namespace Gudhi { @@ -56,6 +56,7 @@ public: KNearestNeighbours &knn) { int nb_points = points.end() - points.begin(); + assert(nb_points >= nbL); std::vector<std::vector<double>> wit_land_dist(nb_points, std::vector<double>()); // distance matrix witness x landmarks typeVectorVertex chosen_landmarks; // landmark list diff --git a/src/Witness_complex/include/gudhi/Landmark_choice_by_random_point.h b/src/Witness_complex/include/gudhi/Landmark_choice_by_random_point.h index a54f3848..3f8a8d32 100644 --- a/src/Witness_complex/include/gudhi/Landmark_choice_by_random_point.h +++ b/src/Witness_complex/include/gudhi/Landmark_choice_by_random_point.h @@ -20,8 +20,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef GUDHI_LANDMARK_CHOICE_BY_RANDOM_POINT_H_ -#define GUDHI_LANDMARK_CHOICE_BY_RANDOM_POINT_H_ +#ifndef LANDMARK_CHOICE_BY_RANDOM_POINT_H_ +#define LANDMARK_CHOICE_BY_RANDOM_POINT_H_ namespace Gudhi { @@ -51,6 +51,7 @@ public: KNearestNeighbours &knn) { int nbP = points.end() - points.begin(); + assert(nbP >= nbL); std::set<int> landmarks; int current_number_of_landmarks=0; // counter for landmarks diff --git a/src/Witness_complex/include/gudhi/Witness_complex.h b/src/Witness_complex/include/gudhi/Witness_complex.h index 90b2e094..819a0583 100644 --- a/src/Witness_complex/include/gudhi/Witness_complex.h +++ b/src/Witness_complex/include/gudhi/Witness_complex.h @@ -20,8 +20,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef GUDHI_WITNESS_COMPLEX_H_ -#define GUDHI_WITNESS_COMPLEX_H_ +#ifndef WITNESS_COMPLEX_H_ +#define WITNESS_COMPLEX_H_ #include <boost/container/flat_map.hpp> #include <boost/iterator/transform_iterator.hpp> diff --git a/src/Witness_complex/include/gudhi/Witness_complex_doc.h b/src/Witness_complex/include/gudhi/Witness_complex_doc.h index 71c8776b..dbe9e7ce 100644 --- a/src/Witness_complex/include/gudhi/Witness_complex_doc.h +++ b/src/Witness_complex/include/gudhi/Witness_complex_doc.h @@ -1,5 +1,5 @@ -#ifndef WITNESS_COMPLEX_DOC_ -#define WITNESS_COMPLEX_DOC_ +#ifndef WITNESS_COMPLEX_DOC_H_ +#define WITNESS_COMPLEX_DOC_H_ /** \defgroup witness_complex Witness complex |