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

Stabilityexperimental
Maintainerconal@conal.net, andygill@ku.edu
Safe HaskellNone

Data.AdditiveGroup

Description

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

Synopsis

Documentation

(^-^) :: AdditiveGroup v => v -> v -> vSource

Group subtraction

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

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 bSource

Application a unary function inside a Sum

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

Application a binary function inside a Sum