clearspring/stream-lib — pull request #42 by cykl (2013-07-17 22:05:47+00:00)
Title: Inconsistant merge semantics between HLL and HLL++

Hi,

I just noticed that HLL.merge and HLL++.merge do not share the same semantics.

HLL.merge creates a new HLL instance and the merge the arguments into this new instance. The object is not modified.

HLL++.merge modifies the current instance and then returns a new estimator (quite weird).

I believe that the two implementation should be consistent. I personally think that a mutable merge method would be a good addition to HLL & HLL++ and ICardinality.merge with a copy semantic can easily be implemented on top of it.

What do you think ? Only fix HLL++.merge or add a new `void merge(estimator`) method to both HLL & HLL++ and then fix HLL++.merge ?