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)
UpdatableSummaryupdate in interface UpdatableSummary<Double>value - update valuepublic DoubleSummary copy()
SummaryCaution: This must implement a deep copy.
public double getValue()
public byte[] toByteArray()
SummaryThe 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 Summarypublic static DeserializeResult<DoubleSummary> fromMemory(org.apache.datasketches.memory.Memory mem)
mem - Memory object with serialized DoubleSummaryCopyright © 2015–2024 The Apache Software Foundation. All rights reserved.