@Test public void testPfMerge() throws Exception { HllV4 hll = HllV4.newBuilder().build(); HllV4 other = HllV4.newBuilder() .withRepr(TestUtil.getResourceAsBytes("v4/dense_cached_55527.dat")) .build(); assertThat(hll.pfMerge(other).pfCount()).isEqualTo(55527L); }
public HllV4 pfMerge(HllV4... others) { if (others.length < 1) { return this; } HllhdrV4[] otherHlls = new HllhdrV4[others.length]; for (int i = 0; i < others.length; i++) { otherHlls[i] = others[i].hllhdr; } hllhdr.hllMerge(otherHlls); hllhdr.invalidateCache(); return this; }
HllV4 { public HllV4 pfMerge(HllV4... others) { if (others.length < 1) { return this; } HllhdrV4[] otherHlls = new HllhdrV4[others.length]; for (int i = 0; i < others.length; i++) { otherHlls[i] = others[i].hllhdr; } hllhdr.hllMerge(otherHlls); hllhdr.invalidateCache(); return this; } }
HllV4 { public HllV4 pfMerge(HllV4... others) { if (others.length < 1) { return this; } HllhdrV4[] otherHlls = new HllhdrV4[others.length]; for (int i = 0; i < others.length; i++) { otherHlls[i] = others[i].hllhdr; } hllhdr.hllMerge(otherHlls); hllhdr.invalidateCache(); return this; } HllV4(byte[] representation);   HllV4(); }
HllV4 { public HllV4 pfMerge(HllV4... others) { if (others.length < 1) { return this; } HllhdrV4[] otherHlls = new HllhdrV4[others.length]; for (int i = 0; i < others.length; i++) { otherHlls[i] = others[i].hllhdr; } hllhdr.hllMerge(otherHlls); hllhdr.invalidateCache(); return this; } HllV4(byte[] representation);   HllV4(); long pfCount(); boolean pfAdd(byte[] element); HllV4 pfMerge(HllV4... others); byte[] dumpRepr(); static HllV4Builder newBuilder(); }
HllV4 { public HllV4 pfMerge(HllV4... others) { if (others.length < 1) { return this; } HllhdrV4[] otherHlls = new HllhdrV4[others.length]; for (int i = 0; i < others.length; i++) { otherHlls[i] = others[i].hllhdr; } hllhdr.hllMerge(otherHlls); hllhdr.invalidateCache(); return this; } HllV4(byte[] representation);   HllV4(); long pfCount(); boolean pfAdd(byte[] element); HllV4 pfMerge(HllV4... others); byte[] dumpRepr(); static HllV4Builder newBuilder();  }