| Copyright | (C) Frank Staals |
|---|---|
| License | see the LICENSE file |
| Maintainer | Frank Staals |
| Safe Haskell | None |
| Language | GHC2024 |
HGeometry.HalfSpace
Description
Representing halfspaces
Synopsis
- module HGeometry.HalfSpace.Class
- boundingHyperPlaneLens :: forall boundingHyperPlane boundingHyperPlane' f. Functor f => (boundingHyperPlane -> f boundingHyperPlane') -> HalfSpaceF boundingHyperPlane -> f (HalfSpaceF boundingHyperPlane')
- data Sign
- type family BoundingHyperPlane halfSpace (d :: Nat) r
- type HalfPlane_ halfPlane r = HalfSpace_ halfPlane 2 r
- class (Dimension halfSpace ~ d, Dimension (BoundingHyperPlane halfSpace d r) ~ d, NumType halfSpace ~ r, NumType (BoundingHyperPlane halfSpace d r) ~ r) => HalfSpace_ halfSpace (d :: Nat) r | halfSpace -> d, halfSpace -> r where
- type BoundingHyperPlane halfSpace (d :: Nat) r
- boundingHyperPlane :: Lens' halfSpace (BoundingHyperPlane halfSpace d r)
- halfSpaceSign :: Lens' halfSpace Sign
- type HalfPlaneF line = HalfSpaceF line
- type HalfSpace (d :: Natural) r = HalfSpaceF (HyperPlane d r)
- data HalfSpaceF boundingHyperPlane = HalfSpace !Sign boundingHyperPlane
- data Point_x_HalfSpace_Intersection boundaryPoint interiorPoint
- = Point_x_HalfSpace_OnBoundary boundaryPoint
- | Point_x_HalfSpace_Interior interiorPoint
Documentation
module HGeometry.HalfSpace.Class
boundingHyperPlaneLens :: forall boundingHyperPlane boundingHyperPlane' f. Functor f => (boundingHyperPlane -> f boundingHyperPlane') -> HalfSpaceF boundingHyperPlane -> f (HalfSpaceF boundingHyperPlane') Source #
Lens to access the hyperplane bounding the halfspace
Generally, one can just use boundingHyperPlane from the HalfSpace_ class. But this one is useful if you need a lens to change the type of the bounding hyperplane.
The sign of an expression
Instances
| Bounded Sign Source # | |
| Enum Sign Source # | |
| Show Sign Source # | |
| Eq Sign Source # | |
| Ord Sign Source # | |
type family BoundingHyperPlane halfSpace (d :: Nat) r Source #
Instances
| type BoundingHyperPlane (HalfSpaceF boundingHyperPlane) d r Source # | |
Defined in HGeometry.HalfSpace.Type | |
| type BoundingHyperPlane (core :+ extra) d r Source # | |
Defined in HGeometry.HalfSpace.Class | |
type HalfPlane_ halfPlane r = HalfSpace_ halfPlane 2 r Source #
Type synonym for halfplanes in R^2
class (Dimension halfSpace ~ d, Dimension (BoundingHyperPlane halfSpace d r) ~ d, NumType halfSpace ~ r, NumType (BoundingHyperPlane halfSpace d r) ~ r) => HalfSpace_ halfSpace (d :: Nat) r | halfSpace -> d, halfSpace -> r where Source #
Types modelling halfspaces.
Associated Types
type BoundingHyperPlane halfSpace (d :: Nat) r Source #
Methods
boundingHyperPlane :: Lens' halfSpace (BoundingHyperPlane halfSpace d r) Source #
Access the bounding hyperplane
halfSpaceSign :: Lens' halfSpace Sign Source #
Lens to access the sign of the halfspace.
Instances
| (NumType boundingHyperPlane ~ r, Dimension boundingHyperPlane ~ d) => HalfSpace_ (HalfSpaceF boundingHyperPlane) d r Source # | |||||
Defined in HGeometry.HalfSpace.Type Associated Types
Methods boundingHyperPlane :: Lens' (HalfSpaceF boundingHyperPlane) (BoundingHyperPlane (HalfSpaceF boundingHyperPlane) d r) Source # halfSpaceSign :: Lens' (HalfSpaceF boundingHyperPlane) Sign Source # | |||||
| HalfSpace_ core d r => HalfSpace_ (core :+ extra) d r Source # | |||||
Defined in HGeometry.HalfSpace.Class Associated Types
Methods boundingHyperPlane :: Lens' (core :+ extra) (BoundingHyperPlane (core :+ extra) d r) Source # | |||||
type HalfPlaneF line = HalfSpaceF line Source #
A Halfplane (which is just a Halfspace in R^2)
type HalfSpace (d :: Natural) r = HalfSpaceF (HyperPlane d r) Source #
Arbitrary halfspaces in r^d.
data HalfSpaceF boundingHyperPlane Source #
A HalfSpace bounded by a hyperplane. The sign indicates which side of the bounding hyperplane is indicated. Iff the sign is positive, we mean the points for which onSideTest returns a positive value.
Half spaces include their bounding hyperplane.
Instances
data Point_x_HalfSpace_Intersection boundaryPoint interiorPoint Source #
Point x HalfSpace intersection
Constructors
| Point_x_HalfSpace_OnBoundary boundaryPoint | |
| Point_x_HalfSpace_Interior interiorPoint |
Instances
| Bifoldable Point_x_HalfSpace_Intersection Source # | |
Defined in HGeometry.HalfSpace.Type Methods bifold :: Monoid m => Point_x_HalfSpace_Intersection m m -> m Source # bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Point_x_HalfSpace_Intersection a b -> m Source # bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Point_x_HalfSpace_Intersection a b -> c Source # bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Point_x_HalfSpace_Intersection a b -> c Source # | |
| Bifoldable1 Point_x_HalfSpace_Intersection Source # | |
Defined in HGeometry.HalfSpace.Type Methods bifold1 :: Semigroup m => Point_x_HalfSpace_Intersection m m -> m Source # bifoldMap1 :: Semigroup m => (a -> m) -> (b -> m) -> Point_x_HalfSpace_Intersection a b -> m Source # | |
| Bifunctor Point_x_HalfSpace_Intersection Source # | |
Defined in HGeometry.HalfSpace.Type Methods bimap :: (a -> b) -> (c -> d) -> Point_x_HalfSpace_Intersection a c -> Point_x_HalfSpace_Intersection b d Source # first :: (a -> b) -> Point_x_HalfSpace_Intersection a c -> Point_x_HalfSpace_Intersection b c Source # second :: (b -> c) -> Point_x_HalfSpace_Intersection a b -> Point_x_HalfSpace_Intersection a c Source # | |
| Bitraversable Point_x_HalfSpace_Intersection Source # | |
Defined in HGeometry.HalfSpace.Type Methods bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Point_x_HalfSpace_Intersection a b -> f (Point_x_HalfSpace_Intersection c d) Source # | |
| Bitraversable1 Point_x_HalfSpace_Intersection Source # | |
Defined in HGeometry.HalfSpace.Type Methods bitraverse1 :: Apply f => (a -> f b) -> (c -> f d) -> Point_x_HalfSpace_Intersection a c -> f (Point_x_HalfSpace_Intersection b d) Source # bisequence1 :: Apply f => Point_x_HalfSpace_Intersection (f a) (f b) -> f (Point_x_HalfSpace_Intersection a b) Source # | |
| Functor (Point_x_HalfSpace_Intersection boundaryPoint) Source # | |
Defined in HGeometry.HalfSpace.Type Methods fmap :: (a -> b) -> Point_x_HalfSpace_Intersection boundaryPoint a -> Point_x_HalfSpace_Intersection boundaryPoint b Source # (<$) :: a -> Point_x_HalfSpace_Intersection boundaryPoint b -> Point_x_HalfSpace_Intersection boundaryPoint a Source # | |
| Foldable (Point_x_HalfSpace_Intersection boundaryPoint) Source # | |
Defined in HGeometry.HalfSpace.Type Methods fold :: Monoid m => Point_x_HalfSpace_Intersection boundaryPoint m -> m Source # foldMap :: Monoid m => (a -> m) -> Point_x_HalfSpace_Intersection boundaryPoint a -> m Source # foldMap' :: Monoid m => (a -> m) -> Point_x_HalfSpace_Intersection boundaryPoint a -> m Source # foldr :: (a -> b -> b) -> b -> Point_x_HalfSpace_Intersection boundaryPoint a -> b Source # foldr' :: (a -> b -> b) -> b -> Point_x_HalfSpace_Intersection boundaryPoint a -> b Source # foldl :: (b -> a -> b) -> b -> Point_x_HalfSpace_Intersection boundaryPoint a -> b Source # foldl' :: (b -> a -> b) -> b -> Point_x_HalfSpace_Intersection boundaryPoint a -> b Source # foldr1 :: (a -> a -> a) -> Point_x_HalfSpace_Intersection boundaryPoint a -> a Source # foldl1 :: (a -> a -> a) -> Point_x_HalfSpace_Intersection boundaryPoint a -> a Source # toList :: Point_x_HalfSpace_Intersection boundaryPoint a -> [a] Source # null :: Point_x_HalfSpace_Intersection boundaryPoint a -> Bool Source # length :: Point_x_HalfSpace_Intersection boundaryPoint a -> Int Source # elem :: Eq a => a -> Point_x_HalfSpace_Intersection boundaryPoint a -> Bool Source # maximum :: Ord a => Point_x_HalfSpace_Intersection boundaryPoint a -> a Source # minimum :: Ord a => Point_x_HalfSpace_Intersection boundaryPoint a -> a Source # sum :: Num a => Point_x_HalfSpace_Intersection boundaryPoint a -> a Source # product :: Num a => Point_x_HalfSpace_Intersection boundaryPoint a -> a Source # | |
| Traversable (Point_x_HalfSpace_Intersection boundaryPoint) Source # | |
Defined in HGeometry.HalfSpace.Type Methods traverse :: Applicative f => (a -> f b) -> Point_x_HalfSpace_Intersection boundaryPoint a -> f (Point_x_HalfSpace_Intersection boundaryPoint b) Source # sequenceA :: Applicative f => Point_x_HalfSpace_Intersection boundaryPoint (f a) -> f (Point_x_HalfSpace_Intersection boundaryPoint a) Source # mapM :: Monad m => (a -> m b) -> Point_x_HalfSpace_Intersection boundaryPoint a -> m (Point_x_HalfSpace_Intersection boundaryPoint b) Source # sequence :: Monad m => Point_x_HalfSpace_Intersection boundaryPoint (m a) -> m (Point_x_HalfSpace_Intersection boundaryPoint a) Source # | |
| (Show boundaryPoint, Show interiorPoint) => Show (Point_x_HalfSpace_Intersection boundaryPoint interiorPoint) Source # | |
Defined in HGeometry.HalfSpace.Type | |
| (Eq boundaryPoint, Eq interiorPoint) => Eq (Point_x_HalfSpace_Intersection boundaryPoint interiorPoint) Source # | |
Defined in HGeometry.HalfSpace.Type Methods (==) :: Point_x_HalfSpace_Intersection boundaryPoint interiorPoint -> Point_x_HalfSpace_Intersection boundaryPoint interiorPoint -> Bool Source # (/=) :: Point_x_HalfSpace_Intersection boundaryPoint interiorPoint -> Point_x_HalfSpace_Intersection boundaryPoint interiorPoint -> Bool Source # | |