46 #ifndef PSYNC_DETAIL_IBLT_HPP 47 #define PSYNC_DETAIL_IBLT_HPP 51 #include <ndn-cxx/name.hpp> 73 extern const size_t N_HASH;
84 class Error :
public std::runtime_error
87 using std::runtime_error::runtime_error;
106 initialize(
const ndn::name::Component& ibltName);
109 insert(uint32_t key);
124 listEntries(std::set<uint32_t>& positive, std::set<uint32_t>& negative)
const;
127 operator-(
const IBLT& other)
const;
129 const std::vector<HashTableEntry>&
145 appendToName(ndn::Name& name)
const;
156 std::vector<uint32_t>
157 extractValueFromName(
const ndn::name::Component& ibltName)
const;
161 update(
int plusOrMinus, uint32_t key);
164 std::vector<HashTableEntry> m_hashTable;
165 static const int INSERT = 1;
166 static const int ERASE = -1;
182 #endif // PSYNC_DETAIL_IBLT_HPP std::ostream & operator<<(std::ostream &os, const IBLT &iblt)
Invertible Bloom Lookup Table (Invertible Bloom Filter)
bool operator!=(const IBLT &iblt1, const IBLT &iblt2)
bool operator==(const IBLT &iblt1, const IBLT &iblt2)
const std::vector< HashTableEntry > & getHashTable() const