summaryrefslogtreecommitdiff
path: root/src/Witness_complex
diff options
context:
space:
mode:
authorskachano <skachano@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-01-15 14:16:34 +0000
committerskachano <skachano@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-01-15 14:16:34 +0000
commitcccb605bb3beca6eeae7d7368a4c3cb48bda98c7 (patch)
treed8c27aa68361d67d3d399d97f95a538b4fc93ecb /src/Witness_complex
parent377b59e5e7fa6a92bd21b0cb9b9b86e33632e4ed (diff)
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
Diffstat (limited to 'src/Witness_complex')
-rw-r--r--src/Witness_complex/include/gudhi/Landmark_choice_by_furthest_point.h2
-rw-r--r--src/Witness_complex/include/gudhi/Landmark_choice_by_random_point.h4
-rw-r--r--src/Witness_complex/include/gudhi/Witness_complex.h8
3 files changed, 8 insertions, 6 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 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 <typename KNearestNeighbours,
typename Point_random_access_range>
- 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 <typename KNearestNeighbours,
typename Point_random_access_range>
- 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<int> 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 <typename KNearestNeighbours>
- 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 <typename T>
- void print_vector(std::vector<T> v)
+ void print_vector(const std::vector<T> 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())