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.SmallestEnclosingBall.Naive

Description

Naive implementation to compute the smallest enclosing disk of a set of points in R2

Synopsis

Documentation

smallestEnclosingDisk :: (Ord r, Fractional r) => [Point 2 r :+ p] -> DiskResult p r Source #

Horrible O(n4) implementation that simply tries all disks, checks if they enclose all points, and takes the largest one. Basically, this is only useful to check correctness of the other algorithm(s)

enclosesAll :: (Num r, Ord r) => DiskResult p r -> [Point 2 r :+ q] -> Bool Source #

check if a disk encloses all points