hgeometry-0.12.0.0: Geometric Algorithms, Data structures, and Data types.
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellNone
LanguageHaskell2010

Data.Geometry.Boundary

Description

 
Synopsis

Documentation

newtype Boundary g Source #

The boundary of a geometric object.

Constructors

Boundary g 

Instances

Instances details
Functor Boundary Source # 
Instance details

Defined in Data.Geometry.Boundary

Methods

fmap :: (a -> b) -> Boundary a -> Boundary b #

(<$) :: a -> Boundary b -> Boundary a #

Foldable Boundary Source # 
Instance details

Defined in Data.Geometry.Boundary

Methods

fold :: Monoid m => Boundary m -> m #

foldMap :: Monoid m => (a -> m) -> Boundary a -> m #

foldMap' :: Monoid m => (a -> m) -> Boundary a -> m #

foldr :: (a -> b -> b) -> b -> Boundary a -> b #

foldr' :: (a -> b -> b) -> b -> Boundary a -> b #

foldl :: (b -> a -> b) -> b -> Boundary a -> b #

foldl' :: (b -> a -> b) -> b -> Boundary a -> b #

foldr1 :: (a -> a -> a) -> Boundary a -> a #

foldl1 :: (a -> a -> a) -> Boundary a -> a #

toList :: Boundary a -> [a] #

null :: Boundary a -> Bool #

length :: Boundary a -> Int #

elem :: Eq a => a -> Boundary a -> Bool #

maximum :: Ord a => Boundary a -> a #

minimum :: Ord a => Boundary a -> a #

sum :: Num a => Boundary a -> a #

product :: Num a => Boundary a -> a #

Traversable Boundary Source # 
Instance details

Defined in Data.Geometry.Boundary

Methods

traverse :: Applicative f => (a -> f b) -> Boundary a -> f (Boundary b) #

sequenceA :: Applicative f => Boundary (f a) -> f (Boundary a) #

mapM :: Monad m => (a -> m b) -> Boundary a -> m (Boundary b) #

sequence :: Monad m => Boundary (m a) -> m (Boundary a) #

Eq g => Eq (Boundary g) Source # 
Instance details

Defined in Data.Geometry.Boundary

Methods

(==) :: Boundary g -> Boundary g -> Bool #

(/=) :: Boundary g -> Boundary g -> Bool #

Ord g => Ord (Boundary g) Source # 
Instance details

Defined in Data.Geometry.Boundary

Methods

compare :: Boundary g -> Boundary g -> Ordering #

(<) :: Boundary g -> Boundary g -> Bool #

(<=) :: Boundary g -> Boundary g -> Bool #

(>) :: Boundary g -> Boundary g -> Bool #

(>=) :: Boundary g -> Boundary g -> Bool #

max :: Boundary g -> Boundary g -> Boundary g #

min :: Boundary g -> Boundary g -> Boundary g #

Read g => Read (Boundary g) Source # 
Instance details

Defined in Data.Geometry.Boundary

Show g => Show (Boundary g) Source # 
Instance details

Defined in Data.Geometry.Boundary

Methods

showsPrec :: Int -> Boundary g -> ShowS #

show :: Boundary g -> String #

showList :: [Boundary g] -> ShowS #

IsTransformable g => IsTransformable (Boundary g) Source # 
Instance details

Defined in Data.Geometry.Boundary

(Ord r, Fractional r) => IsIntersectableWith (Line 2 r) (Boundary (Rectangle p r)) Source # 
Instance details

Defined in Data.Geometry.Line

Methods

intersect :: Line 2 r -> Boundary (Rectangle p r) -> Intersection (Line 2 r) (Boundary (Rectangle p r)) #

intersects :: Line 2 r -> Boundary (Rectangle p r) -> Bool #

nonEmptyIntersection :: proxy (Line 2 r) -> proxy (Boundary (Rectangle p r)) -> Intersection (Line 2 r) (Boundary (Rectangle p r)) -> Bool #

(Ord r, Fractional r) => IsIntersectableWith (HalfLine 2 r) (Boundary (Rectangle p r)) Source # 
Instance details

Defined in Data.Geometry.HalfLine

Methods

intersect :: HalfLine 2 r -> Boundary (Rectangle p r) -> Intersection (HalfLine 2 r) (Boundary (Rectangle p r)) #

intersects :: HalfLine 2 r -> Boundary (Rectangle p r) -> Bool #

nonEmptyIntersection :: proxy (HalfLine 2 r) -> proxy (Boundary (Rectangle p r)) -> Intersection (HalfLine 2 r) (Boundary (Rectangle p r)) -> Bool #

(Ord r, Floating r) => IsIntersectableWith (Line 2 r) (Circle p r) Source # 
Instance details

Defined in Data.Geometry.Ball

Methods

intersect :: Line 2 r -> Circle p r -> Intersection (Line 2 r) (Circle p r) #

intersects :: Line 2 r -> Circle p r -> Bool #

nonEmptyIntersection :: proxy (Line 2 r) -> proxy (Circle p r) -> Intersection (Line 2 r) (Circle p r) -> Bool #

(Ord r, Floating r) => IsIntersectableWith (LineSegment 2 p r) (Circle q r) Source # 
Instance details

Defined in Data.Geometry.Ball

Methods

intersect :: LineSegment 2 p r -> Circle q r -> Intersection (LineSegment 2 p r) (Circle q r) #

intersects :: LineSegment 2 p r -> Circle q r -> Bool #

nonEmptyIntersection :: proxy (LineSegment 2 p r) -> proxy (Circle q r) -> Intersection (LineSegment 2 p r) (Circle q r) -> Bool #

type NumType (Boundary g) Source # 
Instance details

Defined in Data.Geometry.Boundary

type NumType (Boundary g) = NumType g
type Dimension (Boundary g) Source # 
Instance details

Defined in Data.Geometry.Boundary

type IntersectionOf (Line 2 r) (Boundary (Rectangle p r)) Source # 
Instance details

Defined in Data.Geometry.Line

type IntersectionOf (Line 2 r) (Boundary (Rectangle p r)) = '[NoIntersection, Point 2 r, (Point 2 r, Point 2 r), LineSegment 2 () r]
type IntersectionOf (Line 2 r) (Boundary (Polygon t p r)) Source # 
Instance details

Defined in Data.Geometry.Polygon

type IntersectionOf (Line 2 r) (Boundary (Polygon t p r)) = '[Seq (Either (Point 2 r) (LineSegment 2 () r))]
type IntersectionOf (HalfLine 2 r) (Boundary (Rectangle p r)) Source # 
Instance details

Defined in Data.Geometry.HalfLine

type IntersectionOf (HalfLine 2 r) (Boundary (Rectangle p r)) = '[NoIntersection, Point 2 r, (Point 2 r, Point 2 r), LineSegment 2 () r]
type IntersectionOf (Line 2 r) (Circle p r) Source #

No intersection, one touching point, or two points

Instance details

Defined in Data.Geometry.Ball

type IntersectionOf (Line 2 r) (Circle p r) = '[NoIntersection, Touching (Point 2 r), (Point 2 r, Point 2 r)]
type IntersectionOf (LineSegment 2 p r) (Circle q r) Source #

A line segment may not intersect a circle, touch it, or intersect it properly in one or two points.

Instance details

Defined in Data.Geometry.Ball

type IntersectionOf (LineSegment 2 p r) (Circle q r) = '[NoIntersection, Touching (Point 2 r), Point 2 r, (Point 2 r, Point 2 r)]

_Boundary :: Iso g h (Boundary g) (Boundary h) Source #

Iso for converting between things with a boundary and without its boundary