datasketches-cpp
Public Member Functions | List of all members
base_theta_sketch_alloc< Allocator > Class Template Referenceabstract

Abstract base class for Theta sketch. More...

#include <theta_sketch.hpp>

Public Member Functions

virtual Allocator get_allocator () const =0
 
virtual bool is_empty () const =0
 
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. 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
 
virtual uint64_t get_theta64 () const =0
 
virtual uint32_t get_num_retained () const =0
 
virtual uint16_t get_seed_hash () const =0
 
virtual bool is_ordered () const =0
 
virtual string< Allocator > to_string (bool print_items=false) const
 Provides a human-readable summary of this sketch as a string. More...
 

Detailed Description

template<typename Allocator = std::allocator<uint64_t>>
class datasketches::base_theta_sketch_alloc< Allocator >

Abstract base class for Theta sketch.

Member Function Documentation

◆ get_allocator()

virtual Allocator get_allocator ( ) const
pure virtual

◆ is_empty()

virtual bool is_empty ( ) const
pure virtual
Returns
true if this sketch represents an empty set (not the same as no retained entries!)

Implemented in wrapped_compact_theta_sketch_alloc< Allocator >, compact_theta_sketch_alloc< Allocator >, and update_theta_sketch_alloc< Allocator >.

◆ get_estimate()

double get_estimate
Returns
estimate of the distinct count of the input stream

◆ get_lower_bound()

double get_lower_bound ( uint8_t  num_std_devs) const

Returns the approximate lower error bound given a number of standard deviations.

This parameter is similar to the number of standard deviations of the normal distribution and corresponds to approximately 67%, 95% and 99% confidence intervals.

Parameters
num_std_devsnumber of Standard Deviations (1, 2 or 3)
Returns
the lower bound

◆ get_upper_bound()

double get_upper_bound ( uint8_t  num_std_devs) const

Returns the approximate upper error bound given a number of standard deviations.

This parameter is similar to the number of standard deviations of the normal distribution and corresponds to approximately 67%, 95% and 99% confidence intervals.

Parameters
num_std_devsnumber of Standard Deviations (1, 2 or 3)
Returns
the upper bound

◆ is_estimation_mode()

bool is_estimation_mode
Returns
true if the sketch is in estimation mode (as opposed to exact mode)

◆ get_theta()

double get_theta
Returns
theta as a fraction from 0 to 1 (effective sampling rate)

◆ get_theta64()

virtual uint64_t get_theta64 ( ) const
pure virtual
Returns
theta as a positive integer between 0 and LLONG_MAX

Implemented in wrapped_compact_theta_sketch_alloc< Allocator >, compact_theta_sketch_alloc< Allocator >, and update_theta_sketch_alloc< Allocator >.

◆ get_num_retained()

virtual uint32_t get_num_retained ( ) const
pure virtual

◆ get_seed_hash()

virtual uint16_t get_seed_hash ( ) const
pure virtual

◆ is_ordered()

virtual bool is_ordered ( ) const
pure virtual

◆ to_string()

string< A > to_string ( bool  print_items = false) const
virtual

Provides a human-readable summary of this sketch as a string.

Parameters
print_itemsif true include the list of items retained by the sketch
Returns
sketch summary as a string

The documentation for this class was generated from the following files: