datasketches-cpp
Loading...
Searching...
No Matches
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< builder, Policy, Allocator > tuple_base_builder< builder, P, A > tuple_base_builder< Derived, Policy, Allocator > update_array_tuple_sketch< Array, Policy, Allocator >::builder tuple_union< Summary, Policy, Allocator >::builder update_tuple_sketch< Summary, Update, Policy, Allocator >::builder

Public Member Functions

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

Detailed Description

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

Theta base builder.

Constructor & Destructor Documentation

◆ theta_base_builder()

template<typename Derived , typename Allocator >
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()

template<typename Derived , typename Allocator >
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()

template<typename Derived , typename Allocator >
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()

template<typename Derived , typename Allocator >
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()

template<typename Derived , typename Allocator >
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: