public class FMSketch extends Object implements NumDistinctValueEstimator
| Modifier and Type | Field and Description |
|---|---|
static int |
BIT_VECTOR_SIZE |
| Constructor and Description |
|---|
FMSketch(int numBitVectors) |
| Modifier and Type | Method and Description |
|---|---|
void |
addToEstimator(byte[] value,
int offset,
int length) |
void |
addToEstimator(double d) |
void |
addToEstimator(HiveDecimal decimal) |
void |
addToEstimator(long v) |
void |
addToEstimator(String s) |
void |
addToEstimatorPCSA(double d) |
void |
addToEstimatorPCSA(HiveDecimal decimal) |
void |
addToEstimatorPCSA(long v) |
boolean |
canMerge(NumDistinctValueEstimator o) |
NumDistinctValueEstimator |
deserialize(byte[] buf) |
long |
estimateNumDistinctValues() |
long |
estimateNumDistinctValuesPCSA() |
javolution.util.FastBitSet |
getBitVector(int index) |
int |
getBitVectorSize() |
int |
getNumBitVectors() |
int |
lengthFor(JavaDataModel model) |
void |
mergeEstimators(FMSketch o) |
void |
mergeEstimators(NumDistinctValueEstimator o) |
void |
printNumDistinctValueEstimator() |
void |
reset()
Resets a distinctValueEstimator object to its original state.
|
byte[] |
serialize() |
javolution.util.FastBitSet |
setBitVector(javolution.util.FastBitSet fastBitSet,
int index) |
public static final int BIT_VECTOR_SIZE
public void reset()
reset in interface NumDistinctValueEstimatorpublic javolution.util.FastBitSet getBitVector(int index)
public javolution.util.FastBitSet setBitVector(javolution.util.FastBitSet fastBitSet,
int index)
public int getNumBitVectors()
public int getBitVectorSize()
public void printNumDistinctValueEstimator()
public byte[] serialize()
serialize in interface NumDistinctValueEstimatorpublic NumDistinctValueEstimator deserialize(byte[] buf)
deserialize in interface NumDistinctValueEstimatorpublic void addToEstimator(long v)
addToEstimator in interface NumDistinctValueEstimatorpublic void addToEstimatorPCSA(long v)
public void addToEstimator(double d)
addToEstimator in interface NumDistinctValueEstimatorpublic void addToEstimatorPCSA(double d)
public void addToEstimator(HiveDecimal decimal)
addToEstimator in interface NumDistinctValueEstimatorpublic void addToEstimatorPCSA(HiveDecimal decimal)
public void mergeEstimators(FMSketch o)
public long estimateNumDistinctValuesPCSA()
public long estimateNumDistinctValues()
estimateNumDistinctValues in interface NumDistinctValueEstimatorpublic int lengthFor(JavaDataModel model)
lengthFor in interface NumDistinctValueEstimatorpublic void mergeEstimators(NumDistinctValueEstimator o)
mergeEstimators in interface NumDistinctValueEstimatorpublic void addToEstimator(String s)
addToEstimator in interface NumDistinctValueEstimatorpublic void addToEstimator(byte[] value,
int offset,
int length)
addToEstimator in interface NumDistinctValueEstimatorpublic boolean canMerge(NumDistinctValueEstimator o)
canMerge in interface NumDistinctValueEstimatorCopyright © 2024 The Apache Software Foundation. All rights reserved.