Copyright | (C) Frank Staals |
---|---|
License | see the LICENSE file |
Maintainer | Frank Staals |
Safe Haskell | None |
Language | Haskell2010 |
Types to represent the smallest enclosing disk of a set of points in \(\mathbb{R}^2\)
Synopsis
- data DiskResult p r = DiskResult {
- _enclosingDisk :: Disk () r
- _definingPoints :: TwoOrThree (Point 2 r :+ p)
- enclosingDisk :: forall p r. Lens' (DiskResult p r) (Disk () r)
- definingPoints :: forall p r p. Lens (DiskResult p r) (DiskResult p r) (TwoOrThree ((:+) (Point 2 r) p)) (TwoOrThree ((:+) (Point 2 r) p))
- data TwoOrThree a
- twoOrThreeFromList :: [a] -> Either String (TwoOrThree a)
Documentation
data DiskResult p r Source #
The result of a smallest enclosing disk computation: The smallest ball and the points defining it
DiskResult | |
|
Instances
(Eq r, Eq p) => Eq (DiskResult p r) Source # | |
Defined in Algorithms.Geometry.SmallestEnclosingBall.Types (==) :: DiskResult p r -> DiskResult p r -> Bool # (/=) :: DiskResult p r -> DiskResult p r -> Bool # | |
(Show r, Show p) => Show (DiskResult p r) Source # | |
Defined in Algorithms.Geometry.SmallestEnclosingBall.Types showsPrec :: Int -> DiskResult p r -> ShowS # show :: DiskResult p r -> String # showList :: [DiskResult p r] -> ShowS # |
enclosingDisk :: forall p r. Lens' (DiskResult p r) (Disk () r) Source #
definingPoints :: forall p r p. Lens (DiskResult p r) (DiskResult p r) (TwoOrThree ((:+) (Point 2 r) p)) (TwoOrThree ((:+) (Point 2 r) p)) Source #
data TwoOrThree a Source #
List of two or three elements
Instances
twoOrThreeFromList :: [a] -> Either String (TwoOrThree a) Source #
Construct datatype from list with exactly two or three elements.