Sorensen–Dice coefficient: Difference between revisions
m
C++ - changed function name
m (C++ - minor performance improvement) |
m (C++ - changed function name) |
||
Line 59:
using bigram = std::pair<char, char>;
std::multiset<bigram>
std::multiset<bigram> result;
std::istringstream is(phrase);
Line 80:
double sorensen(const std::string& s1, const std::string& s2) {
auto a =
auto b =
std::multiset<bigram> c;
std::set_intersection(a.begin(), a.end(), b.begin(), b.end(),
|