#dynamic-programming #dynamic #time #dtw #warping

dtw_rs_band_fork

Fork of Dynamic Time Warping Library for Rust

7 releases (2 stable)

1.0.1 Apr 26, 2024
0.9.9 Apr 26, 2024

#15 in #dynamic-programming

Custom license

280KB
677 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_band_fork::{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