public class HyperLogLog extends Object
| Modifier and Type | Method and Description |
|---|---|
void |
add(long value) |
void |
add(io.airlift.slice.Slice value) |
void |
addHash(long hash)
Adds a value that has already been hashed to the set of values tracked by this HyperLogLog instance.
|
long |
cardinality() |
int |
estimatedInMemorySize() |
int |
estimatedSerializedSize() |
void |
makeDense() |
void |
mergeWith(HyperLogLog other) |
static HyperLogLog |
newInstance(int numberOfBuckets) |
static HyperLogLog |
newInstance(io.airlift.slice.Slice serialized) |
io.airlift.slice.Slice |
serialize() |
public static HyperLogLog newInstance(int numberOfBuckets)
public static HyperLogLog newInstance(io.airlift.slice.Slice serialized)
public void add(long value)
public void add(io.airlift.slice.Slice value)
public void addHash(long hash)
hash - The hash should be the 64 least significant bits of the murmur3_128 hash of the value.
For example: io.airlift.slice.Murmur3.hash64(value).public void mergeWith(HyperLogLog other)
public long cardinality()
public int estimatedInMemorySize()
public int estimatedSerializedSize()
public io.airlift.slice.Slice serialize()
public void makeDense()
Copyright © 2010-2017 Airlift. All Rights Reserved.