Skip to content

Commit 421c79b

Browse files
authored
add doc tags
1 parent c5a550c commit 421c79b

12 files changed

Lines changed: 74 additions & 8 deletions

File tree

rapidfuzz/details/common.hpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,6 @@ TO opt_static_cast(const FROM& value)
4141
return static_cast<TO>(value);
4242
}
4343

44-
/**
45-
* @defgroup Common Common
46-
* Common utilities shared among multiple functions
47-
* @{
48-
*/
49-
5044
static inline double NormSim_to_NormDist(double score_cutoff, double imprecision = 0.00001)
5145
{
5246
return std::min(1.0, 1.0 - score_cutoff + imprecision);
@@ -93,8 +87,6 @@ static inline void rf_aligned_free(void* ptr)
9387
#endif
9488
}
9589

96-
/**@}*/
97-
9890
} // namespace detail
9991
} // namespace rapidfuzz
10092

rapidfuzz/distance.hpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,12 @@ ReturnType opcodes_apply_impl(const Opcodes& ops, InputIt1 first1, InputIt1 last
102102

103103
} // namespace detail
104104

105+
/**
106+
* @defgroup Distance Distance Algorithms
107+
* @brief tring distance and similarity measurements.
108+
* @{
109+
*/
110+
105111
template <typename CharT, typename InputIt1, typename InputIt2>
106112
std::basic_string<CharT> editops_apply_str(const Editops& ops, InputIt1 first1, InputIt1 last1,
107113
InputIt2 first2, InputIt2 last2)
@@ -158,4 +164,6 @@ std::vector<CharT> opcodes_apply_vec(const Opcodes& ops, const Sentence1& s1, co
158164
detail::to_begin(s2), detail::to_end(s2));
159165
}
160166

167+
/** @} */
168+
161169
} // namespace rapidfuzz

rapidfuzz/distance/DamerauLevenshtein.hpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
#include <rapidfuzz/distance/DamerauLevenshtein_impl.hpp>
66

77
namespace rapidfuzz {
8+
9+
/**
10+
* @addtogroup Distance
11+
* @{
12+
*/
13+
814
/* the API will require a change when adding custom weights */
915
namespace experimental {
1016
/**
@@ -150,4 +156,7 @@ CachedDamerauLevenshtein(InputIt1 first1, InputIt1 last1) -> CachedDamerauLevens
150156
#endif
151157

152158
} // namespace experimental
159+
160+
/** @} */
161+
153162
} // namespace rapidfuzz

rapidfuzz/distance/Hamming.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88

99
namespace rapidfuzz {
1010

11+
/**
12+
* @addtogroup Distance
13+
* @{
14+
*/
15+
1116
/**
1217
* @brief Calculates the Hamming distance between two strings.
1318
*

rapidfuzz/distance/Indel.hpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99

1010
namespace rapidfuzz {
1111

12+
/**
13+
* @addtogroup Distance
14+
* @{
15+
*/
16+
1217
template <typename InputIt1, typename InputIt2>
1318
size_t indel_distance(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2,
1419
size_t score_cutoff = std::numeric_limits<size_t>::max())
@@ -190,4 +195,6 @@ template <typename InputIt1>
190195
CachedIndel(InputIt1 first1, InputIt1 last1) -> CachedIndel<iter_value_t<InputIt1>>;
191196
#endif
192197

198+
/** @} */
199+
193200
} // namespace rapidfuzz

rapidfuzz/distance/Jaro.hpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99

1010
namespace rapidfuzz {
1111

12+
/**
13+
* @addtogroup Distance
14+
* @{
15+
*/
16+
1217
template <typename InputIt1, typename InputIt2>
1318
double jaro_distance(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2,
1419
double score_cutoff = 1.0)
@@ -230,4 +235,6 @@ template <typename InputIt1>
230235
CachedJaro(InputIt1 first1, InputIt1 last1) -> CachedJaro<iter_value_t<InputIt1>>;
231236
#endif
232237

238+
/** @} */
239+
233240
} // namespace rapidfuzz

rapidfuzz/distance/JaroWinkler.hpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88

99
namespace rapidfuzz {
1010

11+
/**
12+
* @addtogroup Distance
13+
* @{
14+
*/
15+
1116
template <typename InputIt1, typename InputIt2,
1217
typename = rapidfuzz::rf_enable_if_t<!std::is_same<InputIt2, double>::value>>
1318
double jaro_winkler_distance(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2,
@@ -208,4 +213,6 @@ CachedJaroWinkler(InputIt1 first1, InputIt1 last1,
208213
double _prefix_weight = 0.1) -> CachedJaroWinkler<iter_value_t<InputIt1>>;
209214
#endif
210215

216+
/** @} */
217+
211218
} // namespace rapidfuzz

rapidfuzz/distance/LCSseq.hpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99

1010
namespace rapidfuzz {
1111

12+
/**
13+
* @addtogroup Distance
14+
* @{
15+
*/
16+
1217
template <typename InputIt1, typename InputIt2>
1318
size_t lcs_seq_distance(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2,
1419
size_t score_cutoff = std::numeric_limits<size_t>::max())
@@ -233,4 +238,6 @@ template <typename InputIt1>
233238
CachedLCSseq(InputIt1 first1, InputIt1 last1) -> CachedLCSseq<iter_value_t<InputIt1>>;
234239
#endif
235240

241+
/** @} */
242+
236243
} // namespace rapidfuzz

rapidfuzz/distance/Levenshtein.hpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88

99
namespace rapidfuzz {
1010

11+
/**
12+
* @addtogroup Distance
13+
* @{
14+
*/
15+
1116
/**
1217
* @brief Calculates the minimum number of insertions, deletions, and substitutions
1318
* required to change one sequence into the other according to Levenshtein with custom
@@ -491,4 +496,6 @@ CachedLevenshtein(InputIt1 first1, InputIt1 last1,
491496
LevenshteinWeightTable aWeights = {1, 1, 1}) -> CachedLevenshtein<iter_value_t<InputIt1>>;
492497
#endif
493498

499+
/** @} */
500+
494501
} // namespace rapidfuzz

rapidfuzz/distance/OSA.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99

1010
namespace rapidfuzz {
1111

12+
/**
13+
* @addtogroup Distance
14+
* @{
15+
*/
16+
1217
/**
1318
* @brief Calculates the optimal string alignment (OSA) distance between two strings.
1419
*
@@ -277,6 +282,7 @@ CachedOSA(const Sentence1& s1_) -> CachedOSA<char_type<Sentence1>>;
277282
template <typename InputIt1>
278283
CachedOSA(InputIt1 first1, InputIt1 last1) -> CachedOSA<iter_value_t<InputIt1>>;
279284
#endif
285+
280286
/**@}*/
281287

282288
} // namespace rapidfuzz

0 commit comments

Comments
 (0)