|
| update_theta_sketch_alloc (const update_theta_sketch_alloc &other)=default |
| Copy constructor.
|
|
| update_theta_sketch_alloc (update_theta_sketch_alloc &&other) noexcept=default |
| Move constructor.
|
|
update_theta_sketch_alloc & | operator= (const update_theta_sketch_alloc &other)=default |
| Copy assignment.
|
|
update_theta_sketch_alloc & | operator= (update_theta_sketch_alloc &&other)=default |
| Move assignment.
|
|
virtual Allocator | get_allocator () const |
|
virtual bool | is_empty () const |
|
virtual bool | is_ordered () const |
|
virtual uint16_t | get_seed_hash () const |
|
virtual uint64_t | get_theta64 () const |
|
virtual uint32_t | get_num_retained () const |
|
uint8_t | get_lg_k () const |
|
resize_factor | get_rf () const |
|
void | update (const std::string &value) |
| Update this sketch with a given string.
|
|
void | update (uint64_t value) |
| Update this sketch with a given unsigned 64-bit integer.
|
|
void | update (int64_t value) |
| Update this sketch with a given signed 64-bit integer.
|
|
void | update (uint32_t value) |
| Update this sketch with a given unsigned 32-bit integer.
|
|
void | update (int32_t value) |
| Update this sketch with a given signed 32-bit integer.
|
|
void | update (uint16_t value) |
| Update this sketch with a given unsigned 16-bit integer.
|
|
void | update (int16_t value) |
| Update this sketch with a given signed 16-bit integer.
|
|
void | update (uint8_t value) |
| Update this sketch with a given unsigned 8-bit integer.
|
|
void | update (int8_t value) |
| Update this sketch with a given signed 8-bit integer.
|
|
void | update (double value) |
| Update this sketch with a given double-precision floating point value.
|
|
void | update (float value) |
| Update this sketch with a given floating point value.
|
|
void | update (const void *data, size_t length) |
| Update this sketch with given data of any type.
|
|
void | trim () |
| Remove retained entries in excess of the nominal size k (if any)
|
|
void | reset () |
| Reset the sketch to the initial empty state.
|
|
compact_theta_sketch_alloc< Allocator > | compact (bool ordered=true) const |
| Converts this sketch to a compact sketch (ordered or unordered).
|
|
virtual iterator | begin () |
| Iterator over hash values in this sketch.
|
|
virtual iterator | end () |
| Iterator pointing past the valid range.
|
|
virtual const_iterator | begin () const |
| Const iterator over hash values in this sketch.
|
|
virtual const_iterator | end () const |
| Const iterator pointing past the valid range.
|
|
double | get_estimate () const |
|
double | get_lower_bound (uint8_t num_std_devs) const |
| Returns the approximate lower error bound given a number of standard deviations.
|
|
double | get_upper_bound (uint8_t num_std_devs) const |
| Returns the approximate upper error bound given a number of standard deviations.
|
|
bool | is_estimation_mode () const |
|
double | get_theta () const |
|
virtual string< Allocator > | to_string (bool print_items=false) const |
| Provides a human-readable summary of this sketch as a string.
|
|
template<typename Allocator = std::allocator<uint64_t>>
class datasketches::update_theta_sketch_alloc< Allocator >
Update Theta sketch.
The purpose of this class is to build a Theta sketch from input data via the update() methods. There is no constructor. Use builder instead.
template<typename A >
void update |
( |
const void * |
data, |
|
|
size_t |
length |
|
) |
| |
Update this sketch with given data of any type.
This is a "universal" update that covers all cases above, but may produce different hashes. Be very careful to hash input values consistently using the same approach both over time and on different platforms and while passing sketches between C++ environment and Java environment. Otherwise two sketches that should represent overlapping sets will be disjoint For instance, for signed 32-bit values call update(int32_t) method above, which does widening conversion to int64_t, if compatibility with Java is expected
- Parameters
-
data | pointer to the data |
length | of the data in bytes |