HOG2
Public Member Functions | Private Member Functions | Private Attributes | List of all members
MinBloomFilter Class Reference

#include <MinBloom.h>

Collaboration diagram for MinBloomFilter:
Collaboration graph
[legend]

Public Member Functions

 MinBloomFilter (uint64_t numItems, double targetHitRate, bool save, bool zero=true)
 
 MinBloomFilter (uint64_t filterSize, int numHash, bool save, bool zero=true)
 
 MinBloomFilter (uint64_t filterSize, int numHash, const char *loadPrefix)
 
 ~MinBloomFilter ()
 
void Analyze ()
 
void Insert (uint64_t item, int depth)
 
int Contains (uint64_t item)
 
uint64_t GetStorage ()
 
int GetNumHash ()
 
void Load ()
 

Private Member Functions

uint64_t Hash (uint64_t value, int which)
 

Private Attributes

int numHash
 
bool saveAtExit
 
uint64_t filterSize
 
FourBitArraybits
 

Detailed Description

Definition at line 15 of file MinBloom.h.

Constructor & Destructor Documentation

◆ MinBloomFilter() [1/3]

MinBloomFilter::MinBloomFilter ( uint64_t  numItems,
double  targetHitRate,
bool  save,
bool  zero = true 
)

Definition at line 55 of file MinBloom.cpp.

References bits, filterSize, numHash, and saveAtExit.

◆ MinBloomFilter() [2/3]

MinBloomFilter::MinBloomFilter ( uint64_t  filterSize,
int  numHash,
bool  save,
bool  zero = true 
)

Definition at line 32 of file MinBloom.cpp.

References bits, FourBitArray::FillMax(), filterSize, numHash, and saveAtExit.

◆ MinBloomFilter() [3/3]

MinBloomFilter::MinBloomFilter ( uint64_t  filterSize,
int  numHash,
const char *  loadPrefix 
)

Definition at line 41 of file MinBloom.cpp.

References bits, filterSize, numHash, FourBitArray::Read(), and saveAtExit.

◆ ~MinBloomFilter()

MinBloomFilter::~MinBloomFilter ( )

Definition at line 88 of file MinBloom.cpp.

References bits, filterSize, numHash, saveAtExit, and FourBitArray::Write().

Member Function Documentation

◆ Analyze()

void MinBloomFilter::Analyze ( )

Definition at line 101 of file MinBloom.cpp.

References bits, FourBitArray::Get(), and FourBitArray::Size().

◆ Contains()

int MinBloomFilter::Contains ( uint64_t  item)

Definition at line 131 of file MinBloom.cpp.

References bits, filterSize, FourBitArray::Get(), Hash(), max, and numHash.

◆ GetNumHash()

int MinBloomFilter::GetNumHash ( )
inline

Definition at line 25 of file MinBloom.h.

References numHash.

◆ GetStorage()

uint64_t MinBloomFilter::GetStorage ( )
inline

Definition at line 24 of file MinBloom.h.

References filterSize.

◆ Hash()

uint64_t MinBloomFilter::Hash ( uint64_t  value,
int  which 
)
private

Definition at line 144 of file MinBloom.cpp.

References salt, and zobrist.

Referenced by Contains(), and Insert().

◆ Insert()

void MinBloomFilter::Insert ( uint64_t  item,
int  depth 
)

Definition at line 121 of file MinBloom.cpp.

References bits, filterSize, FourBitArray::Get(), Hash(), min(), numHash, and FourBitArray::Set().

◆ Load()

void MinBloomFilter::Load ( )

Definition at line 113 of file MinBloom.cpp.

References bits, filterSize, numHash, FourBitArray::Read(), and saveAtExit.

Member Data Documentation

◆ bits

FourBitArray* MinBloomFilter::bits
private

Definition at line 32 of file MinBloom.h.

Referenced by Analyze(), Contains(), Insert(), Load(), MinBloomFilter(), and ~MinBloomFilter().

◆ filterSize

uint64_t MinBloomFilter::filterSize
private

Definition at line 31 of file MinBloom.h.

Referenced by Contains(), GetStorage(), Insert(), Load(), MinBloomFilter(), and ~MinBloomFilter().

◆ numHash

int MinBloomFilter::numHash
private

Definition at line 29 of file MinBloom.h.

Referenced by Contains(), GetNumHash(), Insert(), Load(), MinBloomFilter(), and ~MinBloomFilter().

◆ saveAtExit

bool MinBloomFilter::saveAtExit
private

Definition at line 30 of file MinBloom.h.

Referenced by Load(), MinBloomFilter(), and ~MinBloomFilter().


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