From b475a005fad0a9bc8de61d604948c3d6501fbb55 Mon Sep 17 00:00:00 2001 From: kanhuang Date: Tue, 10 Sep 2013 09:16:22 -0400 Subject: [PATCH] little change --- .../CGAL/Rotational_sweep_visibility_2_.h | 70 +++++++++++++------ 1 file changed, 49 insertions(+), 21 deletions(-) diff --git a/Visibility_2/include/CGAL/Rotational_sweep_visibility_2_.h b/Visibility_2/include/CGAL/Rotational_sweep_visibility_2_.h index e0bd3ef23db..d2df57f61d6 100644 --- a/Visibility_2/include/CGAL/Rotational_sweep_visibility_2_.h +++ b/Visibility_2/include/CGAL/Rotational_sweep_visibility_2_.h @@ -100,7 +100,7 @@ private: Vertex_const_handle query_vertex; Point_2 source; Point_2 target; - static const int M=16; + static const int M=10; public: @@ -681,7 +681,7 @@ private: vmap[v].push_back(e->next()->target()->point()); } - bool is_in_cone(Point_2 p) { + bool is_in_cone(Point_2& p) { if (is_big_cone) return (!CGAL::right_turn(source, q, p)) || (!CGAL::left_turn(target, q, p)); else @@ -809,23 +809,23 @@ private: } - void swap(Point_2& p, Point_2& q) { - Point_2 temp = q; - q = p; - p = temp; + void quicksort_swap(Point_2& p, Point_2& q) { + Point_2 temp = p; + p = q; + q = temp; } int partition(Pvec& vs, int left, int right, int pivotIndex) { Point_2 pivot_p = vs[pivotIndex]; - swap(vs[pivotIndex], vs[right]); + quicksort_swap(vs[pivotIndex], vs[right]); int storeIndex = left; for (int i=left; i