From cccb605bb3beca6eeae7d7368a4c3cb48bda98c7 Mon Sep 17 00:00:00 2001 From: skachano Date: Fri, 15 Jan 2016 14:16:34 +0000 Subject: Added consts where needed git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/witness@973 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 57ca40cd8dcda5125e4412c196862e14ff073744 --- .../include/gudhi/Landmark_choice_by_furthest_point.h | 2 +- .../include/gudhi/Landmark_choice_by_random_point.h | 4 +++- src/Witness_complex/include/gudhi/Witness_complex.h | 8 ++++---- 3 files changed, 8 insertions(+), 6 deletions(-) (limited to 'src') 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 050286f2..163975c9 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 @@ -51,7 +51,7 @@ public: template - Landmark_choice_by_furthest_point(Point_random_access_range &points, + Landmark_choice_by_furthest_point(Point_random_access_range const &points, int nbL, KNearestNeighbours &knn) { 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 038deff6..a54f3848 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 @@ -46,7 +46,9 @@ public: template - Landmark_choice_by_random_point(Point_random_access_range &points, int nbL, KNearestNeighbours &knn) + Landmark_choice_by_random_point(Point_random_access_range const &points, + int nbL, + KNearestNeighbours &knn) { int nbP = points.end() - points.begin(); std::set landmarks; diff --git a/src/Witness_complex/include/gudhi/Witness_complex.h b/src/Witness_complex/include/gudhi/Witness_complex.h index 8938e59d..2b6a6ad5 100644 --- a/src/Witness_complex/include/gudhi/Witness_complex.h +++ b/src/Witness_complex/include/gudhi/Witness_complex.h @@ -105,7 +105,7 @@ namespace Gudhi { * Landmarks are supposed to be in [0,nbL_-1] */ template< typename KNearestNeighbours > - Witness_complex(KNearestNeighbours & knn, + Witness_complex(KNearestNeighbours const & knn, Simplicial_complex & sc_, int nbL_, int dim ): nbL(nbL_), sc(sc_) @@ -164,7 +164,7 @@ namespace Gudhi { * inserted_vertex is the handle of the (k+1)-th vertex witnessed by witness_id */ template - bool all_faces_in(KNearestNeighbours &knn, int witness_id, int k) + bool all_faces_in(KNearestNeighbours const &knn, int witness_id, int k) { //std::cout << "All face in with the landmark " << inserted_vertex << std::endl; std::vector< Vertex_handle > facet; @@ -188,7 +188,7 @@ namespace Gudhi { } template - void print_vector(std::vector v) + void print_vector(const std::vector v) { std::cout << "["; if (!v.empty()) @@ -211,7 +211,7 @@ namespace Gudhi { * \remark Added for debugging purposes. */ template< class KNearestNeighbors > - bool is_witness_complex(KNearestNeighbors & knn, bool print_output) + bool is_witness_complex(KNearestNeighbors const & knn, bool print_output) { //bool final_result = true; for (Simplex_handle sh: sc.complex_simplex_range()) -- cgit v1.2.3