5 releases

0.9.5 Jul 19, 2023
0.9.4 Jul 19, 2023

#22 in #dynamic-programming

Download history 2/week @ 2024-08-31 1/week @ 2024-09-07 8/week @ 2024-09-28 9/week @ 2024-10-05 3/week @ 2024-10-12 22/week @ 2024-10-19 53/week @ 2024-10-26 81/week @ 2024-11-02

161 downloads per month

Custom license

280KB
481 lines

DTW_RS

A Dynamic Time Warping (DTW) library for Rust

Computation methods:

  • Dynamic programming
  • Dynamic programming with the Sakoe-Chuba Band
  • Dynamic programming with the Itakura Parallelogram (future plan)
  • FastDTW (future plan)

Install:

cargo add dtw_rs

Usage:

use dtw_rs::{Algorithm, DynamicTimeWarping};

let a = [1.0, 3.0, 9.0, 2.0, 1.0];
let b = [2.0, 0.0, 0.0, 8.0, 7.0, 2.0];

let dtw = DynamicTimeWarping::between(&a, &b);

println!("Distance: {}, Path: {:?}", dtw.distance(), dtw.path());


lib.rs:

DTW_RS

A Dynamic Time Warping (DTW) library for Rust

Computation methods:

  • Dynamic programming
  • Dynamic programming with the Sakoe-Chuba Band
  • Dynamic programming with the Itakura Parallelogram (future plan)
  • FastDTW (future plan)
use dtw_rs::{Algorithm, DynamicTimeWarping};

let a = [1.0, 3.0, 9.0, 2.0, 1.0];
let b = [2.0, 0.0, 0.0, 8.0, 7.0, 2.0];

let dtw = DynamicTimeWarping::between(&a, &b);

println!("Distance: {}, Path: {:?}", dtw.distance(), dtw.path());

No runtime deps