double *coord, dist;
int dim, i, iq = -1;
double qmin;
- double *point = x;
if (!qt) return;
dim = qt->dim;
if (l){
while (l){
coord = node_data_get_coord(SingleLinkedList_get_data(l));
- dist = point_distance(point, coord, dim);
+ dist = point_distance(x, coord, dim);
if(*min < 0 || dist < *min) {
*min = dist;
*imin = node_data_get_id(SingleLinkedList_get_data(l));
}
if (qt->qts){
- dist = point_distance(qt->center, point, dim);
+ dist = point_distance(qt->center, x, dim);
if (*min >= 0 && (dist - sqrt((double) dim) * qt->width > *min)){
return;
} else {
qmin = -1;
for (i = 0; i < 1<<dim; i++){
if (qt->qts[i]){
- dist = point_distance(qt->qts[i]->average, point, dim);
+ dist = point_distance(qt->qts[i]->average, x, dim);
if (dist < qmin || qmin < 0){
qmin = dist; iq = i;
}