|
datasketches-cpp
|
Compact array tuple sketch. More...
#include <array_tuple_sketch.hpp>
Public Member Functions | |
| template<typename Sketch > | |
| compact_array_tuple_sketch (const Sketch &other, bool ordered=true) | |
| Copy constructor. More... | |
| uint8_t | get_num_values () const |
| void | serialize (std::ostream &os) const |
| This method serializes the sketch into a given stream in a binary form. More... | |
| vector_bytes | serialize (unsigned header_size_bytes=0) const |
| This method serializes the sketch as a vector of bytes. More... | |
Public Member Functions inherited from compact_tuple_sketch< Array, typename Array::allocator_type > | |
| compact_tuple_sketch (const Base &other, bool ordered) | |
| Copy constructor. More... | |
| compact_tuple_sketch (const compact_tuple_sketch &other)=default | |
| Copy constructor. More... | |
| compact_tuple_sketch (compact_tuple_sketch &&) noexcept | |
| Move constructor. More... | |
| compact_tuple_sketch (const theta_sketch_alloc< AllocU64 > &other, const Array &summary, bool ordered=true) | |
| Constructor from Theta sketch. More... | |
| compact_tuple_sketch & | operator= (const compact_tuple_sketch &other)=default |
| Copy assignment. More... | |
| compact_tuple_sketch & | operator= (compact_tuple_sketch &&other)=default |
| Move assignment. More... | |
| void | serialize (std::ostream &os, const SerDe &sd=SerDe()) const |
| This method serializes the sketch into a given stream in a binary form. More... | |
| vector_bytes | serialize (unsigned header_size_bytes=0, const SerDe &sd=SerDe()) const |
| This method serializes the sketch as a vector of bytes. More... | |
Public Member Functions inherited from tuple_sketch< Array, typename Array::allocator_type > | |
| double | get_estimate () const |
| double | get_lower_bound (uint8_t num_std_devs, uint32_t num_subset_entries) const |
| Returns the approximate lower error bound given a number of standard deviations over an arbitrary number of items stored in the sketch. More... | |
| double | get_lower_bound (uint8_t num_std_devs) const |
| Returns the approximate lower error bound given a number of standard deviations. More... | |
| double | get_upper_bound (uint8_t num_std_devs, uint32_t num_subset_entries) const |
| Returns the approximate upper error bound given a number of standard deviations over an arbitrary number of items stored in the sketch. More... | |
| double | get_upper_bound (uint8_t num_std_devs) const |
| Returns the approximate upper error bound given a number of standard deviations. More... | |
| bool | is_estimation_mode () const |
| double | get_theta () const |
| string< typename Array::allocator_type > | to_string (bool print_items=false) const |
| Provides a human-readable summary of this sketch as a string. More... | |
Static Public Member Functions | |
| static compact_array_tuple_sketch | deserialize (std::istream &is, uint64_t seed=DEFAULT_SEED, const Allocator &allocator=Allocator()) |
| This method deserializes a sketch from a given stream. More... | |
| static compact_array_tuple_sketch | deserialize (const void *bytes, size_t size, uint64_t seed=DEFAULT_SEED, const Allocator &allocator=Allocator()) |
| This method deserializes a sketch from a given array of bytes. More... | |
Static Public Member Functions inherited from compact_tuple_sketch< Array, typename Array::allocator_type > | |
| static compact_tuple_sketch | deserialize (std::istream &is, uint64_t seed=DEFAULT_SEED, const SerDe &sd=SerDe(), const typename Array::allocator_type &allocator=typename Array::allocator_type()) |
| This method deserializes a sketch from a given stream. More... | |
| static compact_tuple_sketch | deserialize (const void *bytes, size_t size, uint64_t seed=DEFAULT_SEED, const SerDe &sd=SerDe(), const typename Array::allocator_type &allocator=typename Array::allocator_type()) |
| This method deserializes a sketch from a given array of bytes. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from compact_tuple_sketch< Array, typename Array::allocator_type > | |
| size_t | get_serialized_size_summaries_bytes (const SerDe &sd) const |
| Computes size needed to serialize summaries in the sketch. More... | |
| size_t | get_serialized_size_summaries_bytes (const SerDe &sd) const |
| Computes size needed to serialize summaries in the sketch. More... | |
Compact array tuple sketch.
| compact_array_tuple_sketch | ( | const Sketch & | other, |
| bool | ordered = true |
||
| ) |
Copy constructor.
Constructs a compact sketch from another sketch (update or compact)
| other | sketch to be constructed from |
| ordered | if true make the resulting sketch ordered |
| uint8_t get_num_values |
| void serialize | ( | std::ostream & | os | ) | const |
This method serializes the sketch into a given stream in a binary form.
| os | output stream |
| auto serialize | ( | unsigned | header_size_bytes = 0 | ) | const |
This method serializes the sketch as a vector of bytes.
An optional header can be reserved in front of the sketch. It is a blank space of a given size.
| header_size_bytes | space to reserve in front of the sketch |
|
static |
This method deserializes a sketch from a given stream.
| is | input stream |
| seed | the seed for the hash function that was used to create the sketch |
| allocator | instance of an Allocator |
|
static |
This method deserializes a sketch from a given array of bytes.
| bytes | pointer to the array of bytes |
| size | the size of the array |
| seed | the seed for the hash function that was used to create the sketch |
| allocator | instance of an Allocator |