0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Private Attributes | List of all members
Hypertable::BasicBloomFilterWithChecksum< HasherT > Class Template Reference

A space-efficent probabilistic set for membership test, false postives are possible, but false negatives are not. More...

#include <BloomFilterWithChecksum.h>

Public Member Functions

 BasicBloomFilterWithChecksum (size_t items_estimate, float false_positive_prob)
 Constructor. More...
 
 BasicBloomFilterWithChecksum (size_t items_estimate, float bits_per_item, size_t num_hashes)
 Alternative constructor. More...
 
 BasicBloomFilterWithChecksum (size_t items_estimate, size_t items_actual, int64_t length, size_t num_hashes)
 Alternative constructor. More...
 
 ~BasicBloomFilterWithChecksum ()
 Destructor; releases resources. More...
 
void insert (const void *key, size_t len)
 Inserts a new blob into the hash. More...
 
void insert (const String &key)
 Overloaded insert function for Strings. More...
 
bool may_contain (const void *key, size_t len) const
 Checks if the data set "may" contain the key. More...
 
bool may_contain (const String &key) const
 Overloaded may_contain function for Strings. More...
 
void serialize (StaticBuffer &buf)
 Serializes the BloomFilter into a static memory buffer. More...
 
uint8_t * base ()
 Getter for the serialized bloom filter data, including metadata and checksums. More...
 
void validate (String &filename)
 Validates the checksum of the BloomFilter. More...
 
size_t size ()
 Getter for the bloom filter size. More...
 
size_t total_size ()
 Getter for the total size (including checksum and metadata) More...
 
size_t get_num_hashes ()
 Getter for the number of hash functions. More...
 
size_t get_length_bits ()
 Getter for the number of bits. More...
 
size_t get_items_estimate ()
 Getter for the estimated number of items. More...
 
size_t get_items_actual ()
 Getter for the actual number of items. More...
 

Private Attributes

HasherT m_hasher
 The hash function implementation. More...
 
size_t m_items_estimate
 Estimated number of items. More...
 
size_t m_items_actual
 Actual number of items. More...
 
float m_false_positive_prob
 Probability of returning a false positive. More...
 
size_t m_num_hash_functions
 Number of hash functions. More...
 
size_t m_num_bits
 Number of bits. More...
 
size_t m_num_bytes
 Number of bytes (approx. More...
 
uint8_t * m_bloom_bits
 The actual bloom filter bit-array. More...
 
uint8_t * m_bloom_base
 The serialized bloom filter data, including metadata and checksums. More...
 

Detailed Description

template<class HasherT = MurmurHash2>
class Hypertable::BasicBloomFilterWithChecksum< HasherT >

A space-efficent probabilistic set for membership test, false postives are possible, but false negatives are not.

Definition at line 54 of file BloomFilterWithChecksum.h.


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