Copyright | (c) Henning Thielemann 2004-2005 |
---|---|

Maintainer | numericprelude@henning-thielemann.de |

Stability | provisional |

Portability | portable |

Safe Haskell | Safe-Inferred |

Language | Haskell98 |

Abstraction of vectors

- class C v where
- class Eq v where
- 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

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

We need a Haskell 98 type class which provides equality test for Vector type constructors.

Eq [] |

# Instances for standard type constructors

functorScale :: (Functor v, C a) => a -> v a -> v a Source

# Related functions

linearComb :: (C a, C v) => [a] -> [v a] -> v a Source

Compute the linear combination of a list of vectors.