Computes the union of HLLs and stores the result in this instance. @param other the other HLL instance to union into this one. This cannot be null .
(final HLL other)
| 629 | * cannot be <code>null</code>. |
| 630 | */ |
| 631 | public void union(final HLL other) { |
| 632 | // TODO: verify HLLs are compatible |
| 633 | final HLLType otherType = other.getType(); |
| 634 | |
| 635 | if(type.equals(otherType)) { |
| 636 | homogeneousUnion(other); |
| 637 | return; |
| 638 | } else { |
| 639 | heterogenousUnion(other); |
| 640 | return; |
| 641 | } |
| 642 | } |
| 643 | |
| 644 | // ------------------------------------------------------------------------ |
| 645 | // Union helpers |