hyperloglog
hyperloglog copied to clipboard
An efficient native implementation of the HyperLogLog cardinality estimator for Ruby
It just merges the first estimator with itself over and over. This diff fixes it and adds a Gemfile for easier development. [](https://reviewable.io/reviews/besquared/hyperloglog/2)
The current README claims you can build a HyperBuilder without any parameters but this isn't true. This addresses it also also adds details about the `serialize` and `load` methods on...
Granted this is not the described API but it shouldn't crash ruby: ``` 1.9.3p194 :001 > b = HyperBuilder.new(8) => [0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
Here's a simple repro: ``` ruby builder = HyperBuilder.new(11) builder.offer(4) ``` I would _expect_ this to take "4" and record it as a value. That is, if I offer [1,...
I want to be able to merge together estimators and stick the result in memcache. Needed the following methods to do that: HyperEstimator#merge! HyperEstimator#_dump HyperEstimator.load I also changed HyperEstimator.estimate to...
I was curious to try out your gem, but I couldn't get it to build in either 1.9.2 or 1.9.3: ``` Building native extensions. This could take a while... ERROR:...