datasketches-cpp
Public Member Functions | List of all members
cpc_union_alloc< A > Class Template Reference

High performance C++ implementation of Compressed Probabilistic Counting (CPC) Union. More...

#include <cpc_union.hpp>

Public Member Functions

 cpc_union_alloc (uint8_t lg_k=cpc_constants::DEFAULT_LG_K, uint64_t seed=DEFAULT_SEED, const A &allocator=A())
 Creates an instance of the union given the lg_k parameter and hash seed. More...
 
 cpc_union_alloc (const cpc_union_alloc< A > &other)
 Copy constructor. More...
 
 cpc_union_alloc (cpc_union_alloc< A > &&other) noexcept
 Move constructor. More...
 
cpc_union_alloc< A > & operator= (const cpc_union_alloc< A > &other)
 Copy assignment. More...
 
cpc_union_alloc< A > & operator= (cpc_union_alloc< A > &&other) noexcept
 Move assignment. More...
 
void update (const cpc_sketch_alloc< A > &sketch)
 This method is to update the union with a given sketch (lvalue) More...
 
void update (cpc_sketch_alloc< A > &&sketch)
 This method is to update the union with a given sketch (rvalue) More...
 
cpc_sketch_alloc< A > get_result () const
 This method produces a copy of the current state of the union as a sketch. More...
 

Detailed Description

template<typename A>
class datasketches::cpc_union_alloc< A >

High performance C++ implementation of Compressed Probabilistic Counting (CPC) Union.

author Kevin Lang author Alexander Saydakov

Constructor & Destructor Documentation

◆ cpc_union_alloc() [1/3]

cpc_union_alloc ( uint8_t  lg_k = cpc_constants::DEFAULT_LG_K,
uint64_t  seed = DEFAULT_SEED,
const A &  allocator = A() 
)
explicit

Creates an instance of the union given the lg_k parameter and hash seed.

Parameters
lg_kbase 2 logarithm of the number of bins in the sketch
seedfor hash function
allocatorinstance of an allocator

◆ cpc_union_alloc() [2/3]

cpc_union_alloc ( const cpc_union_alloc< A > &  other)

Copy constructor.

Parameters
otherunion to be copied

◆ cpc_union_alloc() [3/3]

cpc_union_alloc ( cpc_union_alloc< A > &&  other)
noexcept

Move constructor.

Parameters
otherunion to be moved

Member Function Documentation

◆ operator=() [1/2]

cpc_union_alloc< A > & operator= ( const cpc_union_alloc< A > &  other)

Copy assignment.

Parameters
otherunion to be copied
Returns
reference to this union

◆ operator=() [2/2]

cpc_union_alloc< A > & operator= ( cpc_union_alloc< A > &&  other)
noexcept

Move assignment.

Parameters
otherunion to be moved
Returns
reference to this union

◆ update() [1/2]

void update ( const cpc_sketch_alloc< A > &  sketch)

This method is to update the union with a given sketch (lvalue)

Parameters
sketchto update the union with

◆ update() [2/2]

void update ( cpc_sketch_alloc< A > &&  sketch)

This method is to update the union with a given sketch (rvalue)

Parameters
sketchto update the union with

◆ get_result()

cpc_sketch_alloc< A > get_result

This method produces a copy of the current state of the union as a sketch.

Returns
the result of the union

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