static auto make_fp_generator(const filter_t &filter) { const size_t fp_bits = filter.quotient_bits() + filter.remainder_bits(); const value_t max_fp = (value_t{1} << fp_bits) - 1; mt19937 gen(823076453); uniform_int_distribution<value_t> dist(0, max_fp); return [ gen = std::move(gen), dist ]() mutable { return dist(gen); }; }
// Checks whether lhs and rhs are clones. static bool totally_equal(const filter_t &lhs, const filter_t &rhs) noexcept { return lhs.size() == rhs.size() && lhs.capacity() == rhs.capacity() && lhs.quotient_bits() == rhs.quotient_bits() && lhs.remainder_bits() == rhs.remainder_bits() && equal(lhs, rhs); }