Bitcoin Core  22.99.0
P2P Digital Currency
Public Member Functions | Private Attributes | List of all members
Sketch Class Referenceabstract

Abstract class for internal representation of a minisketch object. More...

#include <sketch.h>

Inheritance diagram for Sketch:
[legend]

Public Member Functions

 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 (int 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

uint64_t m_canary
 
const int m_implementation
 
const int m_bits
 

Detailed Description

Abstract class for internal representation of a minisketch object.

Definition at line 14 of file sketch.h.

Constructor & Destructor Documentation

◆ Sketch()

Sketch::Sketch ( int  implementation,
int  bits 
)
inline

Definition at line 25 of file sketch.h.

◆ ~Sketch()

virtual Sketch::~Sketch ( )
inlinevirtual

Definition at line 33 of file sketch.h.

Member Function Documentation

◆ Add()

virtual void Sketch::Add ( uint64_t  element)
pure virtual

Implemented in SketchImpl< F >.

Here is the caller graph for this function:

◆ Bits()

int Sketch::Bits ( ) const
inline

Definition at line 31 of file sketch.h.

Here is the caller graph for this function:

◆ Check()

void Sketch::Check ( ) const
inline

Definition at line 28 of file sketch.h.

Here is the caller graph for this function:

◆ Decode()

virtual int Sketch::Decode ( int  max_count,
uint64_t *  roots 
) const
pure virtual

Implemented in SketchImpl< F >.

Here is the caller graph for this function:

◆ Deserialize()

virtual void Sketch::Deserialize ( const unsigned char *  )
pure virtual

Implemented in SketchImpl< F >.

Here is the caller graph for this function:

◆ Implementation()

int Sketch::Implementation ( ) const
inline

Definition at line 30 of file sketch.h.

Here is the caller graph for this function:

◆ Init()

virtual void Sketch::Init ( int  syndromes)
pure virtual

Implemented in SketchImpl< F >.

Here is the caller graph for this function:

◆ Merge()

virtual size_t Sketch::Merge ( const Sketch other_sketch)
pure virtual

Implemented in SketchImpl< F >.

Here is the caller graph for this function:

◆ Ready()

void Sketch::Ready ( )
inline

Definition at line 27 of file sketch.h.

Here is the caller graph for this function:

◆ Serialize()

virtual void Sketch::Serialize ( unsigned char *  ) const
pure virtual

Implemented in SketchImpl< F >.

Here is the caller graph for this function:

◆ SetSeed()

virtual void Sketch::SetSeed ( uint64_t  seed)
pure virtual

Implemented in SketchImpl< F >.

Here is the caller graph for this function:

◆ Syndromes()

virtual size_t Sketch::Syndromes ( ) const
pure virtual

Implemented in SketchImpl< F >.

Here is the caller graph for this function:

◆ UnReady()

void Sketch::UnReady ( )
inline

Definition at line 29 of file sketch.h.

Here is the caller graph for this function:

Member Data Documentation

◆ m_bits

const int Sketch::m_bits
private

Definition at line 22 of file sketch.h.

◆ m_canary

uint64_t Sketch::m_canary
private

Definition at line 20 of file sketch.h.

◆ m_implementation

const int Sketch::m_implementation
private

Definition at line 21 of file sketch.h.


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