| Safe Haskell | Safe |
|---|---|
| Language | Haskell98 |
Numeric.Additive.Class
- class Additive r where
- sum1 :: (Foldable1 f, Additive r) => f r -> r
- class Additive r => Abelian r
- class Additive r => Idempotent r
- sinnum1pIdempotent :: Natural -> r -> r
- class Additive m => Partitionable m where
Additive Semigroups
(a + b) + c = a + (b + c) sinnum 1 a = a sinnum (2 * n) a = sinnum n a + sinnum n a sinnum (2 * n + 1) a = sinnum n a + sinnum n a + a
Minimal complete definition
Instances
Additive Abelian semigroups
class Additive r => Abelian r #
an additive abelian semigroup
a + b = b + a
Instances
Additive Monoids
class Additive r => Idempotent r #
An additive semigroup with idempotent addition.
a + a = a
Instances
| Idempotent Bool # | |
| Idempotent () # | |
| Idempotent r => Idempotent (ZeroRng r) # | |
| Idempotent r => Idempotent (Opposite r) # | |
| Band r => Idempotent (Log r) # | |
| Idempotent r => Idempotent (Trig r) # | |
| Idempotent r => Idempotent (Quaternion' r) # | |
| Idempotent r => Idempotent (Hyper r) # | |
| Idempotent r => Idempotent (Dual' r) # | |
| Idempotent r => Idempotent (Quaternion r) # | |
| Idempotent r => Idempotent (Hyper' r) # | |
| Idempotent r => Idempotent (Dual r) # | |
| Idempotent r => Idempotent (Complex r) # | |
| Idempotent r => Idempotent (e -> r) # | |
| (Idempotent a, Idempotent b) => Idempotent (a, b) # | |
| Idempotent r => Idempotent (Covector r a) # | |
| (Idempotent a, Idempotent b, Idempotent c) => Idempotent (a, b, c) # | |
| (Idempotent a, Idempotent b, Idempotent c, Idempotent d) => Idempotent (a, b, c, d) # | |
| (Idempotent a, Idempotent b, Idempotent c, Idempotent d, Idempotent e) => Idempotent (a, b, c, d, e) # | |
sinnum1pIdempotent :: Natural -> r -> r #
Partitionable semigroups
class Additive m => Partitionable m where #
Minimal complete definition
Methods
partitionWith :: (m -> m -> r) -> m -> NonEmpty r #
partitionWith f c returns a list containing f a b for each a b such that a + b = c,
Instances
| Partitionable Bool # | |
| Partitionable Natural # | |
| Partitionable () # | |
| Factorable r => Partitionable (Log r) # | |
| Partitionable r => Partitionable (Trig r) # | |
| Partitionable r => Partitionable (Quaternion' r) # | |
| Partitionable r => Partitionable (Hyper r) # | |
| Partitionable r => Partitionable (Dual' r) # | |
| Partitionable r => Partitionable (Quaternion r) # | |
| Partitionable r => Partitionable (Hyper' r) # | |
| Partitionable r => Partitionable (Dual r) # | |
| Partitionable r => Partitionable (Complex r) # | |
| (Partitionable a, Partitionable b) => Partitionable (a, b) # | |
| (Partitionable a, Partitionable b, Partitionable c) => Partitionable (a, b, c) # | |
| (Partitionable a, Partitionable b, Partitionable c, Partitionable d) => Partitionable (a, b, c, d) # | |
| (Partitionable a, Partitionable b, Partitionable c, Partitionable d, Partitionable e) => Partitionable (a, b, c, d, e) # | |