Skip to content

Commit

Permalink
add simpler overload
Browse files Browse the repository at this point in the history
  • Loading branch information
maxbachmann committed Jul 2, 2024
1 parent f28c9e3 commit d19dad8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions rapidfuzz_reference/Levenshtein.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ Matrix<size_t> levenshtein_matrix(InputIt1 first1, InputIt1 last1, InputIt2 firs
return matrix;
}

template <typename Sentence1, typename Sentence2>
Matrix<size_t> levenshtein_matrix(const Sentence1& s1, const Sentence2& s2,
LevenshteinWeightTable weights = {1, 1, 1})
{
return levenshtein_matrix(std::begin(s1), std::end(s1), std::begin(s2), std::end(s2), weights);
}

template <typename InputIt1, typename InputIt2>
size_t levenshtein_distance(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2,
LevenshteinWeightTable weights = {1, 1, 1},
Expand Down

0 comments on commit d19dad8

Please sign in to comment.