| Safe Haskell | None |
|---|---|
| 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
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).
Instances
| Eq Pos # | |
| Show Pos # | |
| Generic Pos # | |
| type Rep Pos # | |
Defined in NumHask.Space type Rep Pos = D1 (MetaData "Pos" "NumHask.Space" "numhask-range-0.2.3.1-J89sQYUYBLeKCiE9B8m0BR" False) ((C1 (MetaCons "OuterPos" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "InnerPos" PrefixI False) (U1 :: * -> *)) :+: (C1 (MetaCons "LowerPos" PrefixI False) (U1 :: * -> *) :+: (C1 (MetaCons "UpperPos" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "MidPos" PrefixI False) (U1 :: * -> *)))) | |