datasketches-cpp
Loading...
Searching...
No Matches
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.
 cpc_union_alloc (const cpc_union_alloc< A > &other)
 Copy constructor.
 cpc_union_alloc (cpc_union_alloc< A > &&other) noexcept
 Move constructor.
cpc_union_alloc< A > & operator= (const cpc_union_alloc< A > &other)
 Copy assignment.
cpc_union_alloc< A > & operator= (cpc_union_alloc< A > &&other) noexcept
 Move assignment.
void update (const cpc_sketch_alloc< A > &sketch)
 This method is to update the union with a given sketch (lvalue).
void update (cpc_sketch_alloc< A > &&sketch)
 This method is to update the union with a given sketch (rvalue).
cpc_sketch_alloc< A > get_result () const
 This method produces a copy of the current state of the union as a sketch.

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]

template<typename A>
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]

template<typename A>
cpc_union_alloc ( const cpc_union_alloc< A > & other)

Copy constructor.

Parameters
otherunion to be copied

◆ cpc_union_alloc() [3/3]

template<typename A>
cpc_union_alloc ( cpc_union_alloc< A > && other)
noexcept

Move constructor.

Parameters
otherunion to be moved

Member Function Documentation

◆ operator=() [1/2]

template<typename A>
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]

template<typename A>
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]

template<typename A>
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]

template<typename A>
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()

template<typename A>
cpc_sketch_alloc< A > get_result ( ) const

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: