matttproud/ruby_quantile_estimation — pull request #9 by grobie (2013-11-06 18:51:31+00:00)
Title: [WIP] Fix observations counting

My gut feeling told me the observations counting is not correct, so I added an test and it turned out to be true:

```
Failures:

1) Quantile::Estimator#observations returns the numer of recorded observations
Failure/Error: estimator.observations.should == 42
expected: 42
got: 83 (using ==)
# ./spec/estimator_spec.rb:39:in `block (3 levels) in '
```

While the easy fix would be to move the `@oberservations` increment our of the `#record` method, ideally we wouldn't need to create all these `Sample` values for performance reasons. I have to fully understand the paper first, so I add this PR here solely for reporting reasons.

@mattproud I'm all ear for any suggestion or clarification that there is no way around creating all the `Sample` objects.