|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.googlecode.compressingcircularbuffers.SummingCompressionMethod
public class SummingCompressionMethod
Compresses by aggregating adjacent samples into their totals (sum).
Constructor Summary | |
---|---|
SummingCompressionMethod()
|
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 SummingCompressionMethod()
Method Detail |
---|
public void update(double value)
CompressionMethod
update
in interface CompressionMethod
value
- sampled value used to update the compressed value.public void reset()
CompressionMethod
reset
in interface CompressionMethod
public double getCompressedValue()
CompressionMethod
getCompressedValue
in interface CompressionMethod
public double mergeValues(double older, double newer)
CompressionMethod
mergeValues
in interface CompressionMethod
older
- 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 |