|
VLC 4.0.0-dev
|
Macros | |
| #define | MAX(a, b) ( ((a) > (b)) ? (a) : (b) ) |
| #define | MIN(a, b) ( ((a) < (b)) ? (a) : (b) ) |
Functions | |
| static size_t | split_on_common_prefix (const char *a, const char *b) |
| Checks both strings for a common prefix, returning the number of matching bytes. More... | |
| static int | jaro_inner (const char *a, const char *b, size_t *ret_prefix_cc, float *res) |
| This is the inner Jaro algorithm, with a parameter for passing back the length of the prefix common to both strings, used for efficiency of the Jaro-Winkler implementation. More... | |
| int | vlc_jaro_winkler (const char *a, const char *b, float *res) |
| Calculate a “Jaro Winkler” metric. More... | |
| #define MAX | ( | a, | |
| b | |||
| ) | ( ((a) > (b)) ? (a) : (b) ) |
| #define MIN | ( | a, | |
| b | |||
| ) | ( ((a) < (b)) ? (a) : (b) ) |
|
inlinestatic |
This is the inner Jaro algorithm, with a parameter for passing back the length of the prefix common to both strings, used for efficiency of the Jaro-Winkler implementation.
References MAX, MIN, and split_on_common_prefix().
Referenced by vlc_jaro_winkler().
|
inlinestatic |
Checks both strings for a common prefix, returning the number of matching bytes.
Referenced by jaro_inner().
| int vlc_jaro_winkler | ( | const char * | a, |
| const char * | b, | ||
| float * | res | ||
| ) |
Calculate a “Jaro Winkler” metric.
Algorithm: http://en.wikipedia.org/wiki/Jaro%E2%80%93Winkler_distance
Like “Jaro” but gives a boost to strings that have a common prefix.
| a | string A |
| b | string B |
| res | [OUT] a pointer to a float to receive the result |
References jaro_inner().
Referenced by config_LoadCmdLine().