A method compares a first data sequence with a second data sequence. A
cross-correlation matrix of distances between all possible pairs of
values of the first and second data sequences is constructed. A minimum
cost path between diagonally opposing corners of the cross-correlation
matrix is determined. The minimum cost path is projected onto a transfer
function that maps between the first data sequence and the second data
sequence. Then, the minimum cost path is projected onto a deformation
function that corresponds to a similarity between the first data sequence
and the second data sequence.