| 20 | using sparse_type = std::vector<std::pair<unsigned long,double>>; |
| 21 | |
| 22 | unsigned long bucket (const std::string& s, unsigned long num_buckets) |
| 23 | { |
| 24 | return murmur_hash3(s.data(), s.size(), 0) % num_buckets; |
| 25 | } |
| 26 | |
| 27 | // The expected counts, from the n-grams written out by hand. |
| 28 | sparse_type expected (const std::vector<std::string>& ngrams, unsigned long num_buckets) |
no test coverage detected