Function ADS::add

Function Documentation

inline std::size_t ADS::add(std::vector<int> &A)

add(): increments the counter of A.size() bits modulo 2^k and returns the number of bits it has changed, i.e., its actual cost

Pre:

the items of A are bits

Post:

at most k bits changed