Skip to content

Discrete Fréchet distance and of the minimum path required for traversing with it

License

Notifications You must be signed in to change notification settings

carocad/frechet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

frechet

Build Status Clojars Project CljDoc

A Clojure(script) library to calculate the discrete Fréchet distance of two polygonal curves as stated by Eiter and Mannilla. 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.

(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.

License

Copyright © 2015 Camilo Roca

Distributed under the LGPL v3.