| Safe Haskell | Safe |
|---|---|
| Language | Haskell2010 |
NumHask.Space
Description
Documentation
class (Eq (Element s), Ord (Element s), Field (Element s)) => Space s where #
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
Methods
lower boundary of space
upper boundary of space
mid-point of the space
distance between boundaries
singleton space
zero-width test
element :: Element s -> s -> Bool #
determine whether an a is in the space
is a space contained within another?
do two spaces intersect?
intersects :: s -> s -> Bool #
do two spaces intersect?
convex hull
null space, which can be interpreted as mempty
space :: Foldable f => f (Element s) -> s #
the containing space of a Foldable
project :: s -> s -> Element s -> Element s #
project a data point from an old range to a new range
grid :: Pos -> s -> Grid s -> [Element s] #
create equally-spaced as from a space
gridSpace :: s -> Grid s -> [s] #
create equally-spaced `Space a`s from a space
Instances
| (FromInteger a, Ord a, BoundedField a) => Space (Range a) # | |
| (Signed a, FromInteger a, Ord a, BoundedField a) => Space (Rect a) # | |
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).