Invertible Bloom Lookup Table (Invertible Bloom Filter) More...
#include <iblt.hpp>
Classes | |
| class | Error |
Public Member Functions | |
| IBLT (size_t expectedNumEntries, CompressionScheme scheme=CompressionScheme::ZLIB) | |
| constructor More... | |
| void | appendToName (ndn::Name &name) const |
| Appends self to name. More... | |
| void | erase (uint32_t key) |
| std::vector< uint32_t > | extractValueFromName (const ndn::name::Component &ibltName) const |
| Extracts IBLT from name component. More... | |
| const std::vector< HashTableEntry > & | getHashTable () const |
| void | initialize (const ndn::name::Component &ibltName) |
| Populate the hash table using the vector representation of IBLT. More... | |
| void | insert (uint32_t key) |
| bool | listEntries (std::set< uint32_t > &positive, std::set< uint32_t > &negative) const |
| List all the entries in the IBLT. More... | |
| IBLT | operator- (const IBLT &other) const |
Invertible Bloom Lookup Table (Invertible Bloom Filter)
Used by Partial Sync (PartialProducer) and Full Sync (Full Producer)
|
explicit |
| void psync::IBLT::appendToName | ( | ndn::Name & | name | ) | const |
Appends self to name.
Encodes our hash table from uint32_t vector to uint8_t vector We create a uin8_t vector 12 times the size of uint32_t vector We put the first count in first 4 cells, keySum in next 4, and keyCheck in next 4. Repeat for all the other cells of the hash table. Then we append this uint8_t vector to the name.
| name |
| std::vector< uint32_t > psync::IBLT::extractValueFromName | ( | const ndn::name::Component & | ibltName | ) | const |
|
inline |
| void psync::IBLT::initialize | ( | const ndn::name::Component & | ibltName | ) |
| bool psync::IBLT::listEntries | ( | std::set< uint32_t > & | positive, |
| std::set< uint32_t > & | negative | ||
| ) | const |
List all the entries in the IBLT.
This is called on a difference of two IBLTs: ownIBLT - rcvdIBLT Entries listed in positive are in ownIBLT but not in rcvdIBLT Entries listed in negative are in rcvdIBLT but not in ownIBLT
| positive | |
| negative |