https://github.com/carocad/frechet
Discrete Fréchet distance and of the minimum path required for traversing with it
https://github.com/carocad/frechet
calculations clojure curve frechet-distance
Last synced: 7 months ago
JSON representation
Discrete Fréchet distance and of the minimum path required for traversing with it
- Host: GitHub
- URL: https://github.com/carocad/frechet
- Owner: carocad
- License: lgpl-3.0
- Created: 2015-12-04T11:14:26.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2021-09-03T22:15:08.000Z (about 4 years ago)
- Last Synced: 2024-12-16T16:15:34.757Z (10 months ago)
- Topics: calculations, clojure, curve, frechet-distance
- Language: Clojure
- Homepage:
- Size: 102 KB
- Stars: 15
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# frechet
[](https://travis-ci.org/carocad/frechet)
[](https://clojars.org/net.clojars.carocad/frechet)
[](https://cljdoc.org/d/net.clojars.carocad/frechet/)A Clojure(script) library to calculate the discrete [Fréchet distance](https://en.wikipedia.org/wiki/Fr%C3%A9chet_distance)
of two polygonal curves as stated by [Eiter and Mannilla](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.90.937&rep=rep1&type=pdf).
The curves may be N-dimensional and need not be the same length.## Usage
Simply create 2D vectors with the points that describe the curves.
In order to compute the frechet distance you need to provide a metric function
to compute the distance between any point on the curves. The `euclidean` function
is also part of the library for convenience.```Clojure
(ns example.core
(:require [carocad.frechet :as frechet]))(frechet/distance [[1 2] [3 4]]
[[5 6] [7 8] [9 0]]
frechet/euclidean)
;; #:carocad.frechet{:distance 7.211102550927978, :coupling ([0 0] [1 1] [1 2])}
```For more information please check the documentation in
[CljDoc](https://cljdoc.org/badge/net.clojars.carocad/frechet).## License
Copyright © 2015 Camilo Roca
Distributed under the LGPL v3.