| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Algorithms.Geometry.FrechetDistance.Discrete
Synopsis
- discreteFrechetDistance :: (Foldable f, Foldable g, Functor f, Functor g, Ord r, Num r) => f (Point 2 r :+ p) -> g (Point 2 r :+ q) -> r
- discreteFrechetDistanceWith :: (Foldable f, Functor f, Functor g, Foldable g, Ord r) => (Point 2 r -> Point 2 r -> r) -> f (Point 2 r :+ p) -> g (Point 2 r :+ q) -> r
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).