psync::detail::BloomFilter Class Reference

#include <PSync/detail/bloom-filter.hpp>

Classes

class  Error
 

Public Member Functions

 BloomFilter ()=default
 
 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 ndn::Name &key) const
 
void insert (const ndn::Name &key)
 

Friends

bool operator!= (const BloomFilter &lhs, const BloomFilter &rhs)
 
std::ostream & operator<< (std::ostream &os, const BloomFilter &bf)
 
bool operator== (const BloomFilter &lhs, const BloomFilter &rhs)
 

Detailed Description

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

Constructor & Destructor Documentation

◆ BloomFilter() [1/3]

psync::detail::BloomFilter::BloomFilter ( )
default

◆ BloomFilter() [2/3]

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

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

◆ BloomFilter() [3/3]

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

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

Member Function Documentation

◆ appendToName()

void psync::detail::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 237 of file bloom-filter.cpp.

◆ clear()

void psync::detail::BloomFilter::clear ( )

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

◆ contains()

bool psync::detail::BloomFilter::contains ( const ndn::Name &  key) const

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

◆ insert()

void psync::detail::BloomFilter::insert ( const ndn::Name &  key)

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

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( const BloomFilter lhs,
const BloomFilter rhs 
)
friend

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

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const BloomFilter bf 
)
friend

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

◆ operator==

bool operator== ( const BloomFilter lhs,
const BloomFilter rhs 
)
friend

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