Package org.apache.datasketches.tuple
Class Sketches
- java.lang.Object
-
- org.apache.datasketches.tuple.Sketches
-
public final class Sketches extends Object
Convenient static methods to instantiate generic tuple sketches.
-
-
Constructor Summary
Constructors Constructor Description Sketches()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static <S extends Summary>
Sketch<S>createEmptySketch()
static <S extends Summary>
Sketch<S>heapifySketch(org.apache.datasketches.memory.Memory mem, SummaryDeserializer<S> deserializer)
Instantiate a Sketch from a given Memory.static <U,S extends UpdatableSummary<U>>
UpdatableSketch<U,S>heapifyUpdatableSketch(org.apache.datasketches.memory.Memory mem, SummaryDeserializer<S> deserializer, SummaryFactory<S> summaryFactory)
Deprecated.As of 3.0.0, heapifying an UpdatableSketch is deprecated.
-
-
-
Method Detail
-
createEmptySketch
public static <S extends Summary> Sketch<S> createEmptySketch()
- Type Parameters:
S
- Type of Summary- Returns:
- an empty instance of Sketch
-
heapifySketch
public static <S extends Summary> Sketch<S> heapifySketch(org.apache.datasketches.memory.Memory mem, SummaryDeserializer<S> deserializer)
Instantiate a Sketch from a given Memory.As of 3.0.0, heapifying an UpdatableSketch is deprecated. This capability will be removed in a future release. Heapifying a CompactSketch is not deprecated.
- Type Parameters:
S
- Type of Summary- Parameters:
mem
- Memory object representing a Sketchdeserializer
- instance of SummaryDeserializer- Returns:
- Sketch created from its Memory representation
-
heapifyUpdatableSketch
@Deprecated public static <U,S extends UpdatableSummary<U>> UpdatableSketch<U,S> heapifyUpdatableSketch(org.apache.datasketches.memory.Memory mem, SummaryDeserializer<S> deserializer, SummaryFactory<S> summaryFactory)
Deprecated.As of 3.0.0, heapifying an UpdatableSketch is deprecated. This capability will be removed in a future release. Heapifying a CompactSketch is not deprecated.Instantiate UpdatableSketch from a given Memory- Type Parameters:
U
- Type of update valueS
- Type of Summary- Parameters:
mem
- Memory object representing a Sketchdeserializer
- instance of SummaryDeserializersummaryFactory
- instance of SummaryFactory- Returns:
- Sketch created from its Memory representation
-
-