public class KllUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static org.apache.datasketches.kll.KllFloatsSketch |
deserializeKll(byte[] buf)
This function deserializes the serialized KLL sketch from a byte array.
|
static org.apache.datasketches.kll.KllFloatsSketch |
deserializeKll(byte[] buf,
int start,
int len)
This function deserializes the serialized KLL sketch from a byte array.
|
static org.apache.datasketches.kll.KllFloatsSketch |
deserializeKll(InputStream in)
This function deserializes the serialized KLL sketch from a stream.
|
static int |
lengthFor(JavaDataModel model,
org.apache.datasketches.kll.KllFloatsSketch kll)
Returns the length of the given KLL sketch according to the given java data model.
|
static void |
serializeKll(OutputStream out,
org.apache.datasketches.kll.KllFloatsSketch kll)
KLL is serialized according to what provided by data-sketches library
|
public static void serializeKll(OutputStream out, org.apache.datasketches.kll.KllFloatsSketch kll) throws IOException
out - output stream to write tokll - KLL sketch that needs to be serializedIOException - if an error occurs during serializationpublic static org.apache.datasketches.kll.KllFloatsSketch deserializeKll(InputStream in) throws IOException
in - input stream to be deserializedIOException - if errors occur while reading the streampublic static org.apache.datasketches.kll.KllFloatsSketch deserializeKll(byte[] buf,
int start,
int len)
buf - to deserializestart - start index for deserializationlen - start+len is deserializedpublic static org.apache.datasketches.kll.KllFloatsSketch deserializeKll(byte[] buf)
buf - to deserializepublic static int lengthFor(JavaDataModel model, org.apache.datasketches.kll.KllFloatsSketch kll)
model - the java data model to compute the lengthkll - the KLL sketch to compute the length forCopyright © 2024 The Apache Software Foundation. All rights reserved.