NumericPrelude-0.0: An experimental alternative hierarchy of numeric type classesContentsIndex
Algebra.Module
Portabilityrequires multi-parameter type classes
Stabilityprovisional
Maintainernumericprelude@henning-thielemann.de
Contents
Instances for atomic types
Instances for composed types
Related functions
Properties
Description
Abstraction of modules
Synopsis
class (C b, C a) => C a b where
(*>) :: a -> b -> b
linearComb :: C a b => [a] -> [b] -> b
integerMultiply :: (ToInteger a, C b) => a -> b -> b
propCascade :: (Eq b, C a b) => b -> a -> a -> Bool
propRightDistributive :: (Eq b, C a b) => a -> b -> b -> Bool
propLeftDistributive :: (Eq b, C a b) => b -> a -> a -> Bool
Documentation
class (C b, C a) => C a b 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
(*>) :: a -> b -> b
scale a vector by a scalar
show/hide Instances
C Double Double
C Float Float
C Int Int
C Integer Integer
C Integer Rational
C Rational Rational
(C a b0, C a b1) => C a (b0, b1)
(C a b0, C a b1, C a b2) => C a (b0, b1, b2)
C a b => C a (c -> b)
C a b => C a (T b)
C a b => C a (T b)
C a b => C a (T b)
C a b => C a (T b)
C a b => C a (T b)
C a b => C a (T b)
(C a v, C v) => C a (T v)
C a b => C a [b]
(Ord i, Eq a, Eq v, C a, C a v) => C a (Map i v)
C a v => C a (T b v)
(Ord i, C a v) => C a (T i v)
Instances for atomic types
Instances for composed types
Related functions
linearComb :: C a b => [a] -> [b] -> b
Compute the linear combination of a list of vectors.
integerMultiply :: (ToInteger a, C b) => a -> b -> b

This function can be used to define any C as a module over Integer.

Better move to Algebra.Additive?

Properties
propCascade :: (Eq b, C a b) => b -> a -> a -> Bool
propRightDistributive :: (Eq b, C a b) => a -> b -> b -> Bool
propLeftDistributive :: (Eq b, C a b) => b -> a -> a -> Bool
Produced by Haddock version 0.7