Searched refs:nn_pq (Results 1 – 1 of 1) sorted by relevance
366 void bbf_new_nn(bbf_nn_pqueue & nn_pq, int k, in bbf_new_nn() argument369 if ((int) nn_pq.size() < k) { in bbf_new_nn()370 nn_pq.push_back(nn); in bbf_new_nn()371 push_heap(nn_pq.begin(), nn_pq.end()); in bbf_new_nn()372 } else if (nn_pq[0].dist > nn.dist) { in bbf_new_nn()373 pop_heap(nn_pq.begin(), nn_pq.end()); in bbf_new_nn()374 nn_pq.end()[-1] = nn; in bbf_new_nn()375 push_heap(nn_pq.begin(), nn_pq.end()); in bbf_new_nn()377 assert(nn_pq.size() < 2 || nn_pq[0].dist >= nn_pq[1].dist); in bbf_new_nn()