113 for (
int i = 0; i <
k; i++) {
133 child[
ANN_LO]->ann_search(box_dist);
143 if (box_dist * ANNkdMaxErr < ANNkdPointMK->max_key())
144 child[
ANN_HI]->ann_search(box_dist);
148 child[
ANN_HI]->ann_search(box_dist);
158 if (box_dist * ANNkdMaxErr < ANNkdPointMK->max_key())
159 child[
ANN_LO]->ann_search(box_dist);
181 min_dist = ANNkdPointMK->
max_key();
183 for (
int i = 0; i <
n_pts; i++) {
193 t = *(qq++) - *(pp++);
203 ANNkdPointMK->
insert(dist, bkt[i]);
204 min_dist = ANNkdPointMK->
max_key();
void annError(const char *msg, ANNerr level)
PQKkey ith_smallest_key(int i)
const ANNbool ANN_ALLOW_SELF_MATCH
PQKinfo ith_smallest_info(int i)
void annkSearch(ANNpoint q, int k, ANNidxArray nn_idx, ANNdistArray dd, double eps=0.0)
virtual void ann_search(ANNdist)=0
virtual void ann_search(ANNdist)
ANNdist annBoxDistance(const ANNpoint q, const ANNpoint lo, const ANNpoint hi, int dim)
virtual void ann_search(ANNdist)
void insert(PQKkey kv, PQKinfo inf)