Package | Description |
---|---|
org.apache.datasketches.common |
This package is for common classes that may be used across all the sketch families.
|
org.apache.datasketches.frequencies |
This package is dedicated to streaming algorithms that enable estimation of the
frequency of occurrence of items in a weighted multiset stream of items.
|
org.apache.datasketches.kll |
This package is for the implementations of the sketch algorithm developed by Zohar Karnin, Kevin Lang,
and Edo Liberty that is commonly referred to as the "KLL" sketch after the authors' last names.
|
org.apache.datasketches.quantiles |
The quantiles package contains stochastic streaming algorithms that enable single-pass
analysis of the distribution of a stream of quantiles.
|
org.apache.datasketches.sampling |
This package is dedicated to streaming algorithms that enable fixed size, uniform sampling of
weighted and unweighted items from a stream.
|
Modifier and Type | Class and Description |
---|---|
class |
ArrayOfBooleansSerDe
Methods of serializing and deserializing arrays of Boolean as a bit array.
|
class |
ArrayOfDoublesSerDe
Methods of serializing and deserializing arrays of Double.
|
class |
ArrayOfLongsSerDe
Methods of serializing and deserializing arrays of Long.
|
class |
ArrayOfNumbersSerDe
Methods of serializing and deserializing arrays of the object version of primitive types of
Number.
|
class |
ArrayOfStringsSerDe
Methods of serializing and deserializing arrays of String.
|
class |
ArrayOfUtf16StringsSerDe
Methods of serializing and deserializing arrays of String.
|
Modifier and Type | Method and Description |
---|---|
static <T> ItemsSketch<T> |
ItemsSketch.getInstance(org.apache.datasketches.memory.Memory srcMem,
ArrayOfItemsSerDe<T> serDe)
Returns a sketch instance of this class from the given srcMem,
which must be a Memory representation of this sketch class.
|
byte[] |
ItemsSketch.toByteArray(ArrayOfItemsSerDe<T> serDe)
Returns a byte array representation of this sketch
|
Modifier and Type | Method and Description |
---|---|
static <T> KllItemsSketch<T> |
KllItemsSketch.heapify(org.apache.datasketches.memory.Memory srcMem,
Comparator<? super T> comparator,
ArrayOfItemsSerDe<T> serDe)
Factory heapify takes a compact sketch image in Memory and instantiates an on-heap sketch.
|
static <T> KllItemsSketch<T> |
KllItemsSketch.newHeapInstance(Comparator<? super T> comparator,
ArrayOfItemsSerDe<T> serDe)
Create a new heap instance of this sketch with the default k = 200.
|
static <T> KllItemsSketch<T> |
KllItemsSketch.newHeapInstance(int k,
Comparator<? super T> comparator,
ArrayOfItemsSerDe<T> serDe)
Create a new heap instance of this sketch with a given parameter k.
|
static <T> KllItemsSketch<T> |
KllItemsSketch.wrap(org.apache.datasketches.memory.Memory srcMem,
Comparator<? super T> comparator,
ArrayOfItemsSerDe<T> serDe)
Constructs a thin wrapper on the heap around a Memory (or WritableMemory) already initialized with a
validated sketch image of a type T consistent with the given comparator and serDe.
|
Modifier and Type | Method and Description |
---|---|
static <T> ItemsUnion<T> |
ItemsUnion.getInstance(Class<T> clazz,
org.apache.datasketches.memory.Memory srcMem,
Comparator<? super T> comparator,
ArrayOfItemsSerDe<T> serDe)
Heapify the given srcMem into a Union object.
|
static <T> ItemsSketch<T> |
ItemsSketch.getInstance(Class<T> clazz,
org.apache.datasketches.memory.Memory srcMem,
Comparator<? super T> comparator,
ArrayOfItemsSerDe<T> serDe)
Heapifies the given srcMem, which must be a Memory image of a ItemsSketch
|
void |
ItemsSketch.putMemory(org.apache.datasketches.memory.WritableMemory dstMem,
ArrayOfItemsSerDe<T> serDe)
Puts the current sketch into the given Memory if there is sufficient space.
|
byte[] |
ItemsUnion.toByteArray(ArrayOfItemsSerDe<T> serDe)
Serialize this union to a byte array.
|
byte[] |
ItemsSketch.toByteArray(ArrayOfItemsSerDe<T> serDe)
Serialize this sketch to a byte array form.
|
byte[] |
ItemsSketch.toByteArray(boolean ordered,
ArrayOfItemsSerDe<T> serDe)
Serialize this sketch to a byte array form.
|
void |
ItemsUnion.union(org.apache.datasketches.memory.Memory srcMem,
ArrayOfItemsSerDe<T> serDe)
Iterative union operation, which means this method can be repeatedly called.
|
Modifier and Type | Method and Description |
---|---|
int |
EbppsItemsSketch.getSerializedSizeBytes(ArrayOfItemsSerDe<? super T> serDe)
Returns the size of a byte array representation of this sketch.
|
int |
EbppsItemsSketch.getSerializedSizeBytes(ArrayOfItemsSerDe<? super T> serDe,
Class<?> clazz)
Returns the length of a byte array representation of this sketch.
|
static <T> VarOptItemsUnion<T> |
VarOptItemsUnion.heapify(org.apache.datasketches.memory.Memory srcMem,
ArrayOfItemsSerDe<T> serDe)
Instantiates a Union from Memory
|
static <T> ReservoirItemsSketch<T> |
ReservoirItemsSketch.heapify(org.apache.datasketches.memory.Memory srcMem,
ArrayOfItemsSerDe<T> serDe)
Returns a sketch instance of this class from the given srcMem,
which must be a Memory representation of this sketch class.
|
static <T> ReservoirItemsUnion<T> |
ReservoirItemsUnion.heapify(org.apache.datasketches.memory.Memory srcMem,
ArrayOfItemsSerDe<T> serDe)
Instantiates a Union from Memory
|
static <T> VarOptItemsSketch<T> |
VarOptItemsSketch.heapify(org.apache.datasketches.memory.Memory srcMem,
ArrayOfItemsSerDe<T> serDe)
Returns a sketch instance of this class from the given srcMem,
which must be a Memory representation of this sketch class.
|
static <T> EbppsItemsSketch<T> |
EbppsItemsSketch.heapify(org.apache.datasketches.memory.Memory srcMem,
ArrayOfItemsSerDe<T> serDe)
Returns a sketch instance of this class from the given srcMem,
which must be a Memory representation of this sketch class.
|
byte[] |
ReservoirItemsSketch.toByteArray(ArrayOfItemsSerDe<? super T> serDe)
Returns a byte array representation of this sketch.
|
byte[] |
VarOptItemsSketch.toByteArray(ArrayOfItemsSerDe<? super T> serDe)
Returns a byte array representation of this sketch.
|
byte[] |
EbppsItemsSketch.toByteArray(ArrayOfItemsSerDe<? super T> serDe)
Returns a byte array representation of this sketch.
|
byte[] |
ReservoirItemsSketch.toByteArray(ArrayOfItemsSerDe<? super T> serDe,
Class<?> clazz)
Returns a byte array representation of this sketch.
|
byte[] |
VarOptItemsSketch.toByteArray(ArrayOfItemsSerDe<? super T> serDe,
Class<?> clazz)
Returns a byte array representation of this sketch.
|
byte[] |
EbppsItemsSketch.toByteArray(ArrayOfItemsSerDe<? super T> serDe,
Class<?> clazz)
Returns a byte array representation of this sketch.
|
byte[] |
VarOptItemsUnion.toByteArray(ArrayOfItemsSerDe<T> serDe)
Returns a byte array representation of this union
|
byte[] |
ReservoirItemsUnion.toByteArray(ArrayOfItemsSerDe<T> serDe)
Returns a byte array representation of this union
|
byte[] |
VarOptItemsUnion.toByteArray(ArrayOfItemsSerDe<T> serDe,
Class<?> clazz)
Returns a byte array representation of this union.
|
byte[] |
ReservoirItemsUnion.toByteArray(ArrayOfItemsSerDe<T> serDe,
Class<?> clazz)
Returns a byte array representation of this union.
|
void |
VarOptItemsUnion.update(org.apache.datasketches.memory.Memory mem,
ArrayOfItemsSerDe<T> serDe)
Union the given Memory image of the sketch.
|
void |
ReservoirItemsUnion.update(org.apache.datasketches.memory.Memory mem,
ArrayOfItemsSerDe<T> serDe)
Union the given Memory image of the sketch.
|
Copyright © 2015–2024 The Apache Software Foundation. All rights reserved.