summaryrefslogtreecommitdiff
path: root/src/Witness_complex/example
diff options
context:
space:
mode:
authorskachano <skachano@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2015-05-26 11:00:08 +0000
committerskachano <skachano@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2015-05-26 11:00:08 +0000
commit0844edcc9dcd8d507da462d84d120d4ad4724c83 (patch)
tree91e134d3b7a5da7f6e703ae1f22829530be62b6e /src/Witness_complex/example
parent9d49bd8d3fe2421016c02bf40cf4ac8e87e75cbe (diff)
Fixed random point choice in flat torus
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/witness@596 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: ae114c4dc58c3f7dd8a761c6407c2ad4ff8ef61e
Diffstat (limited to 'src/Witness_complex/example')
-rw-r--r--src/Witness_complex/example/witness_complex_flat_torus.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Witness_complex/example/witness_complex_flat_torus.cpp b/src/Witness_complex/example/witness_complex_flat_torus.cpp
index c3b2f910..1ce17fde 100644
--- a/src/Witness_complex/example/witness_complex_flat_torus.cpp
+++ b/src/Witness_complex/example/witness_complex_flat_torus.cpp
@@ -375,7 +375,8 @@ void landmark_choice(Point_Vector &W, int nbP, int nbL, Point_Vector& landmarks,
{
// while (!res.second)
// {
- chosen_landmark = rand.get_int(0,nbP);
+ while (std::count(landmarks_ind.begin(),landmarks_ind.end(),chosen_landmark)!=0)
+ chosen_landmark = rand.get_int(0,nbP);
//rand++;
//std::cout << "Chose " << chosen_landmark << std::endl;
p = &W[chosen_landmark];