Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kll weighted updates group2 #488

Merged
merged 4 commits into from
Jan 5, 2024
Merged

Kll weighted updates group2 #488

merged 4 commits into from
Jan 5, 2024

Conversation

leerho
Copy link
Contributor

@leerho leerho commented Jan 4, 2024

These changes are relatively minor, but I want to get these in before characterization starts for Doubles.

Summary of changes in this PR

  • KllDoublesHelper.java

    • Moved the "KllHeapDoublesSketch::weightedUpdateDoubles(..)" to "KllDoublesHelper.updateDouble(..)" next to where the original "updateDouble(..)" was. It should have been there in the first place.
    • Did some refactoring/optimization of the code in both of the static package-private update methods and the public update methods in "KllDoublesSketch" that make a lot more sense. It avoids unnecessary checking of invariants when the static methods are called internally.
  • KllDoublesSketch.java

    • Update methods -- see previous comment
    • Changed the variable name in the toString(..) to "withDetail" rather than "withData", since both booleans show data.
    • Added a "updateMinMax(item) method that reduces code duplication as it is used in multiple places.
  • KllHelper.java

    • Refactored the dataOutput(..) and toStringImpl(..) methods to improve visualization of how the new weighted (as well as the original) updates can be understood during compaction.

The following are all either documentation or variable name changes for consistency across all of KLL.

  • KllSketch.java

    • Improved terminology of "empty/garbage space" to "free space"
    • The concomitant change to the "toString(..)" boolean name (see above)
  • KllDirectDoublesSketch.java

    • Improved terminology of "empty/garbage space" to "free space"
  • KllDirectFloatsSketch.java

    • Improved terminology of "empty/garbage space" to "free space"
  • KllDoublesSketchSortedView.java

    • Improved terminology of "empty/garbage space" to "free space"
  • KllFloatsSketchSortedView.java

    • Improved terminology of "empty/garbage space" to "free space"
  • KllHeapDoublesSketch.java

    • Improved terminology of "empty/garbage space" to "free space"
  • KllHeapFloatsSketch.java

    • Improved terminology of "empty/garbage space" to "free space"
  • KllItemsSketch.java

    • Improved terminology of "empty/garbage space" to "free space"
  • KllItemsSketchSortedView.java

    • Improved terminology of "empty/garbage space" to "free space"
  • KllPreambleUtil.java

    • Improved terminology of "empty/garbage space" to "free space"

@leerho leerho merged commit 9c2f8d9 into master Jan 5, 2024
4 checks passed
@leerho leerho deleted the kll_weighted_updates_group2 branch January 5, 2024 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants