public class SetDigest extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_MAX_HASHES |
static int |
NUMBER_OF_BUCKETS |
| Constructor and Description |
|---|
SetDigest() |
SetDigest(int maxHashes,
io.airlift.stats.cardinality.HyperLogLog hll,
it.unimi.dsi.fastutil.longs.Long2ShortSortedMap minhash) |
SetDigest(int maxHashes,
int numHllBuckets) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(long value) |
void |
add(io.airlift.slice.Slice value) |
long |
cardinality() |
int |
estimatedInMemorySize() |
int |
estimatedSerializedSize() |
static long |
exactIntersectionCardinality(SetDigest a,
SetDigest b) |
Map<Long,Short> |
getHashCounts() |
io.airlift.stats.cardinality.HyperLogLog |
getHll() |
boolean |
isExact() |
static double |
jaccardIndex(SetDigest a,
SetDigest b) |
void |
mergeWith(SetDigest other) |
static SetDigest |
newInstance(io.airlift.slice.Slice serialized) |
io.airlift.slice.Slice |
serialize() |
public static final int NUMBER_OF_BUCKETS
public static final int DEFAULT_MAX_HASHES
public SetDigest()
public SetDigest(int maxHashes,
int numHllBuckets)
public SetDigest(int maxHashes,
io.airlift.stats.cardinality.HyperLogLog hll,
it.unimi.dsi.fastutil.longs.Long2ShortSortedMap minhash)
public static SetDigest newInstance(io.airlift.slice.Slice serialized)
public io.airlift.slice.Slice serialize()
public io.airlift.stats.cardinality.HyperLogLog getHll()
public int estimatedInMemorySize()
public int estimatedSerializedSize()
public boolean isExact()
public long cardinality()
public static long exactIntersectionCardinality(SetDigest a, SetDigest b)
public void add(long value)
public void add(io.airlift.slice.Slice value)
public void mergeWith(SetDigest other)
Copyright © 2012–2019. All rights reserved.