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

Copyright (c) Conal Elliott and Andy J Gill 2008 BSD3 conal@conal.net, andygill@ku.edu experimental Safe Haskell98

Description

Synopsis

# Documentation

class AdditiveGroup v where Source #

Additive group v.

Minimal complete definition

Methods

zeroV :: v Source #

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

(^+^) :: v -> v -> v infixl 6 Source #

negateV :: v -> v Source #

(^-^) :: v -> v -> v infixl 6 Source #

Group subtraction

Instances

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 FieldsgetSum :: a

Instances

 Source # Methodsfmap :: (a -> b) -> Sum a -> Sum b #(<\$) :: a -> Sum b -> Sum a # Source # Methodspure :: a -> Sum a #(<*>) :: Sum (a -> b) -> Sum a -> Sum b #(*>) :: Sum a -> Sum b -> Sum b #(<*) :: Sum a -> Sum b -> Sum a # Bounded a => Bounded (Sum a) Source # MethodsminBound :: Sum a #maxBound :: Sum a # Eq a => Eq (Sum a) Source # Methods(==) :: Sum a -> Sum a -> Bool #(/=) :: Sum a -> Sum a -> Bool # Ord a => Ord (Sum a) Source # Methodscompare :: Sum a -> Sum a -> Ordering #(<) :: Sum a -> Sum a -> Bool #(<=) :: Sum a -> Sum a -> Bool #(>) :: Sum a -> Sum a -> Bool #(>=) :: Sum a -> Sum a -> Bool #max :: Sum a -> Sum a -> Sum a #min :: Sum a -> Sum a -> Sum a # Read a => Read (Sum a) Source # MethodsreadsPrec :: Int -> ReadS (Sum a) #readList :: ReadS [Sum a] #readPrec :: ReadPrec (Sum a) # Show a => Show (Sum a) Source # MethodsshowsPrec :: Int -> Sum a -> ShowS #show :: Sum a -> String #showList :: [Sum a] -> ShowS # AdditiveGroup a => Monoid (Sum a) Source # Methodsmempty :: Sum a #mappend :: Sum a -> Sum a -> Sum a #mconcat :: [Sum a] -> Sum a # Source # Methods(^+^) :: Sum a -> Sum a -> Sum a Source #negateV :: Sum a -> Sum a Source #(^-^) :: Sum a -> Sum a -> Sum a Source #

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