Copyright | (c) Dylan Thurston Henning Thielemann 2004-2005 |
---|---|
Maintainer | numericprelude@henning-thielemann.de |
Stability | provisional |
Portability | requires multi-parameter type classes |
Safe Haskell | None |
Language | Haskell98 |
Abstraction of modules
- class (C a, C v) => C a v where
- (<*>.*>) :: C a x => T (a, v) (x -> c) -> (v -> x) -> T (a, v) c
- linearComb :: C a v => [a] -> [v] -> v
- integerMultiply :: (C a, C v) => a -> v -> v
- propCascade :: (Eq v, C a v) => v -> a -> a -> Bool
- propRightDistributive :: (Eq v, C a v) => a -> v -> v -> Bool
- propLeftDistributive :: (Eq v, C a v) => v -> a -> a -> Bool
Documentation
class (C a, C v) => C a v where Source #
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
C Double Double Source # | |
C Float Float Source # | |
C Int Int Source # | |
C Int8 Int8 Source # | |
C Int16 Int16 Source # | |
C Int32 Int32 Source # | |
C Int64 Int64 Source # | |
C Integer Integer Source # | |
C T T Source # | |
C a => C Integer (T a) Source # | |
(C a b, RealFloat b) => C a (Complex b) Source # | |
C a v => C a [v] Source # | |
C a b => C a (T b) Source # | |
C a b => C a (T b) Source # | |
(C a v, C v) => C a (T v) Source # | |
C a b => C a (T b) Source # | |
C a b => C a (T b) Source # | The '(*>)' method can't replace |
C a b => C a (T b) Source # | The '(*>)' method can't replace |
C a b => C a (T b) Source # | |
C a v => C a (c -> v) Source # | |
(C a b0, C a b1) => C a (b0, b1) Source # | |
(C u, C a b) => C a (T u b) Source # | |
(Ord i, C a v) => C a (T i v) Source # | |
C a v => C a (T b v) Source # | |
(C a b0, C a b1, C a b2) => C a (b0, b1, b2) Source # | |
C a => C (T a) (T a) Source # | |
C a v => C (T a) (T v) Source # | |
Instances for atomic types
Instances for composed types
Related functions
linearComb :: C a v => [a] -> [v] -> v Source #
Compute the linear combination of a list of vectors.
ToDo:
Should it use zipWith
?
integerMultiply :: (C a, C v) => a -> v -> v Source #
This function can be used to define any
C
as a module over Integer
.
Better move to Algebra.Additive?