NumericPrelude-0.0: An experimental alternative hierarchy of numeric type classesContentsIndex
Algebra.Vector
Portabilityportable
Stabilityprovisional
Maintainernumericprelude@henning-thielemann.de
Contents
Instances for standard type constructors
Related functions
Properties
Description
Abstraction of vectors
Synopsis
class C v where
zero :: C a => v a
(<+>) :: C a => v a -> v a -> v a
(*>) :: C a => a -> v a -> v a
class Eq v where
eq :: Eq a => v a -> v a -> Bool
functorScale :: (Functor v, C a) => a -> v a -> v a
linearComb :: (C a, C v) => [a] -> [v a] -> v a
propCascade :: (C v, Eq v, C a, Eq a) => a -> a -> v a -> Bool
propRightDistributive :: (C v, Eq v, C a, Eq a) => a -> v a -> v a -> Bool
propLeftDistributive :: (C v, Eq v, C a, Eq a) => a -> a -> v a -> Bool
Documentation
class C v where

A Module over a ring satisfies:

   a *> (b + c) === a *> b + a *> c
   (a * b) *> c === a *> (b *> c)
   (a + b) *> c === a *> c + b *> c
Methods
zero :: C a => v a
zero element of the vector space
(<+>) :: C a => v a -> v a -> v a
add and subtract elements
(*>) :: C a => a -> v a -> v a
scale a vector by a scalar
show/hide Instances
C T
C T
C T
C T
C T
C T
C T
C []
Ord i => C (Map i)
Ord a => C (T a)
C (T a)
Ord i => C (T i)
C ((->) b)
class Eq v where
We need a Haskell 98 type class which provides equality test for Vector type constructors.
Methods
eq :: Eq a => v a -> v a -> Bool
show/hide Instances
Eq []
Instances for standard type constructors
functorScale :: (Functor v, C a) => a -> v a -> v a
Related functions
linearComb :: (C a, C v) => [a] -> [v a] -> v a
Compute the linear combination of a list of vectors.
Properties
propCascade :: (C v, Eq v, C a, Eq a) => a -> a -> v a -> Bool
propRightDistributive :: (C v, Eq v, C a, Eq a) => a -> v a -> v a -> Bool
propLeftDistributive :: (C v, Eq v, C a, Eq a) => a -> a -> v a -> Bool
Produced by Haddock version 0.7