diff options
Diffstat (limited to 'packages/base/src/Numeric/LinearAlgebra/Devel.hs')
-rw-r--r-- | packages/base/src/Numeric/LinearAlgebra/Devel.hs | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/packages/base/src/Numeric/LinearAlgebra/Devel.hs b/packages/base/src/Numeric/LinearAlgebra/Devel.hs new file mode 100644 index 0000000..c41db2d --- /dev/null +++ b/packages/base/src/Numeric/LinearAlgebra/Devel.hs | |||
@@ -0,0 +1,68 @@ | |||
1 | -------------------------------------------------------------------------------- | ||
2 | {- | | ||
3 | Module : Numeric.HMatrix.Devel | ||
4 | Copyright : (c) Alberto Ruiz 2014 | ||
5 | License : BSD3 | ||
6 | Maintainer : Alberto Ruiz | ||
7 | Stability : provisional | ||
8 | |||
9 | The library can be easily extended using the tools in this module. | ||
10 | |||
11 | -} | ||
12 | -------------------------------------------------------------------------------- | ||
13 | |||
14 | module Numeric.LinearAlgebra.Devel( | ||
15 | -- * FFI helpers | ||
16 | -- | Sample usage, to upload a perspective matrix to a shader. | ||
17 | -- | ||
18 | -- @ glUniformMatrix4fv 0 1 (fromIntegral gl_TRUE) \`appMatrix\` perspective 0.01 100 (pi\/2) (4\/3) | ||
19 | -- @ | ||
20 | module Data.Packed.Foreign, | ||
21 | |||
22 | -- * FFI tools | ||
23 | -- | Illustrative usage examples can be found | ||
24 | -- in the @examples\/devel@ folder included in the package. | ||
25 | module Data.Packed.Development, | ||
26 | |||
27 | -- * ST | ||
28 | -- | In-place manipulation inside the ST monad. | ||
29 | -- See examples\/inplace.hs in the distribution. | ||
30 | |||
31 | -- ** Mutable Vectors | ||
32 | STVector, newVector, thawVector, freezeVector, runSTVector, | ||
33 | readVector, writeVector, modifyVector, liftSTVector, | ||
34 | -- ** Mutable Matrices | ||
35 | STMatrix, newMatrix, thawMatrix, freezeMatrix, runSTMatrix, | ||
36 | readMatrix, writeMatrix, modifyMatrix, liftSTMatrix, | ||
37 | -- ** Unsafe functions | ||
38 | newUndefinedVector, | ||
39 | unsafeReadVector, unsafeWriteVector, | ||
40 | unsafeThawVector, unsafeFreezeVector, | ||
41 | newUndefinedMatrix, | ||
42 | unsafeReadMatrix, unsafeWriteMatrix, | ||
43 | unsafeThawMatrix, unsafeFreezeMatrix, | ||
44 | |||
45 | -- * Special maps and zips | ||
46 | mapVectorWithIndex, zipVector, zipVectorWith, unzipVector, unzipVectorWith, | ||
47 | mapVectorM, mapVectorM_, mapVectorWithIndexM, mapVectorWithIndexM_, | ||
48 | foldLoop, foldVector, foldVectorG, foldVectorWithIndex, | ||
49 | mapMatrixWithIndex, mapMatrixWithIndexM, mapMatrixWithIndexM_, | ||
50 | liftMatrix, liftMatrix2, liftMatrix2Auto, | ||
51 | |||
52 | -- * Auxiliary classes | ||
53 | Element, Container, Product, Contraction, LSDiv, | ||
54 | Complexable(), RealElement(), | ||
55 | RealOf, ComplexOf, SingleOf, DoubleOf, | ||
56 | IndexOf, | ||
57 | Field, Normed | ||
58 | ) where | ||
59 | |||
60 | import Data.Packed.Foreign | ||
61 | import Data.Packed.Development | ||
62 | import Data.Packed.ST | ||
63 | import Numeric.Container(Container,Contraction,LSDiv,Product, | ||
64 | Complexable(),RealElement(), | ||
65 | RealOf, ComplexOf, SingleOf, DoubleOf, IndexOf) | ||
66 | import Data.Packed | ||
67 | import Numeric.LinearAlgebra.Algorithms(Field,Normed) | ||
68 | |||