This repository has been archived by the owner. It is now read-only.
Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Fixes #81 HyperLogLog.Builder improvements
We cannot make the constructors for the Builder match HyperLogLog without risking behavior changes downstream, but we also have no default constructor for either (and adding one could be contentious). Therefore I have added static 'with' methods. This somewhat goes against the expected builder pattern, but it's not as though HyperLogLog.Builder was really following it anyway (there is only one setting so it is closer to just being a supplier). Additionally, it would have been a little silly to also implement non-static 'with' methods since the code would look exactly the same for both. Lastly, the builder now performs eager validation of rsd/log2m. This leads to extra validation calls, but I can live with that.
- Loading branch information
Showing
with
33 additions
and 8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters