Skip to content
Snippets Groups Projects
Commit 34722fcc authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

pp

parent 7b3d6457
Branches
Tags
No related merge requests found
...@@ -58,9 +58,7 @@ struct HilbertSortB ...@@ -58,9 +58,7 @@ struct HilbertSortB
int threshold, double ratio, int *depth, int threshold, double ratio, int *depth,
std::vector<int> &indices) std::vector<int> &indices)
{ {
int middle; int middle = 0;
middle = 0;
if (arraysize >= threshold) { if (arraysize >= threshold) {
(*depth)++; (*depth)++;
middle = (int)(arraysize * ratio); middle = (int)(arraysize * ratio);
...@@ -134,7 +132,6 @@ void HilbertSortB::ComputeGrayCode(int n) ...@@ -134,7 +132,6 @@ void HilbertSortB::ComputeGrayCode(int n)
} }
} }
int HilbertSortB::Split(Vert** vertices, int HilbertSortB::Split(Vert** vertices,
int arraysize,int GrayCode0,int GrayCode1, int arraysize,int GrayCode0,int GrayCode1,
double BoundingBoxXmin, double BoundingBoxXmax, double BoundingBoxXmin, double BoundingBoxXmax,
...@@ -186,7 +183,8 @@ int HilbertSortB::Split(Vert** vertices, ...@@ -186,7 +183,8 @@ int HilbertSortB::Split(Vert** vertices,
vertices[j] = swapvert; vertices[j] = swapvert;
// Continue patitioning the array; // Continue patitioning the array;
} while (true); } while (true);
} else { }
else {
do { do {
for (; i < arraysize; i++) { for (; i < arraysize; i++) {
if (vertices[i]->point()[axis] <= split) break; if (vertices[i]->point()[axis] <= split) break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment