|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.googlecode.compressingcircularbuffers.RandomSamplingCompressionMethod
public class RandomSamplingCompressionMethod
Compresses by replacing adjacent values with a random sample thereof.
| Constructor Summary | |
|---|---|
RandomSamplingCompressionMethod()
|
|
| Method Summary | |
|---|---|
double |
getCompressedValue()
Compressed value representing all updates since last reset of this compression method. |
int |
getCount()
Returns number of samples (updates) in current compressed value. |
double |
mergeValues(double older,
double newer)
Combines two adjacent n-compressed values to form a single 2n-compressed value. |
void |
reset()
Eliminates the impact of previously seen data from the compression method. |
void |
update(double value)
Modifies compressed value to reflect one additional sample value. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RandomSamplingCompressionMethod()
| Method Detail |
|---|
public void update(double value)
CompressionMethod
update in interface CompressionMethodvalue - sampled value used to update the compressed value.public void reset()
CompressionMethod
reset in interface CompressionMethodpublic double getCompressedValue()
CompressionMethod
getCompressedValue in interface CompressionMethod
public double mergeValues(double older,
double newer)
CompressionMethod
mergeValues in interface CompressionMethodolder - the older of the two adjacent values.newer - the newer of the two adjacent values.
public int getCount()
CompressionMethod
getCount in interface CompressionMethod
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||