hgeometry-kernel
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellNone
LanguageGHC2024

HGeometry.Ball.BoundaryPoints

Description

A ball in \(d\) dimensional space represented by \(d+1\) points on the boundary.

Synopsis

Documentation

type BallByPoints point = BallByPoints' (1 + Dimension point) point Source #

A ball specified by d+1 points which form a CCW simplex.

newtype BallByPoints' (k :: Nat) point Source #

A ball specified by k points which form a CCW simplex.

This is just a helper type to implement the BallByPoints type.

Constructors

BoundaryPoints (Vector k point) 

Instances

Instances details
Foldable1 (Vector k) => Foldable1 (BallByPoints' k) Source # 
Instance details

Defined in HGeometry.Ball.BoundaryPoints

Methods

fold1 :: Semigroup m => BallByPoints' k m -> m Source #

foldMap1 :: Semigroup m => (a -> m) -> BallByPoints' k a -> m Source #

foldMap1' :: Semigroup m => (a -> m) -> BallByPoints' k a -> m Source #

toNonEmpty :: BallByPoints' k a -> NonEmpty a Source #

maximum :: Ord a => BallByPoints' k a -> a Source #

minimum :: Ord a => BallByPoints' k a -> a Source #

head :: BallByPoints' k a -> a Source #

last :: BallByPoints' k a -> a Source #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> BallByPoints' k a -> b Source #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> BallByPoints' k a -> b Source #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> BallByPoints' k a -> b Source #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> BallByPoints' k a -> b Source #

Functor (Vector k) => Functor (BallByPoints' k) Source # 
Instance details

Defined in HGeometry.Ball.BoundaryPoints

Methods

fmap :: (a -> b) -> BallByPoints' k a -> BallByPoints' k b Source #

(<$) :: a -> BallByPoints' k b -> BallByPoints' k a Source #

Foldable (Vector k) => Foldable (BallByPoints' k) Source # 
Instance details

Defined in HGeometry.Ball.BoundaryPoints

Methods

fold :: Monoid m => BallByPoints' k m -> m Source #

foldMap :: Monoid m => (a -> m) -> BallByPoints' k a -> m Source #

foldMap' :: Monoid m => (a -> m) -> BallByPoints' k a -> m Source #

foldr :: (a -> b -> b) -> b -> BallByPoints' k a -> b Source #

foldr' :: (a -> b -> b) -> b -> BallByPoints' k a -> b Source #

foldl :: (b -> a -> b) -> b -> BallByPoints' k a -> b Source #

foldl' :: (b -> a -> b) -> b -> BallByPoints' k a -> b Source #

foldr1 :: (a -> a -> a) -> BallByPoints' k a -> a Source #

foldl1 :: (a -> a -> a) -> BallByPoints' k a -> a Source #

toList :: BallByPoints' k a -> [a] Source #

null :: BallByPoints' k a -> Bool Source #

length :: BallByPoints' k a -> Int Source #

elem :: Eq a => a -> BallByPoints' k a -> Bool Source #

maximum :: Ord a => BallByPoints' k a -> a Source #

minimum :: Ord a => BallByPoints' k a -> a Source #

sum :: Num a => BallByPoints' k a -> a Source #

product :: Num a => BallByPoints' k a -> a Source #

Traversable (Vector k) => Traversable (BallByPoints' k) Source # 
Instance details

Defined in HGeometry.Ball.BoundaryPoints

Methods

traverse :: Applicative f => (a -> f b) -> BallByPoints' k a -> f (BallByPoints' k b) Source #

sequenceA :: Applicative f => BallByPoints' k (f a) -> f (BallByPoints' k a) Source #

mapM :: Monad m => (a -> m b) -> BallByPoints' k a -> m (BallByPoints' k b) Source #

sequence :: Monad m => BallByPoints' k (m a) -> m (BallByPoints' k a) Source #

Traversable1 (Vector k) => Traversable1 (BallByPoints' k) Source # 
Instance details

Defined in HGeometry.Ball.BoundaryPoints

Methods

traverse1 :: Apply f => (a -> f b) -> BallByPoints' k a -> f (BallByPoints' k b) Source #

sequence1 :: Apply f => BallByPoints' k (f b) -> f (BallByPoints' k b) Source #

Show (Vector k point) => Show (BallByPoints' k point) Source # 
Instance details

Defined in HGeometry.Ball.BoundaryPoints

Methods

showsPrec :: Int -> BallByPoints' k point -> ShowS Source #

show :: BallByPoints' k point -> String Source #

showList :: [BallByPoints' k point] -> ShowS Source #

Eq (Vector k point) => Eq (BallByPoints' k point) Source # 
Instance details

Defined in HGeometry.Ball.BoundaryPoints

Methods

(==) :: BallByPoints' k point -> BallByPoints' k point -> Bool Source #

(/=) :: BallByPoints' k point -> BallByPoints' k point -> Bool Source #

Ord (Vector k point) => Ord (BallByPoints' k point) Source # 
Instance details

Defined in HGeometry.Ball.BoundaryPoints

Methods

compare :: BallByPoints' k point -> BallByPoints' k point -> Ordering Source #

(<) :: BallByPoints' k point -> BallByPoints' k point -> Bool Source #

(<=) :: BallByPoints' k point -> BallByPoints' k point -> Bool Source #

(>) :: BallByPoints' k point -> BallByPoints' k point -> Bool Source #

(>=) :: BallByPoints' k point -> BallByPoints' k point -> Bool Source #

max :: BallByPoints' k point -> BallByPoints' k point -> BallByPoints' k point Source #

min :: BallByPoints' k point -> BallByPoints' k point -> BallByPoints' k point Source #

Point_ point 2 r => HasInBall (BallByPoints' 3 point) Source # 
Instance details

Defined in HGeometry.Ball.BoundaryPoints

Methods

inBall :: forall point0 (d :: Nat) r0. (Point_ point0 d r0, Ord r0, Num r0, NumType (BallByPoints' 3 point) ~ r0, Dimension (BallByPoints' 3 point) ~ d) => point0 -> BallByPoints' 3 point -> PointLocationResult Source #

(Point_ point d r, Fractional r, 0 <= (k - 1), Has_ Vector_ k point, Has_ Metric_ d r, HasCenter (BallByPoints' k point) (Point d r)) => Ball_ (BallByPoints' k point) (Point d r) Source # 
Instance details

Defined in HGeometry.Ball.BoundaryPoints

(Point_ point 2 r, Fractional r) => HasCenter (BallByPoints' 3 point) (Point 2 r) Source # 
Instance details

Defined in HGeometry.Ball.BoundaryPoints

Methods

center :: Lens' (BallByPoints' 3 point) (Point 2 r) Source #

(Point_ point d r, Ord r, Num r, HasInBall (BallByPoints' k point)) => HasIntersectionWith (Point d r) (BallByPoints' k point) Source # 
Instance details

Defined in HGeometry.Ball.BoundaryPoints

Methods

intersects :: Point d r -> BallByPoints' k point -> Bool Source #

(Point_ point d r, Ord r, Num r, HasInBall (BallByPoints' k point)) => IsIntersectableWith (Point d r) (BallByPoints' k point) Source # 
Instance details

Defined in HGeometry.Ball.BoundaryPoints

Methods

intersect :: Point d r -> BallByPoints' k point -> Intersection (Point d r) (BallByPoints' k point) Source #

type Dimension (BallByPoints' k point) Source # 
Instance details

Defined in HGeometry.Ball.BoundaryPoints

type Dimension (BallByPoints' k point) = Dimension point
type NumType (BallByPoints' k point) Source # 
Instance details

Defined in HGeometry.Ball.BoundaryPoints

type NumType (BallByPoints' k point) = NumType point
type Intersection (Point d r) (BallByPoints' k point) Source # 
Instance details

Defined in HGeometry.Ball.BoundaryPoints

type Intersection (Point d r) (BallByPoints' k point) = Maybe (Point d r)

diskFromPoints :: (Point_ point 2 r, Ord r, Num r) => point -> point -> point -> Maybe (BallByPoints point) Source #

smart constructor that makes sure the points are given in the right orientation may fail if the points are colinear