hgeometry-0.12.0.1: Geometric Algorithms, Data structures, and Data types.
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellNone
LanguageHaskell2010

Algorithms.Geometry.FrechetDistance.Discrete

Description

 
Synopsis

Documentation

discreteFrechetDistance :: (Foldable f, Foldable g, Functor f, Functor g, Ord r, Num r) => f (Point 2 r :+ p) -> g (Point 2 r :+ q) -> r Source #

Returns the discrete frechet distance between two point sequences using the squared Euclidean distance. In other words, returns the square of the (Euclidean) frechet distance.

running time: \(O((nm))\), where \(n\) and \(m\) are the lengths of the sequences.

discreteFrechetDistanceWith Source #

Arguments

:: (Foldable f, Functor f, Functor g, Foldable g, Ord r) 
=> (Point 2 r -> Point 2 r -> r)

distance function

-> f (Point 2 r :+ p) 
-> g (Point 2 r :+ q) 
-> r 

Returns the discrete frechet distance between two point sequences using the given distance measure.

running time: \(O((nm))\), where \(n\) and \(m\) are the lengths of the sequences (and assuming that a distance calculation takes constant time).