Portability | portable |
---|---|

Stability | provisional |

Maintainer | numericprelude@henning-thielemann.de |

Safe Haskell | None |

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 aSource

# Related functions

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

Compute the linear combination of a list of vectors.