public final class HyperLogLogPlusPlus extends Object implements Releasable
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_PRECISION |
static int |
MAX_PRECISION |
static int |
MIN_PRECISION |
Constructor and Description |
---|
HyperLogLogPlusPlus(int precision,
BigArrays bigArrays,
long initialBucketCount) |
Modifier and Type | Method and Description |
---|---|
long |
cardinality(long bucket) |
void |
close() |
void |
collect(long bucket,
long hash) |
long |
maxBucket() |
static long |
memoryUsage(int precision)
Return the expected per-bucket memory usage for the given precision.
|
void |
merge(long thisBucket,
HyperLogLogPlusPlus other,
long otherBucket) |
int |
precision() |
static int |
precisionFromThreshold(long count)
Compute the required precision so that
count distinct entries
would be counted with linear counting. |
static HyperLogLogPlusPlus |
readFrom(StreamInput in,
BigArrays bigArrays) |
void |
writeTo(long bucket,
StreamOutput out) |
public static final int MIN_PRECISION
public static final int DEFAULT_PRECISION
public static final int MAX_PRECISION
public HyperLogLogPlusPlus(int precision, BigArrays bigArrays, long initialBucketCount)
public static int precisionFromThreshold(long count)
count
distinct entries
would be counted with linear counting.public static long memoryUsage(int precision)
public int precision()
public long maxBucket()
public void merge(long thisBucket, HyperLogLogPlusPlus other, long otherBucket)
public void collect(long bucket, long hash)
public long cardinality(long bucket)
public void close()
close
in interface AutoCloseable
close
in interface Releasable
public void writeTo(long bucket, StreamOutput out) throws IOException
IOException
public static HyperLogLogPlusPlus readFrom(StreamInput in, BigArrays bigArrays) throws IOException
IOException
Copyright © 2009–2017. All rights reserved.