Skip to content

Commit 4dc6be8

Browse files
committed
reformat
1 parent f651666 commit 4dc6be8

File tree

4 files changed

+22
-17
lines changed

4 files changed

+22
-17
lines changed

rapidfuzz/distance/JaroWinkler.hpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -200,11 +200,11 @@ struct CachedJaroWinkler : public detail::CachedSimilarityBase<CachedJaroWinkler
200200
};
201201

202202
template <typename Sentence1>
203-
explicit CachedJaroWinkler(const Sentence1& s1_, double _prefix_weight = 0.1)
204-
-> CachedJaroWinkler<char_type<Sentence1>>;
203+
explicit CachedJaroWinkler(const Sentence1& s1_,
204+
double _prefix_weight = 0.1) -> CachedJaroWinkler<char_type<Sentence1>>;
205205

206206
template <typename InputIt1>
207-
CachedJaroWinkler(InputIt1 first1, InputIt1 last1, double _prefix_weight = 0.1)
208-
-> CachedJaroWinkler<iter_value_t<InputIt1>>;
207+
CachedJaroWinkler(InputIt1 first1, InputIt1 last1,
208+
double _prefix_weight = 0.1) -> CachedJaroWinkler<iter_value_t<InputIt1>>;
209209

210210
} // namespace rapidfuzz

rapidfuzz/distance/Jaro_impl.hpp

+12-7
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,8 @@ static inline size_t count_transpositions_block(const BlockPatternMatchVector& P
296296

297297
uint64_t PatternFlagMask = blsi(P_flag);
298298

299-
Transpositions += !(PM.get(PatternWord, T_first[static_cast<ptrdiff_t>(countr_zero(T_flag))]) & PatternFlagMask);
299+
Transpositions += !(PM.get(PatternWord, T_first[static_cast<ptrdiff_t>(countr_zero(T_flag))]) &
300+
PatternFlagMask);
300301

301302
T_flag = blsr(T_flag);
302303
P_flag ^= PatternFlagMask;
@@ -649,7 +650,9 @@ jaro_similarity_simd_long_s2(Range<double*> scores, const detail::BlockPatternMa
649650

650651
for (size_t i = 0; i < vec_width; ++i) {
651652
size_t CommonChars = static_cast<size_t>(counts[i]);
652-
if (!jaro_common_char_filter(static_cast<size_t>(s1_lengths[result_index]), s2.size(), CommonChars, score_cutoff)) {
653+
if (!jaro_common_char_filter(static_cast<size_t>(s1_lengths[result_index]), s2.size(),
654+
CommonChars, score_cutoff))
655+
{
653656
scores[result_index] = 0.0;
654657
result_index++;
655658
continue;
@@ -683,8 +686,8 @@ jaro_similarity_simd_long_s2(Range<double*> scores, const detail::BlockPatternMa
683686
}
684687
}
685688

686-
double Sim =
687-
jaro_calculate_similarity(static_cast<size_t>(s1_lengths[result_index]), s2.size(), CommonChars, Transpositions);
689+
double Sim = jaro_calculate_similarity(static_cast<size_t>(s1_lengths[result_index]), s2.size(),
690+
CommonChars, Transpositions);
688691

689692
scores[result_index] = (Sim >= score_cutoff) ? Sim : 0;
690693
result_index++;
@@ -760,7 +763,9 @@ jaro_similarity_simd_short_s2(Range<double*> scores, const detail::BlockPatternM
760763
T_flag.store(T_flags.data());
761764
for (size_t i = 0; i < vec_width; ++i) {
762765
size_t CommonChars = static_cast<size_t>(counts[i]);
763-
if (!jaro_common_char_filter(static_cast<size_t>(s1_lengths[result_index]), s2.size(), CommonChars, score_cutoff)) {
766+
if (!jaro_common_char_filter(static_cast<size_t>(s1_lengths[result_index]), s2.size(),
767+
CommonChars, score_cutoff))
768+
{
764769
scores[result_index] = 0.0;
765770
result_index++;
766771
continue;
@@ -783,8 +788,8 @@ jaro_similarity_simd_short_s2(Range<double*> scores, const detail::BlockPatternM
783788
P_flag_cur ^= PatternFlagMask;
784789
}
785790

786-
double Sim =
787-
jaro_calculate_similarity(static_cast<size_t>(s1_lengths[result_index]), s2.size(), CommonChars, Transpositions);
791+
double Sim = jaro_calculate_similarity(static_cast<size_t>(s1_lengths[result_index]), s2.size(),
792+
CommonChars, Transpositions);
788793

789794
scores[result_index] = (Sim >= score_cutoff) ? Sim : 0;
790795
result_index++;

rapidfuzz/distance/LCSseq_impl.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@ void lcs_simd(Range<size_t*> scores, const BlockPatternMatchVector& block, const
188188
#endif
189189

190190
template <size_t N, bool RecordMatrix, typename PMV, typename InputIt1, typename InputIt2>
191-
auto lcs_unroll(const PMV& block, const Range<InputIt1>&, const Range<InputIt2>& s2, size_t score_cutoff = 0)
192-
-> LCSseqResult<RecordMatrix>
191+
auto lcs_unroll(const PMV& block, const Range<InputIt1>&, const Range<InputIt2>& s2,
192+
size_t score_cutoff = 0) -> LCSseqResult<RecordMatrix>
193193
{
194194
uint64_t S[N];
195195
unroll<size_t, N>([&](size_t i) { S[i] = ~UINT64_C(0); });

rapidfuzz/distance/Levenshtein.hpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -482,11 +482,11 @@ struct CachedLevenshtein : public detail::CachedDistanceBase<CachedLevenshtein<C
482482
};
483483

484484
template <typename Sentence1>
485-
explicit CachedLevenshtein(const Sentence1& s1_, LevenshteinWeightTable aWeights = {1, 1, 1})
486-
-> CachedLevenshtein<char_type<Sentence1>>;
485+
explicit CachedLevenshtein(const Sentence1& s1_, LevenshteinWeightTable aWeights = {
486+
1, 1, 1}) -> CachedLevenshtein<char_type<Sentence1>>;
487487

488488
template <typename InputIt1>
489-
CachedLevenshtein(InputIt1 first1, InputIt1 last1, LevenshteinWeightTable aWeights = {1, 1, 1})
490-
-> CachedLevenshtein<iter_value_t<InputIt1>>;
489+
CachedLevenshtein(InputIt1 first1, InputIt1 last1,
490+
LevenshteinWeightTable aWeights = {1, 1, 1}) -> CachedLevenshtein<iter_value_t<InputIt1>>;
491491

492492
} // namespace rapidfuzz

0 commit comments

Comments
 (0)