diff options
author | skachano <skachano@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2015-07-06 07:04:53 +0000 |
---|---|---|
committer | skachano <skachano@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2015-07-06 07:04:53 +0000 |
commit | 1bcbd5e259d3c13211a9b71c66cacadaad35404c (patch) | |
tree | 9d67535366c6cfa3455382fdfa6d758b9c967f41 /src/Witness_complex/example/witness_complex_flat_torus.cpp | |
parent | d4c823dce7436f561c8cd545f5a4f80d2d301ca1 (diff) |
Corrected errors in witness_complex_cube
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/witness@680 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: e0a33544c992889344cdaaed947479a5bc458ce3
Diffstat (limited to 'src/Witness_complex/example/witness_complex_flat_torus.cpp')
-rw-r--r-- | src/Witness_complex/example/witness_complex_flat_torus.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Witness_complex/example/witness_complex_flat_torus.cpp b/src/Witness_complex/example/witness_complex_flat_torus.cpp index 06bf5a9f..69ef5fbf 100644 --- a/src/Witness_complex/example/witness_complex_flat_torus.cpp +++ b/src/Witness_complex/example/witness_complex_flat_torus.cpp @@ -335,7 +335,7 @@ void generate_points_grid(Point_Vector& W, int width, int D) int cell_i = i; for (int l = 0; l < D; ++l) { - point.push_back(0.01*(cell_i%width)); + point.push_back((2.0/width)*(cell_i%width)); cell_i /= width; } W.push_back(point); @@ -516,7 +516,7 @@ void landmark_choice(Point_Vector &W, int nbP, int nbL, Point_Vector& landmarks, // while (!res.second) // { do chosen_landmark = rand.get_int(0,nbP); - while (std::count(landmarks_ind.begin(),landmarks_ind.end(),chosen_landmark)!=0); + while (std::find(landmarks_ind.begin(),landmarks_ind.end(),chosen_landmark)!=landmarks_ind.end()); //rand++; //std::cout << "Chose " << chosen_landmark << std::endl; p = &W[chosen_landmark]; @@ -672,7 +672,7 @@ int landmark_perturbation(Point_Vector &W, Point_Vector& landmarks, std::vector< count_badlinks++; //std::cout << u << " "; Point_d& l = landmarks[u]; - Fuzzy_sphere fs(l, sqrt(lambda)*3, 0, traits); + Fuzzy_sphere fs(l, sqrt(lambda), 0, traits); std::vector<int> curr_perturb; L.search(std::insert_iterator<std::vector<int>>(curr_perturb,curr_perturb.begin()),fs); for (int i: curr_perturb) |