public class HyperLogLogPlus
extends java.lang.Object
| Constructor and Description |
|---|
HyperLogLogPlus(int p,
int pprime) |
| Modifier and Type | Method and Description |
|---|---|
void |
aggregate(long x) |
long |
cardinality()
Compute the estimated cardinality
|
static HyperLogLogPlus |
fromBytes(byte[] bytes) |
void |
fuse(HyperLogLogPlus other)
Merge estimates from another HLL+
|
long |
getInitTime() |
java.lang.String |
getKey() |
int |
getP() |
int |
getPPrime() |
byte |
getRho(int idx) |
boolean |
hasExpired() |
boolean |
isNew(long x)
Check if 'x' would modify the cardinality estimation
|
void |
setInitTime(long instant) |
void |
setKey(java.lang.String key) |
byte |
setRho(int idx,
byte rho) |
byte[] |
toBytes() |
void |
toNormal() |
public long getInitTime()
public void setInitTime(long instant)
public boolean hasExpired()
public boolean isNew(long x)
public void aggregate(long x)
throws java.io.IOException
java.io.IOExceptionpublic long cardinality()
throws java.io.IOException
java.io.IOExceptionpublic byte setRho(int idx,
byte rho)
public byte getRho(int idx)
public void toNormal()
throws java.io.IOException
java.io.IOExceptionpublic void fuse(HyperLogLogPlus other) throws java.io.IOException
other - java.io.IOExceptionpublic byte[] toBytes()
throws java.io.IOException
java.io.IOExceptionpublic static HyperLogLogPlus fromBytes(byte[] bytes) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOExceptionjava.lang.ClassNotFoundExceptionpublic int getP()
public int getPPrime()
public java.lang.String getKey()
public void setKey(java.lang.String key)