Bitcoin Core 28.99.0
P2P Digital Currency
Public Member Functions | Private Attributes | List of all members
SketchImpl< F > Class Template Referencefinal

#include <sketch_impl.h>

Inheritance diagram for SketchImpl< F >:
[legend]
Collaboration diagram for SketchImpl< F >:
[legend]

Public Member Functions

template<typename... Args>
 SketchImpl (int implementation, int bits, const Args &... args)
 
size_t Syndromes () const override
 
void Init (size_t count) override
 
void Add (uint64_t val) override
 
void Serialize (unsigned char *ptr) const override
 
void Deserialize (const unsigned char *ptr) override
 
int Decode (int max_count, uint64_t *out) const override
 
size_t Merge (const Sketch *other_sketch) override
 
void SetSeed (uint64_t seed) override
 
- Public Member Functions inherited from Sketch
 Sketch (int implementation, int bits)
 
void Ready ()
 
void Check () const
 
void UnReady ()
 
int Implementation () const
 
int Bits () const
 
virtual ~Sketch ()
 
virtual size_t Syndromes () const =0
 
virtual void Init (size_t syndromes)=0
 
virtual void Add (uint64_t element)=0
 
virtual void Serialize (unsigned char *) const =0
 
virtual void Deserialize (const unsigned char *)=0
 
virtual size_t Merge (const Sketch *other_sketch)=0
 
virtual void SetSeed (uint64_t seed)=0
 
virtual int Decode (int max_count, uint64_t *roots) const =0
 

Private Attributes

const F m_field
 
std::vector< typename F::Elem > m_syndromes
 
F::Elem m_basis
 

Detailed Description

template<typename F>
class SketchImpl< F >

Definition at line 355 of file sketch_impl.h.

Constructor & Destructor Documentation

◆ SketchImpl()

template<typename F >
template<typename... Args>
SketchImpl< F >::SketchImpl ( int  implementation,
int  bits,
const Args &...  args 
)
inline

Definition at line 363 of file sketch_impl.h.

Member Function Documentation

◆ Add()

template<typename F >
void SketchImpl< F >::Add ( uint64_t  val)
inlineoverridevirtual

Implements Sketch.

Definition at line 372 of file sketch_impl.h.

Here is the call graph for this function:

◆ Decode()

template<typename F >
int SketchImpl< F >::Decode ( int  max_count,
uint64_t *  out 
) const
inlineoverridevirtual

Implements Sketch.

Definition at line 395 of file sketch_impl.h.

Here is the call graph for this function:

◆ Deserialize()

template<typename F >
void SketchImpl< F >::Deserialize ( const unsigned char *  ptr)
inlineoverridevirtual

Implements Sketch.

Definition at line 387 of file sketch_impl.h.

◆ Init()

template<typename F >
void SketchImpl< F >::Init ( size_t  count)
inlineoverridevirtual

Implements Sketch.

Definition at line 370 of file sketch_impl.h.

◆ Merge()

template<typename F >
size_t SketchImpl< F >::Merge ( const Sketch other_sketch)
inlineoverridevirtual

Implements Sketch.

Definition at line 412 of file sketch_impl.h.

◆ Serialize()

template<typename F >
void SketchImpl< F >::Serialize ( unsigned char *  ptr) const
inlineoverridevirtual

Implements Sketch.

Definition at line 378 of file sketch_impl.h.

Here is the call graph for this function:

◆ SetSeed()

template<typename F >
void SketchImpl< F >::SetSeed ( uint64_t  seed)
inlineoverridevirtual

Implements Sketch.

Definition at line 424 of file sketch_impl.h.

◆ Syndromes()

template<typename F >
size_t SketchImpl< F >::Syndromes ( ) const
inlineoverridevirtual

Implements Sketch.

Definition at line 369 of file sketch_impl.h.

Member Data Documentation

◆ m_basis

template<typename F >
F::Elem SketchImpl< F >::m_basis
private

Definition at line 359 of file sketch_impl.h.

◆ m_field

template<typename F >
const F SketchImpl< F >::m_field
private

Definition at line 357 of file sketch_impl.h.

◆ m_syndromes

template<typename F >
std::vector<typename F::Elem> SketchImpl< F >::m_syndromes
private

Definition at line 358 of file sketch_impl.h.


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