Copyright | (c) Conal Elliott and Andy J Gill 2008 |
---|---|
License | BSD3 |
Maintainer | conal@conal.net, andygill@ku.edu |
Stability | experimental |
Safe Haskell | Safe |
Language | Haskell98 |
Groups: zero, addition, and negation (additive inverse)
Documentation
class AdditiveGroup v where Source #
Additive group v
.
The zero element: identity for '(^+^)'
zeroV :: (Generic v, AdditiveGroup (VRep v)) => v Source #
The zero element: identity for '(^+^)'
(^+^) :: v -> v -> v infixl 6 Source #
Add vectors
(^+^) :: (Generic v, AdditiveGroup (VRep v)) => v -> v -> v infixl 6 Source #
Add vectors
Additive inverse
negateV :: (Generic v, AdditiveGroup (VRep v)) => v -> v Source #
Additive inverse
(^-^) :: v -> v -> v infixl 6 Source #
Group subtraction
sumV :: (Foldable f, AdditiveGroup v) => f v -> v Source #
Sum over several vectors
Monoid under group addition. Alternative to the Sum
in
Data.Monoid, which uses Num
instead of AdditiveGroup
.