The primary focus of this PR is to add vectorized updates to the KLL Doubles Sketches.
The changes and rationale by class is as follows:
KllDirectDoublesSketch
Grouped all the Min/Max methods together to make them easier to understand as they are closely related.
Added get Max/Min Internal methods. This is rather subtle. The public getMinItem() and getMaxItem() throw an exception if the sketch is empty. IsEmpty() is defined as getN() == 0 and when the sketch is empty during normal operation the max/min values are NaN. Which means that the state of the value of min/max must be in sync with the value of N. However, during an internal compaction or merge operation, these two values can get out-of-sync, making coding and debugging very difficult due to very sensitive sequencing of internal operations. This problem was discovered during the implementation of the vector update methods, where these two values can very easily get out of sync. Adding these internal getters of Min/Max aleviates this problem.
The min/max methods themselves needed to be simplified.
The incN() is now incN(int). required for vector updates.
new setDoubleItemsArrayAt(index, items[], srcOffset, length) method) for Vector updates.
KllDoublesSketch
Moved the Min/Max methods together
Moved the SortedView methods together
Moved all the update update methods together and grouped by regular, weighted and vector.
Moved the updateDouble(...) methods from KllDoublesHelper into this class. This allows for some collapsing of methods and simpler coding especially now that we have normal update, weighted update and vector update methods.
KllHeapDoublesSketch
Grouped all the Min/Max methods together as above
Added get Max/Min Internal methods as above.
The incN() is now incN(int) as above
new setDoubleItemsArrayAt(index, items[], srcOffset, length) method) as above
KllDoublesHelper
Moved the updateDoubles(...) methods to KllDoublesSketch
Some modifications due to change in location of the updateDoubles(...) methods
These internal methods now refer to the new getMin/MaxItemInternal methods.
The primary focus of this PR is to add vectorized updates to the KLL Doubles Sketches.
The changes and rationale by class is as follows:
KllDirectDoublesSketch
KllDoublesSketch
KllHeapDoublesSketch
KllDoublesHelper
KllDirectCompactItemssketch
KllDirectFloatsSketch
KllFloatsHelper
KllHeapFloatsSketch
KllHeapItemsSketch
KllItemsHelper
KllSketch
TESTS
KllDoublesSketchTest
KllDoublesSketchSerDeTest
KllDirectDoublesSketchTest