18 const ut8 *ea =
a + la, *eb =
b + lb;
20 for (;
a < ea &&
b < eb && *
a == *
b;
a++,
b++) {
22 for (;
a < ea &&
b < eb && ea[-1] == eb[-1]; ea--, eb--) {
33 for (di = 0; di <=
m; di++) {
36 for (
i = low;
i <= high;
i += 2) {
37 x =
i == -di || (
i != di &&
v[
i - 1] <
v[
i + 1]) ?
v[
i + 1] :
v[
i - 1] + 1;
39 while (
x < la && y < lb &&
a[
x] ==
b[y]) {
44 if (
x == la && y == lb) {
72 const ut8 *ea =
a + la, *eb =
b + lb, *t;
75 for (;
a < ea &&
b < eb && *
a == *
b;
a++,
b++) {
77 for (;
a < ea &&
b < eb && ea[-1] == eb[-1]; ea--, eb--) {
93 for (
i = 0;
i <= lb;
i++) {
96 for (
i = 0;
i < la;
i++) {
99 for (j = 0; j < lb; j++) {
const lzma_allocator const uint8_t size_t uint8_t * out
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len static semflg const void static shmflg const struct timespec struct timespec static rem const char static group const void length
RZ_API bool rz_diff_myers_distance(RZ_NONNULL const ut8 *a, ut32 la, RZ_NONNULL const ut8 *b, ut32 lb, RZ_NULLABLE ut32 *distance, RZ_NULLABLE double *similarity)
Calculates the distance between two buffers using the Myers algorithm.
RZ_API bool rz_diff_levenstein_distance(RZ_NONNULL const ut8 *a, ut32 la, RZ_NONNULL const ut8 *b, ut32 lb, RZ_NULLABLE ut32 *distance, RZ_NULLABLE double *similarity)
Calculates the distance between two buffers using the Levenshtein algorithm.
RZ_API void Ht_() free(HtName_(Ht) *ht)
void * malloc(size_t size)
#define rz_return_val_if_fail(expr, val)