datasketches-cpp
Public Member Functions | List of all members
theta_base_builder< Derived, Allocator > Class Template Reference

Theta base builder. More...

#include <theta_update_sketch_base.hpp>

Inheritance diagram for theta_base_builder< Derived, Allocator >:
tuple_base_builder< Derived, Policy, Allocator >

Public Member Functions

 theta_base_builder (const Allocator &allocator)
 Creates and instance of the builder with default parameters. More...
 
Derived & set_lg_k (uint8_t lg_k)
 Set log2(k), where k is a nominal number of entries in the sketch. More...
 
Derived & set_resize_factor (resize_factor rf)
 Set resize factor for the internal hash table (defaults to 8) More...
 
Derived & set_p (float p)
 Set sampling probability (initial theta). More...
 
Derived & set_seed (uint64_t seed)
 Set the seed for the hash function. More...
 

Detailed Description

template<typename Derived, typename Allocator>
class datasketches::theta_base_builder< Derived, Allocator >

Theta base builder.

Constructor & Destructor Documentation

◆ theta_base_builder()

theta_base_builder ( const Allocator &  allocator)

Creates and instance of the builder with default parameters.

Parameters
allocatorinstance of an Allocator to pass to created sketches

Member Function Documentation

◆ set_lg_k()

Derived & set_lg_k ( uint8_t  lg_k)

Set log2(k), where k is a nominal number of entries in the sketch.

Parameters
lg_kbase 2 logarithm of nominal number of entries
Returns
this builder

◆ set_resize_factor()

Derived & set_resize_factor ( resize_factor  rf)

Set resize factor for the internal hash table (defaults to 8)

Parameters
rfresize factor
Returns
this builder

◆ set_p()

Derived & set_p ( float  p)

Set sampling probability (initial theta).

The default is 1, so the sketch retains all entries until it reaches the limit, at which point it goes into the estimation mode and reduces the effective sampling probability (theta) as necessary.

Parameters
psampling probability
Returns
this builder

◆ set_seed()

Derived & set_seed ( uint64_t  seed)

Set the seed for the hash function.

Should be used carefully if needed. Sketches produced with different seed are not compatible and cannot be mixed in set operations.

Parameters
seedhash seed
Returns
this builder

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