Iterations after the first pass were no-ops. Closes #1938.
- typos in gpcanvas.c #1927
- memory leak in libmingle
- private inheritance in IncVPSC #1874
+- broken sorting in nearest_neighbor_graph_ann.cpp #1938
## [2.46.0] - 2021-02-13
/* sort so that edges always go from left to right in x-doordinate */
ANNpoint p;
ANNcoord x, y;
- int i, j;
+ int i;
for (i = 0; i < n; i++){
- for (j = 0; j < dim; j++){
- p = pts[i];
- if (p[0] < p[2] || (p[0] == p[2] && p[1] < p[3])) continue;
- x = p[0]; y = p[1];
- p[0] = p[2];
- p[1] = p[3];
- p[2] = x;
- p[3] = y;
- }
+ p = pts[i];
+ if (p[0] < p[2] || (p[0] == p[2] && p[1] < p[3])) continue;
+ x = p[0]; y = p[1];
+ p[0] = p[2];
+ p[1] = p[3];
+ p[2] = x;
+ p[3] = y;
}
}
/* sort so that edges always go from left to right in x-doordinate */
ANNpoint p;
ANNcoord x, y;
- int i, j;
+ int i;
for (i = 0; i < n; i++){
- for (j = 0; j < dim; j++){
- p = pts[i];
- if (p[1] < p[3] || (p[1] == p[3] && p[0] < p[2])) continue;
- x = p[0]; y = p[1];
- p[0] = p[2];
- p[1] = p[3];
- p[2] = x;
- p[3] = y;
- }
+ p = pts[i];
+ if (p[1] < p[3] || (p[1] == p[3] && p[0] < p[2])) continue;
+ x = p[0]; y = p[1];
+ p[0] = p[2];
+ p[1] = p[3];
+ p[2] = x;
+ p[3] = y;
}
}