Thrill
0.1
|
Definition at line 34 of file hyperloglog.hpp.
#include <hyperloglog.hpp>
Public Member Functions | |
HyperLogLogRegisters () | |
template<typename ValueType > | |
void | insert (const ValueType &value) |
void | insert_hash (const uint64_t &hash_value) |
void | mergeDense (const HyperLogLogRegisters< p > &b) |
void | mergeSparse () |
HyperLogLogRegisters | operator+ (const HyperLogLogRegisters< p > ®isters2) const |
double | result () |
calculate count estimation result adjusted for bias More... | |
bool | shouldConvertToDense () |
bool | shouldMerge () |
size_t | size () const |
void | toDense () |
Private Attributes | |
std::vector< HyperLogLogSparseRegister > | deltaSet_ |
std::vector< uint8_t > | entries_ |
HyperLogLogRegisterFormat | format_ |
unsigned | sparse_size_ = 0 |
std::vector< uint8_t > | sparseListBuffer_ |
|
inline |
Definition at line 37 of file hyperloglog.hpp.
|
inline |
Definition at line 47 of file hyperloglog.hpp.
References tlx::siphash().
void insert_hash | ( | const uint64_t & | hash_value | ) |
Definition at line 1715 of file hyperloglog.cpp.
References tlx::clz(), thrill::core::DENSE, and thrill::core::SPARSE.
void mergeDense | ( | const HyperLogLogRegisters< p > & | b | ) |
Definition at line 1761 of file hyperloglog.cpp.
References thrill::core::DENSE, HyperLogLogRegisters< p >::entries_, max(), and HyperLogLogRegisters< p >::size().
Referenced by HyperLogLogRegisters< p >::operator+().
void mergeSparse | ( | ) |
Definition at line 1745 of file hyperloglog.cpp.
References thrill::core::hyperloglog::encodeSparseList().
Referenced by HyperLogLogRegisters< p >::operator+().
HyperLogLogRegisters< p > operator+ | ( | const HyperLogLogRegisters< p > & | regs2 | ) | const |
combine two HyperloglogRegisters, switches between sparse/dense representations
Definition at line 1817 of file hyperloglog.cpp.
References HyperLogLogRegisters< p >::deltaSet_, thrill::core::DENSE, die, HyperLogLogRegisters< p >::format_, HyperLogLogRegisters< p >::mergeDense(), HyperLogLogRegisters< p >::mergeSparse(), HyperLogLogRegisters< p >::shouldConvertToDense(), thrill::core::SPARSE, HyperLogLogRegisters< p >::sparseListBuffer_, and HyperLogLogRegisters< p >::toDense().
double result | ( | ) |
calculate count estimation result adjusted for bias
Definition at line 1771 of file hyperloglog.cpp.
References tlx::digest_detail::H(), and thrill::core::SPARSE.
bool shouldConvertToDense | ( | ) |
Definition at line 1700 of file hyperloglog.cpp.
Referenced by HyperLogLogRegisters< p >::operator+().
bool shouldMerge | ( | ) |
Definition at line 1708 of file hyperloglog.cpp.
|
inline |
Definition at line 39 of file hyperloglog.hpp.
Referenced by Serialization< Archive, core::HyperLogLogRegisters< p > >::Deserialize(), and HyperLogLogRegisters< p >::mergeDense().
void toDense | ( | ) |
Definition at line 1676 of file hyperloglog.cpp.
References thrill::core::DENSE, max(), thrill::core::SPARSE, and gen_data::value.
Referenced by HyperLogLogRegisters< p >::operator+().
|
private |
Definition at line 76 of file hyperloglog.hpp.
Referenced by Serialization< Archive, core::HyperLogLogRegisters< p > >::Deserialize(), HyperLogLogRegisters< p >::operator+(), and Serialization< Archive, core::HyperLogLogRegisters< p > >::Serialize().
|
private |
Definition at line 77 of file hyperloglog.hpp.
Referenced by Serialization< Archive, core::HyperLogLogRegisters< p > >::Deserialize(), HyperLogLogRegisters< p >::mergeDense(), and Serialization< Archive, core::HyperLogLogRegisters< p > >::Serialize().
|
private |
Definition at line 71 of file hyperloglog.hpp.
Referenced by Serialization< Archive, core::HyperLogLogRegisters< p > >::Deserialize(), HyperLogLogRegisters< p >::operator+(), and Serialization< Archive, core::HyperLogLogRegisters< p > >::Serialize().
|
private |
Definition at line 70 of file hyperloglog.hpp.
|
private |
Definition at line 75 of file hyperloglog.hpp.
Referenced by Serialization< Archive, core::HyperLogLogRegisters< p > >::Deserialize(), HyperLogLogRegisters< p >::operator+(), and Serialization< Archive, core::HyperLogLogRegisters< p > >::Serialize().