Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Documentation
class (Eq (Element s), Ord (Element s), Field (Element s)) => Space s where Source #
space laws
a `union` nul == a a `union` a == a project o n (lower o) == lower n project o n (upper o) == upper n project a a == id
lower :: s -> Element s Source #
lower boundary of space
upper :: s -> Element s Source #
upper boundary of space
mid :: s -> Element s Source #
mid-point of the space
width :: s -> Element s Source #
distance between boundaries
singleton :: Element s -> s Source #
singleton space
singular :: s -> Bool Source #
zero-width test
element :: Element s -> s -> Bool Source #
determine whether an a is in the space
contains :: s -> s -> Bool Source #
is a space contained within another?
disjoint :: s -> s -> Bool Source #
do two spaces intersect?
intersects :: s -> s -> Bool Source #
do two spaces intersect?
convex hull
null space, which can be interpreted as mempty
space :: Foldable f => f (Element s) -> s Source #
the containing space of a Foldable
project :: s -> s -> Element s -> Element s Source #
project a data point from an old range to a new range
grid :: Pos -> s -> Grid s -> [Element s] Source #
create equally-spaced a
s from a space
gridSpace :: s -> Grid s -> [s] Source #
create equally-spaced `Space a`s from a space
(FromInteger a, Ord a, BoundedField a) => Space (Range a) Source # | |
(Signed a, FromInteger a, Ord a, BoundedField a) => Space (Rect a) Source # | |
Pos suggests where data points are placed on a grid across a range. Pos can also be thought about as whether the lower and upper points on the range are open or closed (plus the mid-point as an extra option).