vector-space-0.10: Vector & affine spaces, linear maps, and derivatives

Copyright(c) Conal Elliott and Andy J Gill 2008
LicenseBSD3
Maintainerconal@conal.net, andygill@ku.edu
Stabilityexperimental
Safe HaskellNone
LanguageHaskell98

Data.AdditiveGroup

Description

Groups: zero, addition, and negation (additive inverse)

Synopsis

Documentation

(^-^) :: AdditiveGroup v => v -> v -> v infixl 6 Source

Group subtraction

sumV :: (Foldable f, AdditiveGroup v) => f v -> v Source

Sum over several vectors

newtype Sum a Source

Monoid under group addition. Alternative to the Sum in Data.Monoid, which uses Num instead of AdditiveGroup.

Constructors

Sum 

Fields

getSum :: a
 

Instances

Functor Sum 
Applicative Sum 
Bounded a => Bounded (Sum a) 
Eq a => Eq (Sum a) 
Ord a => Ord (Sum a) 
Read a => Read (Sum a) 
Show a => Show (Sum a) 
AdditiveGroup a => Monoid (Sum a) 
AdditiveGroup a => AdditiveGroup (Sum a) 

inSum :: (a -> b) -> Sum a -> Sum b Source

Application a unary function inside a Sum

inSum2 :: (a -> b -> c) -> Sum a -> Sum b -> Sum c Source

Application a binary function inside a Sum