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

FIX: get the number of objects from bucket dispatcher

parent fc444452
No related branches found
No related tags found
No related merge requests found
......@@ -182,12 +182,6 @@ public class MHTree extends Algorithm implements Serializable {
.mapToInt(LeafNode::getObjectCount)
.summaryStatistics();
int numberOfObjects = bucketDispatcher
.getAllBuckets()
.stream()
.mapToInt(LocalBucket::getObjectCount)
.sum();
int numberOfNodes = getNodes().size();
System.out.println("Leaf object capacity: " + leafCapacity);
......@@ -195,7 +189,7 @@ public class MHTree extends Algorithm implements Serializable {
System.out.println("Object to node distance measurement: " + objectToNodeDistance);
System.out.println("Insert type: " + insertType);
System.out.println("Number of objects: " + numberOfObjects);
System.out.println("Number of objects: " + bucketDispatcher.getObjectCount());
System.out.println("Number of nodes: " + numberOfNodes);
System.out.println("Number of internal nodes: " + (numberOfNodes - leafNodeObjects.getCount()));
System.out.println("Height: " + root.getHeight());
......@@ -375,7 +369,7 @@ public class MHTree extends Algorithm implements Serializable {
if (notProcessedObjectIndices.cardinality() < leafCapacity) {
for (int i = notProcessedObjectIndices.nextSetBit(0); i >= 0; i = notProcessedObjectIndices.nextSetBit(i + 1)) {
LocalAbstractObject object = objectDistances.getObject(i);
((LeafNode) nodes[getClosestNodeIndex(object)]).addObject(object, objectDistances);
nodes[getClosestNodeIndex(object)].addObject(object);
}
return;
......
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