Skip to content

Latest commit

 

History

History
28 lines (17 loc) · 863 Bytes

README.md

File metadata and controls

28 lines (17 loc) · 863 Bytes

libdtw

libdtw is a fast, dynamic time warping library based on the UCR Suite.

Building

cd src && make

This will produce libdtw.a. You will need to link against this library.

Usage

The only interface is the ucr_query() function. The function accepts 6 arguments:

int ucr_query(double *q, int m, double r, double *buffer, int buflen, struct ucr_index *result);

q is the pattern to be matched. m is the number of elements in q. r is the size of the warping window. buffer is the data. buflen is the length of the data array. result is the output.

result->index is the index of the first element in the best matching sequence in the data. result->value is the DTW distance between the query and the matching sequence in the data.

ucr_query() returns 0 on success and -1 on failure.