psync::BloomFilter Class Reference

#include <bloom-filter.hpp>

Classes

class  Error
 

Public Member Functions

 BloomFilter ()
 
 BloomFilter (const BloomParameters &p)
 
 BloomFilter (unsigned int projected_element_count, double false_positive_probability)
 
 BloomFilter (unsigned int projected_element_count, double false_positive_probability, const ndn::name::Component &bfName)
 
void appendToName (ndn::Name &name) const
 Append our bloom filter to the given name. More...
 
void clear ()
 
bool contains (const std::string &key) const
 
BloomParameters getParameters (unsigned int projected_element_count, double false_positive_probability)
 
void insert (const std::string &key)
 
std::vector< cell_typetable () const
 

Protected Types

typedef uint32_t bloom_type
 
typedef uint8_t cell_type
 
typedef std::vector< cell_type >::iterator Iterator
 

Detailed Description

Definition at line 100 of file bloom-filter.hpp.

Member Typedef Documentation

typedef uint32_t psync::BloomFilter::bloom_type
protected

Definition at line 103 of file bloom-filter.hpp.

typedef uint8_t psync::BloomFilter::cell_type
protected

Definition at line 104 of file bloom-filter.hpp.

typedef std::vector<cell_type>::iterator psync::BloomFilter::Iterator
protected

Definition at line 105 of file bloom-filter.hpp.

Constructor & Destructor Documentation

psync::BloomFilter::BloomFilter ( )

Definition at line 130 of file bloom-filter.cpp.

psync::BloomFilter::BloomFilter ( const BloomParameters p)
explicit

Definition at line 141 of file bloom-filter.cpp.

psync::BloomFilter::BloomFilter ( unsigned int  projected_element_count,
double  false_positive_probability 
)

Definition at line 156 of file bloom-filter.cpp.

psync::BloomFilter::BloomFilter ( unsigned int  projected_element_count,
double  false_positive_probability,
const ndn::name::Component &  bfName 
)

Definition at line 162 of file bloom-filter.cpp.

Member Function Documentation

void psync::BloomFilter::appendToName ( ndn::Name &  name) const

Append our bloom filter to the given name.

Append the count and false positive probability along with the bloom filter so that producer (PartialProducer) can construct a copy.

Parameters
nameappend bloom filter to this name

Definition at line 192 of file bloom-filter.cpp.

void psync::BloomFilter::clear ( )

Definition at line 200 of file bloom-filter.cpp.

bool psync::BloomFilter::contains ( const std::string &  key) const

Definition at line 220 of file bloom-filter.cpp.

BloomParameters psync::BloomFilter::getParameters ( unsigned int  projected_element_count,
double  false_positive_probability 
)

Definition at line 176 of file bloom-filter.cpp.

void psync::BloomFilter::insert ( const std::string &  key)

Definition at line 207 of file bloom-filter.cpp.

std::vector< BloomFilter::cell_type > psync::BloomFilter::table ( ) const

Definition at line 237 of file bloom-filter.cpp.