numeric-prelude-0.1.1: An experimental alternative hierarchy of numeric type classesSource codeContentsIndex
Algebra.ModuleBasis
Portabilityrequires multi-parameter type classes
Stabilityprovisional
Maintainernumericprelude@henning-thielemann.de
Contents
Instances for atomic types
Instances for composed types
Properties
Description
Abstraction of bases of finite dimensional modules
Synopsis
class C a v => C a v where
basis :: a -> [v]
flatten :: v -> [a]
dimension :: a -> v -> Int
propFlatten :: (Eq v, C a v) => a -> v -> Bool
propDimension :: C a v => a -> v -> Bool
Documentation
class C a v => C a v whereSource

It must hold:

   Module.linearComb (flatten v `asTypeOf` [a]) (basis a) == v
   dimension a v == length (flatten v `asTypeOf` [a])
Methods
basis :: a -> [v]Source
basis of the module with respect to the scalar type, the result must be independent of argument, Prelude.undefined should suffice.
flatten :: v -> [a]Source
scale a vector by a scalar
dimension :: a -> v -> IntSource
the size of the basis, should also work for undefined argument, the result must be independent of argument, Prelude.undefined should suffice.
show/hide Instances
C Double Double
C Float Float
C Int Int
C Integer Integer
(C a v0, C a v1) => C a ((,) v0 v1)
(C a v0, C a v1, C a v2) => C a ((,,) v0 v1 v2)
C a => C (T a) (T a)
Instances for atomic types
Instances for composed types
Properties
propFlatten :: (Eq v, C a v) => a -> v -> BoolSource
propDimension :: C a v => a -> v -> BoolSource
Produced by Haddock version 2.4.2