Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Functions | |
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. More... | |
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. More... | |
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.
Calculates the distance between two buffers using the Levenshtein distance algorithm.
Definition at line 68 of file distance.c.
References a, b, d, free(), i, length, malloc(), RZ_MAX, RZ_MIN, rz_return_val_if_fail, and SIZE_MAX.
Referenced by rz_analysis_diff_bb(), rz_analysis_diff_fcn(), and rz_diff_calculate_distance().
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.
Calculates the distance between two buffers using the Eugene W. Myers' O(ND) diff algorithm.
Definition at line 14 of file distance.c.
References a, b, free(), i, length, regress::m, malloc(), out, RZ_MAX, rz_return_val_if_fail, SIZE_MAX, st64, v, v0, and x.
Referenced by rz_diff_calculate_distance().