summaryrefslogtreecommitdiff
path: root/src/Witness_complex/example
diff options
context:
space:
mode:
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];