### 1 unstable release

0.1.0 | Aug 24, 2024 |
---|

#**1832** in Math

**MIT**license

7KB

130 lines

# curve_similarities

Implementation of calculations for curves similarities as in python package similarity_measures.

At the moment has implementations for Frechet and DTW distances, allowing for both Euclidean and Manhattan pointwise distances.

The library requires in input a bidimensional array of the ndarray rust library.

## Examples

`use` `curve_similarities``::``{`frechet`,` DistMetric`}``;`
`use` `ndarray``::`array`;`
`fn` `main``(``)`` ``{`
`let` fr `=` `frechet``(`
`&``array!``[``[``1.``0``]``,` `[``1.``0``]``,` `[``3.``0``]``]``,`
`&``array!``[``[``2.``0``]``,` `[``4.``0``]``]``,`
`DistMetric``::`Euclidean
`)``;`
`println!``(``"`Frechet distance between curves is `{}``"``,` fr`)``;`
`}`

## Dependencies

Currently still using

version `ndarray`

in order to use `0.``15``.``0`

for pointwise distance.`ndarray-stats`

`[``dependencies``]`
`approx ``=` `"`0.3.2`"`
`ndarray ``=` `"`0.15.0`"`
`ndarray-stats ``=` `"`0.5.1`"`
`num ``=` `"`0.4.3`"`

#### Dependencies

~3.5MB

~64K SLoC