module algorithms.edit_distance_c

Short summary

module cpyquickhelper.algorithms.edit_distance_c

Edit distance in C++

source on GitHub

Documentation

Edit distance in C++

cpyquickhelper.algorithms.edit_distance_c.edit_distance(arg0: numpy.ndarray[numpy.int32], arg1: numpy.ndarray[numpy.int32], arg2: float, arg3: numpy.ndarray[numpy.float64], arg4: numpy.ndarray[numpy.int32]) float
Compute the edit distance between two sequences of integers.
param seq1:

first sequence

param seq2:

second sequence

param cmp_cost:

cost of a comparison

param dist:

an allocated array of double, size is at least (len(seq1) + 1) * (len(seq2) + 1)

param pred:

an allocated array of int32_t, size is at least (len(seq1) + 1) * (len(seq2) + 1)

return:

distance

Arrays dist and pred are filled during the execution of the function. “””