summaryrefslogtreecommitdiff
path: root/src/Witness_complex/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/Witness_complex/include')
-rw-r--r--src/Witness_complex/include/gudhi/Landmark_choice_by_furthest_point.h5
-rw-r--r--src/Witness_complex/include/gudhi/Landmark_choice_by_random_point.h5
-rw-r--r--src/Witness_complex/include/gudhi/Witness_complex.h4
-rw-r--r--src/Witness_complex/include/gudhi/Witness_complex_doc.h4
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