vector-space-0.5.1: Vector & affine spaces, linear maps, and derivatives (requires ghc 6.9)

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

Data.AdditiveGroup

Description

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

Synopsis

Documentation

class AdditiveGroup v whereSource

Additive group v.

Methods

zeroV :: vSource

The zero element: identity for '(^+^)'

(^+^) :: v -> v -> vSource

Add vectors

negateV :: v -> vSource

Additive inverse

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

Group subtraction

sumV :: AdditiveGroup v => [v] -> vSource

Sum over several vectors

data Sum a Source

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

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)