This is always set to 0 and conveys no information to the caller.
point[j] = xmin[j] + (xmax[j] - xmin[j])*drand();
}
- QuadTree_get_nearest(qt, point, ymin, &imin, &min, flag);
- assert(!(*flag));
+ QuadTree_get_nearest(qt, point, ymin, &imin, &min);
if (min > shore_depth_tol){/* point not too close, accepted */
for (j = 0; j < dim2; j++){
static const int iter_max = 100;
double cspace_size = 0.7;
double red[3], black[3], min;
- int flag = 0, imin;
+ int imin;
double *wgt = NULL;
assert(accuracy > 0);
if (n == 1){
if (scheme == COLOR_LAB){
assert(qt);
- QuadTree_get_nearest(qt, black, colors, &imin, &min, &flag);
- assert(!flag);
+ QuadTree_get_nearest(qt, black, colors, &imin, &min);
LAB2RGB_real_01(colors);
*color_diff0 = 1000; *color_diff_sum0 = 1000;
} else {
} else if (n == 2){
if (scheme == COLOR_LAB){
assert(qt);
- QuadTree_get_nearest(qt, black, colors, &imin, &min, &flag);
- assert(!flag);
+ QuadTree_get_nearest(qt, black, colors, &imin, &min);
LAB2RGB_real_01(colors);
- QuadTree_get_nearest(qt, red, colors+cdim, &imin, &min, &flag);
- assert(!flag);
+ QuadTree_get_nearest(qt, red, colors+cdim, &imin, &min);
LAB2RGB_real_01(colors+cdim);
*color_diff0 = 1000; *color_diff_sum0 = 1000;
}
-void QuadTree_get_nearest(QuadTree qt, double *x, double *ymin, int *imin, double *min, int *flag){
+void QuadTree_get_nearest(QuadTree qt, double *x, double *ymin, int *imin, double *min){
- *flag = 0;
*min = -1;
QuadTree_get_nearest_internal(qt, x, ymin, min, imin, TRUE);
void QuadTree_get_repulsive_force(QuadTree qt, double *force, double *x, double bh, double p, double KP, double *counts, int *flag);
/* find the nearest point and put in ymin, index in imin and distance in min */
-void QuadTree_get_nearest(QuadTree qt, double *x, double *ymin, int *imin, double *min, int *flag);
+void QuadTree_get_nearest(QuadTree qt, double *x, double *ymin, int *imin, double *min);
QuadTree QuadTree_new_in_quadrant(int dim, double *center, double width, int max_level, int i);