Loading [MathJax]/jax/output/HTML-CSS/jax.js
hgeometry-0.12.0.2: Geometric Algorithms, Data structures, and Data types.
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellNone
LanguageHaskell2010

Algorithms.Geometry.ClosestPair

Description

O(nlogn) time algorithm to compute the closest pair among a set of n points in R2.

Synopsis

Documentation

closestPair :: (Ord r, Num r) => LSeq 2 (Point 2 r :+ p) -> Two (Point 2 r :+ p) Source #

Classical divide and conquer algorithm to compute the closest pair among n points.

running time: O(nlogn)