Create a vector with Minisketch objects, one for each implementation. */
| 29 | |
| 30 | /** Create a vector with Minisketch objects, one for each implementation. */ |
| 31 | std::vector<Minisketch> CreateSketches(uint32_t bits, size_t capacity) { |
| 32 | if (!Minisketch::BitsSupported(bits)) return {}; |
| 33 | std::vector<Minisketch> ret; |
| 34 | for (uint32_t impl = 0; impl <= Minisketch::MaxImplementation(); ++impl) { |
| 35 | if (Minisketch::ImplementationSupported(bits, impl)) { |
| 36 | CHECK(Minisketch::BitsSupported(bits)); |
| 37 | ret.push_back(Minisketch(bits, impl, capacity)); |
| 38 | CHECK((bool)ret.back()); |
| 39 | } else { |
| 40 | // implementation 0 must always work unless field size is disabled |
| 41 | CHECK(impl != 0 || !Minisketch::BitsSupported(bits)); |
| 42 | } |
| 43 | } |
| 44 | return ret; |
| 45 | } |
| 46 | |
| 47 | /** Test properties by exhaustively decoding all 2**(bits*capacity) sketches |
| 48 | * with specified capacity and bits. */ |
no test coverage detected