Skip to content

Commit

Permalink
[FEATURE] More restrictive criteria for similarity by histogram
Browse files Browse the repository at this point in the history
  • Loading branch information
hasherezade committed Sep 6, 2021
1 parent e3eec0f commit bbb628c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion paramkit/strings_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,10 @@ bool paramkit::util::has_similar_histogram(const char s1[], const char s2[])
}
const size_t uniq1 = calc_unique_chars(hist1);
const size_t uniq2 = calc_unique_chars(hist2);
if (sim == uniq1 || sim == uniq2) {
if (sim == uniq1 && sim == uniq2) {
return true;
}
//
return false;
}

Expand Down

0 comments on commit bbb628c

Please sign in to comment.