Stability | experimental |
---|---|
Maintainer | conal@conal.net, andygill@ku.edu |
Groups: zero, addition, and negation (additive inverse)
- class AdditiveGroup v where
- (^-^) :: AdditiveGroup v => v -> v -> v
- sumV :: AdditiveGroup v => [v] -> v
- newtype Sum a = Sum a
Documentation
class AdditiveGroup v whereSource
Additive group v
.
The zero element: identity for '(^+^)'
Add vectors
Additive inverse
AdditiveGroup Double | |
AdditiveGroup Float | |
AdditiveGroup () | |
(RealFloat v, AdditiveGroup v) => AdditiveGroup (Complex v) | |
AdditiveGroup a => AdditiveGroup (Maybe a) | |
AdditiveGroup v => AdditiveGroup (a -> v) | |
(AdditiveGroup u, AdditiveGroup v) => AdditiveGroup (u, v) | |
(HasTrie u, AdditiveGroup v) => AdditiveGroup (:->: u v) | |
(HasBasis a, HasTrie (Basis a), AdditiveGroup u) => AdditiveGroup (:> a u) | |
(AdditiveGroup u, AdditiveGroup v, AdditiveGroup w) => AdditiveGroup (u, v, w) |
(^-^) :: AdditiveGroup v => v -> v -> vSource
Group subtraction
sumV :: AdditiveGroup v => [v] -> vSource
Sum over several vectors
Monoid under group addition. Alternative to the Sum
in
Data.Monoid, which uses Num
instead of AdditiveGroup
.
Sum a |