public final class DoubleSummary extends Object implements UpdatableSummary<Double>
Modifier and Type | Class and Description |
---|---|
static class |
DoubleSummary.Mode
The aggregation modes for this Summary
|
Constructor and Description |
---|
DoubleSummary(DoubleSummary.Mode mode)
Creates an instance of DoubleSummary with a given mode.
|
Modifier and Type | Method and Description |
---|---|
DoubleSummary |
copy()
Deep copy.
|
static DeserializeResult<DoubleSummary> |
fromMemory(org.apache.datasketches.memory.Memory mem)
Creates an instance of the DoubleSummary given a serialized representation
|
double |
getValue() |
byte[] |
toByteArray()
This is to serialize a Summary instance to a byte array.
|
DoubleSummary |
update(Double value)
This is to provide a method of updating summaries.
|
public DoubleSummary(DoubleSummary.Mode mode)
mode
- update modepublic DoubleSummary update(Double value)
UpdatableSummary
update
in interface UpdatableSummary<Double>
value
- update valuepublic DoubleSummary copy()
Summary
Caution: This must implement a deep copy.
public double getValue()
public byte[] toByteArray()
Summary
The user should encode in the byte array its total size, which is used during deserialization, especially if the Summary has variable sized elements.
toByteArray
in interface Summary
public static DeserializeResult<DoubleSummary> fromMemory(org.apache.datasketches.memory.Memory mem)
mem
- Memory object with serialized DoubleSummaryCopyright © 2015–2021 The Apache Software Foundation. All rights reserved.