hgeometry-0.12.0.4: Geometric Algorithms, Data structures, and Data types.

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.

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