Skip to content
Snippets Groups Projects
Verified Commit 2fbca6db authored by David Procházka's avatar David Procházka
Browse files

ADD: search up to k in approxKNN

parent a6331c85
No related branches found
No related tags found
No related merge requests found
......@@ -50,7 +50,7 @@ public class MHTree extends Algorithm implements Serializable {
PriorityQueue<ObjectToNodeDistanceRank> queue = new PriorityQueue<>();
queue.add(new ObjectToNodeDistanceRank(root, object));
while (!queue.isEmpty()) {
while (!queue.isEmpty() && operation.getAnswerCount() < operation.getK()) {
Node currentNode = queue.poll().getNode();
if (currentNode.isLeaf())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment