diff options
author | Alberto Ruiz <aruiz@um.es> | 2014-05-16 14:13:49 +0200 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2014-05-16 14:13:49 +0200 |
commit | 51f4cc7b4b301142b8df73568ffaa448f9e6dd50 (patch) | |
tree | 7f9b9a26344a23a0d1e3fb6e4105fe968465cd2a /packages/base | |
parent | 1838c4248679b7476bb8716a76171712dc3cd335 (diff) |
license changes, reexport modules
Diffstat (limited to 'packages/base')
20 files changed, 304 insertions, 67 deletions
diff --git a/packages/base/hmatrix-base.cabal b/packages/base/hmatrix-base.cabal index 3f12dad..638390a 100644 --- a/packages/base/hmatrix-base.cabal +++ b/packages/base/hmatrix-base.cabal | |||
@@ -39,10 +39,12 @@ library | |||
39 | Numeric.LinearAlgebra.LAPACK | 39 | Numeric.LinearAlgebra.LAPACK |
40 | Numeric.LinearAlgebra.Algorithms | 40 | Numeric.LinearAlgebra.Algorithms |
41 | Numeric.Container | 41 | Numeric.Container |
42 | Numeric.LinearAlgebra | ||
43 | Numeric.LinearAlgebra.Util | 42 | Numeric.LinearAlgebra.Util |
44 | Numeric.LinearAlgebra.Util.Convolution | 43 | Numeric.LinearAlgebra.Util.Convolution |
45 | Data.Packed.IO | 44 | Data.Packed.IO |
45 | Numeric.LinearAlgebra.Base | ||
46 | Numeric.LinearAlgebra.Devel | ||
47 | Numeric.LinearAlgebra.Data | ||
46 | 48 | ||
47 | other-modules: Data.Packed.Internal, | 49 | other-modules: Data.Packed.Internal, |
48 | Data.Packed.Internal.Common, | 50 | Data.Packed.Internal.Common, |
diff --git a/packages/base/src/Data/Packed.hs b/packages/base/src/Data/Packed.hs index c66718a..129bd22 100644 --- a/packages/base/src/Data/Packed.hs +++ b/packages/base/src/Data/Packed.hs | |||
@@ -10,6 +10,7 @@ Types for dense 'Vector' and 'Matrix' of 'Storable' elements. | |||
10 | 10 | ||
11 | -} | 11 | -} |
12 | ----------------------------------------------------------------------------- | 12 | ----------------------------------------------------------------------------- |
13 | {-# OPTIONS_HADDOCK hide #-} | ||
13 | 14 | ||
14 | module Data.Packed ( | 15 | module Data.Packed ( |
15 | -- * Vector | 16 | -- * Vector |
diff --git a/packages/base/src/Data/Packed/Development.hs b/packages/base/src/Data/Packed/Development.hs index 6dfd551..1efedc9 100644 --- a/packages/base/src/Data/Packed/Development.hs +++ b/packages/base/src/Data/Packed/Development.hs | |||
@@ -13,6 +13,7 @@ | |||
13 | -- in the @examples\/devel@ folder included in the package. | 13 | -- in the @examples\/devel@ folder included in the package. |
14 | -- | 14 | -- |
15 | ----------------------------------------------------------------------------- | 15 | ----------------------------------------------------------------------------- |
16 | {-# OPTIONS_HADDOCK hide #-} | ||
16 | 17 | ||
17 | module Data.Packed.Development ( | 18 | module Data.Packed.Development ( |
18 | createVector, createMatrix, | 19 | createVector, createMatrix, |
diff --git a/packages/base/src/Data/Packed/Foreign.hs b/packages/base/src/Data/Packed/Foreign.hs index efa51ca..1ec3694 100644 --- a/packages/base/src/Data/Packed/Foreign.hs +++ b/packages/base/src/Data/Packed/Foreign.hs | |||
@@ -6,6 +6,7 @@ | |||
6 | -- @ glUniformMatrix4fv 0 1 (fromIntegral gl_TRUE) \`appMatrix\` perspective 0.01 100 (pi\/2) (4\/3) | 6 | -- @ glUniformMatrix4fv 0 1 (fromIntegral gl_TRUE) \`appMatrix\` perspective 0.01 100 (pi\/2) (4\/3) |
7 | -- @ | 7 | -- @ |
8 | -- | 8 | -- |
9 | {-# OPTIONS_HADDOCK hide #-} | ||
9 | module Data.Packed.Foreign | 10 | module Data.Packed.Foreign |
10 | ( app | 11 | ( app |
11 | , appVector, appVectorLen | 12 | , appVector, appVectorLen |
diff --git a/packages/base/src/Data/Packed/Internal.hs b/packages/base/src/Data/Packed/Internal.hs index 537e51e..59a72fc 100644 --- a/packages/base/src/Data/Packed/Internal.hs +++ b/packages/base/src/Data/Packed/Internal.hs | |||
@@ -2,11 +2,9 @@ | |||
2 | -- | | 2 | -- | |
3 | -- Module : Data.Packed.Internal | 3 | -- Module : Data.Packed.Internal |
4 | -- Copyright : (c) Alberto Ruiz 2007 | 4 | -- Copyright : (c) Alberto Ruiz 2007 |
5 | -- License : GPL-style | 5 | -- License : BSD3 |
6 | -- | 6 | -- Maintainer : Alberto Ruiz |
7 | -- Maintainer : Alberto Ruiz <aruiz@um.es> | ||
8 | -- Stability : provisional | 7 | -- Stability : provisional |
9 | -- Portability : portable | ||
10 | -- | 8 | -- |
11 | -- Reexports all internal modules | 9 | -- Reexports all internal modules |
12 | -- | 10 | -- |
diff --git a/packages/base/src/Data/Packed/Matrix.hs b/packages/base/src/Data/Packed/Matrix.hs index d94d167..b3be823 100644 --- a/packages/base/src/Data/Packed/Matrix.hs +++ b/packages/base/src/Data/Packed/Matrix.hs | |||
@@ -8,9 +8,8 @@ | |||
8 | -- | | 8 | -- | |
9 | -- Module : Data.Packed.Matrix | 9 | -- Module : Data.Packed.Matrix |
10 | -- Copyright : (c) Alberto Ruiz 2007-10 | 10 | -- Copyright : (c) Alberto Ruiz 2007-10 |
11 | -- License : GPL | 11 | -- License : BSD3 |
12 | -- | 12 | -- Maintainer : Alberto Ruiz |
13 | -- Maintainer : Alberto Ruiz <aruiz@um.es> | ||
14 | -- Stability : provisional | 13 | -- Stability : provisional |
15 | -- | 14 | -- |
16 | -- A Matrix representation suitable for numerical computations using LAPACK and GSL. | 15 | -- A Matrix representation suitable for numerical computations using LAPACK and GSL. |
diff --git a/packages/base/src/Data/Packed/Numeric.hs b/packages/base/src/Data/Packed/Numeric.hs index 4892089..c13e91d 100644 --- a/packages/base/src/Data/Packed/Numeric.hs +++ b/packages/base/src/Data/Packed/Numeric.hs | |||
@@ -10,7 +10,6 @@ | |||
10 | -- Module : Data.Packed.Numeric | 10 | -- Module : Data.Packed.Numeric |
11 | -- Copyright : (c) Alberto Ruiz 2010-14 | 11 | -- Copyright : (c) Alberto Ruiz 2010-14 |
12 | -- License : BSD3 | 12 | -- License : BSD3 |
13 | -- | ||
14 | -- Maintainer : Alberto Ruiz | 13 | -- Maintainer : Alberto Ruiz |
15 | -- Stability : provisional | 14 | -- Stability : provisional |
16 | -- | 15 | -- |
diff --git a/packages/base/src/Data/Packed/ST.hs b/packages/base/src/Data/Packed/ST.hs index dae457c..5c45c7b 100644 --- a/packages/base/src/Data/Packed/ST.hs +++ b/packages/base/src/Data/Packed/ST.hs | |||
@@ -9,12 +9,12 @@ | |||
9 | -- License : BSD3 | 9 | -- License : BSD3 |
10 | -- Maintainer : Alberto Ruiz | 10 | -- Maintainer : Alberto Ruiz |
11 | -- Stability : provisional | 11 | -- Stability : provisional |
12 | -- Portability : portable | ||
13 | -- | 12 | -- |
14 | -- In-place manipulation inside the ST monad. | 13 | -- In-place manipulation inside the ST monad. |
15 | -- See examples/inplace.hs in the distribution. | 14 | -- See examples/inplace.hs in the distribution. |
16 | -- | 15 | -- |
17 | ----------------------------------------------------------------------------- | 16 | ----------------------------------------------------------------------------- |
17 | {-# OPTIONS_HADDOCK hide #-} | ||
18 | 18 | ||
19 | module Data.Packed.ST ( | 19 | module Data.Packed.ST ( |
20 | -- * Mutable Vectors | 20 | -- * Mutable Vectors |
diff --git a/packages/base/src/Data/Packed/Vector.hs b/packages/base/src/Data/Packed/Vector.hs index a8f6bb1..53fe563 100644 --- a/packages/base/src/Data/Packed/Vector.hs +++ b/packages/base/src/Data/Packed/Vector.hs | |||
@@ -4,9 +4,8 @@ | |||
4 | -- | | 4 | -- | |
5 | -- Module : Data.Packed.Vector | 5 | -- Module : Data.Packed.Vector |
6 | -- Copyright : (c) Alberto Ruiz 2007-10 | 6 | -- Copyright : (c) Alberto Ruiz 2007-10 |
7 | -- License : GPL | 7 | -- License : BSD3 |
8 | -- | 8 | -- Maintainer : Alberto Ruiz |
9 | -- Maintainer : Alberto Ruiz <aruiz@um.es> | ||
10 | -- Stability : provisional | 9 | -- Stability : provisional |
11 | -- | 10 | -- |
12 | -- 1D arrays suitable for numeric computations using external libraries. | 11 | -- 1D arrays suitable for numeric computations using external libraries. |
diff --git a/packages/base/src/Numeric/Container.hs b/packages/base/src/Numeric/Container.hs index b7d3b80..240e5f5 100644 --- a/packages/base/src/Numeric/Container.hs +++ b/packages/base/src/Numeric/Container.hs | |||
@@ -9,11 +9,9 @@ | |||
9 | -- | | 9 | -- | |
10 | -- Module : Numeric.Container | 10 | -- Module : Numeric.Container |
11 | -- Copyright : (c) Alberto Ruiz 2010-14 | 11 | -- Copyright : (c) Alberto Ruiz 2010-14 |
12 | -- License : GPL | 12 | -- License : BSD3 |
13 | -- | 13 | -- Maintainer : Alberto Ruiz |
14 | -- Maintainer : Alberto Ruiz <aruiz@um.es> | ||
15 | -- Stability : provisional | 14 | -- Stability : provisional |
16 | -- Portability : portable | ||
17 | -- | 15 | -- |
18 | -- Basic numeric operations on 'Vector' and 'Matrix', including conversion routines. | 16 | -- Basic numeric operations on 'Vector' and 'Matrix', including conversion routines. |
19 | -- | 17 | -- |
diff --git a/packages/base/src/Numeric/LinearAlgebra.hs b/packages/base/src/Numeric/LinearAlgebra.hs deleted file mode 100644 index 1db860c..0000000 --- a/packages/base/src/Numeric/LinearAlgebra.hs +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | ----------------------------------------------------------------------------- | ||
2 | {- | | ||
3 | Module : Numeric.LinearAlgebra | ||
4 | Copyright : (c) Alberto Ruiz 2006-10 | ||
5 | License : GPL-style | ||
6 | |||
7 | Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
8 | Stability : provisional | ||
9 | Portability : uses ffi | ||
10 | |||
11 | This module reexports all normally required functions for Linear Algebra applications. | ||
12 | |||
13 | It also provides instances of standard classes 'Show', 'Read', 'Eq', | ||
14 | 'Num', 'Fractional', and 'Floating' for 'Vector' and 'Matrix'. | ||
15 | In arithmetic operations one-component vectors and matrices automatically | ||
16 | expand to match the dimensions of the other operand. | ||
17 | |||
18 | -} | ||
19 | ----------------------------------------------------------------------------- | ||
20 | {-# OPTIONS_HADDOCK hide #-} | ||
21 | |||
22 | module Numeric.LinearAlgebra ( | ||
23 | module Numeric.Container, | ||
24 | module Numeric.LinearAlgebra.Algorithms | ||
25 | ) where | ||
26 | |||
27 | import Numeric.Container | ||
28 | import Numeric.LinearAlgebra.Algorithms | ||
29 | import Numeric.Matrix() | ||
30 | import Numeric.Vector() | ||
diff --git a/packages/base/src/Numeric/LinearAlgebra/Algorithms.hs b/packages/base/src/Numeric/LinearAlgebra/Algorithms.hs index 6f40683..92761be 100644 --- a/packages/base/src/Numeric/LinearAlgebra/Algorithms.hs +++ b/packages/base/src/Numeric/LinearAlgebra/Algorithms.hs | |||
@@ -7,12 +7,10 @@ | |||
7 | ----------------------------------------------------------------------------- | 7 | ----------------------------------------------------------------------------- |
8 | {- | | 8 | {- | |
9 | Module : Numeric.LinearAlgebra.Algorithms | 9 | Module : Numeric.LinearAlgebra.Algorithms |
10 | Copyright : (c) Alberto Ruiz 2006-9 | 10 | Copyright : (c) Alberto Ruiz 2006-14 |
11 | License : GPL-style | 11 | License : BSD3 |
12 | 12 | Maintainer : Alberto Ruiz | |
13 | Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
14 | Stability : provisional | 13 | Stability : provisional |
15 | Portability : uses ffi | ||
16 | 14 | ||
17 | High level generic interface to common matrix computations. | 15 | High level generic interface to common matrix computations. |
18 | 16 | ||
@@ -20,6 +18,7 @@ Specific functions for particular base types can also be explicitly | |||
20 | imported from "Numeric.LinearAlgebra.LAPACK". | 18 | imported from "Numeric.LinearAlgebra.LAPACK". |
21 | 19 | ||
22 | -} | 20 | -} |
21 | {-# OPTIONS_HADDOCK hide #-} | ||
23 | ----------------------------------------------------------------------------- | 22 | ----------------------------------------------------------------------------- |
24 | 23 | ||
25 | module Numeric.LinearAlgebra.Algorithms ( | 24 | module Numeric.LinearAlgebra.Algorithms ( |
diff --git a/packages/base/src/Numeric/LinearAlgebra/Base.hs b/packages/base/src/Numeric/LinearAlgebra/Base.hs new file mode 100644 index 0000000..8aa7846 --- /dev/null +++ b/packages/base/src/Numeric/LinearAlgebra/Base.hs | |||
@@ -0,0 +1,139 @@ | |||
1 | ----------------------------------------------------------------------------- | ||
2 | {- | | ||
3 | Module : Numeric.LinearAlgebra | ||
4 | Copyright : (c) Alberto Ruiz 2006-14 | ||
5 | License : BSD3 | ||
6 | Maintainer : Alberto Ruiz | ||
7 | Stability : provisional | ||
8 | |||
9 | This module reexports the most common Linear Algebra functions. | ||
10 | |||
11 | -} | ||
12 | ----------------------------------------------------------------------------- | ||
13 | module Numeric.LinearAlgebra.Base ( | ||
14 | |||
15 | -- * Basic types and data processing | ||
16 | module Numeric.LinearAlgebra.Data, | ||
17 | |||
18 | -- | The standard numeric classes are defined elementwise: | ||
19 | -- | ||
20 | -- >>> fromList [1,2,3] * fromList [3,0,-2 :: Double] | ||
21 | -- fromList [3.0,0.0,-6.0] | ||
22 | -- | ||
23 | -- >>> (3><3) [1..9] * ident 3 :: Matrix Double | ||
24 | -- (3><3) | ||
25 | -- [ 1.0, 0.0, 0.0 | ||
26 | -- , 0.0, 5.0, 0.0 | ||
27 | -- , 0.0, 0.0, 9.0 ] | ||
28 | -- | ||
29 | -- In arithmetic operations single-element vectors and matrices | ||
30 | -- (created from numeric literals or using 'scalar') automatically | ||
31 | -- expand to match the dimensions of the other operand: | ||
32 | -- | ||
33 | -- >>> 5 + 2*ident 3 :: Matrix Double | ||
34 | -- (3><3) | ||
35 | -- [ 7.0, 5.0, 5.0 | ||
36 | -- , 5.0, 7.0, 5.0 | ||
37 | -- , 5.0, 5.0, 7.0 ] | ||
38 | -- | ||
39 | |||
40 | -- * Products | ||
41 | (<.>), | ||
42 | |||
43 | -- | The matrix product is also implemented in the "Data.Monoid" instance for Matrix, where | ||
44 | -- single-element matrices (created from numeric literals or using 'scalar') | ||
45 | -- are used for scaling. | ||
46 | -- | ||
47 | -- >>> let m = (2><3)[1..] :: Matrix Double | ||
48 | -- >>> m <> 2 <> diagl[0.5,1,0] | ||
49 | -- (2><3) | ||
50 | -- [ 1.0, 4.0, 0.0 | ||
51 | -- , 4.0, 10.0, 0.0 ] | ||
52 | -- | ||
53 | -- mconcat uses 'optimiseMult' to get the optimal association order. | ||
54 | |||
55 | (◇), | ||
56 | outer, kronecker, cross, | ||
57 | scale, | ||
58 | sumElements, prodElements, absSum, | ||
59 | |||
60 | -- * Linear Systems | ||
61 | (<\>), | ||
62 | linearSolve, | ||
63 | linearSolveLS, | ||
64 | linearSolveSVD, | ||
65 | luSolve, | ||
66 | cholSolve, | ||
67 | |||
68 | -- * Inverse and pseudoinverse | ||
69 | inv, pinv, pinvTol, | ||
70 | |||
71 | -- * Determinant and rank | ||
72 | rcond, rank, ranksv, | ||
73 | det, invlndet, | ||
74 | |||
75 | -- * Singular value decomposition | ||
76 | svd, | ||
77 | fullSVD, | ||
78 | thinSVD, | ||
79 | compactSVD, | ||
80 | singularValues, | ||
81 | leftSV, rightSV, | ||
82 | |||
83 | -- * Eigensystems | ||
84 | eig, eigSH, eigSH', | ||
85 | eigenvalues, eigenvaluesSH, eigenvaluesSH', | ||
86 | geigSH', | ||
87 | |||
88 | -- * QR | ||
89 | qr, rq, qrRaw, qrgr, | ||
90 | |||
91 | -- * Cholesky | ||
92 | chol, cholSH, mbCholSH, | ||
93 | |||
94 | -- * Hessenberg | ||
95 | hess, | ||
96 | |||
97 | -- * Schur | ||
98 | schur, | ||
99 | |||
100 | -- * LU | ||
101 | lu, luPacked, | ||
102 | |||
103 | -- * Matrix functions | ||
104 | expm, | ||
105 | sqrtm, | ||
106 | matFunc, | ||
107 | |||
108 | -- * Nullspace | ||
109 | nullspacePrec, | ||
110 | nullVector, | ||
111 | nullspaceSVD, | ||
112 | null1, null1sym, | ||
113 | |||
114 | orth, | ||
115 | |||
116 | -- * Norms | ||
117 | norm1, norm2, normInf, pnorm, NormType(..), | ||
118 | |||
119 | -- * Correlation and Convolution | ||
120 | corr, conv, corrMin, corr2, conv2, | ||
121 | |||
122 | -- * Random arrays | ||
123 | |||
124 | -- | rand, randn, RandDist(..), randomVector, gaussianSample, uniformSample | ||
125 | |||
126 | -- * Misc | ||
127 | meanCov, peps, relativeError, haussholder, optimiseMult, udot | ||
128 | ) where | ||
129 | |||
130 | import Numeric.LinearAlgebra.Data | ||
131 | |||
132 | import Numeric.Matrix() | ||
133 | import Numeric.Vector() | ||
134 | import Numeric.Container | ||
135 | import Numeric.LinearAlgebra.Algorithms | ||
136 | import Numeric.LinearAlgebra.Util | ||
137 | |||
138 | |||
139 | |||
diff --git a/packages/base/src/Numeric/LinearAlgebra/Data.hs b/packages/base/src/Numeric/LinearAlgebra/Data.hs new file mode 100644 index 0000000..3bc88f9 --- /dev/null +++ b/packages/base/src/Numeric/LinearAlgebra/Data.hs | |||
@@ -0,0 +1,68 @@ | |||
1 | -------------------------------------------------------------------------------- | ||
2 | {- | | ||
3 | Module : Numeric.LinearAlgebra.Data | ||
4 | Copyright : (c) Alberto Ruiz 2014 | ||
5 | License : BSD3 | ||
6 | Maintainer : Alberto Ruiz | ||
7 | Stability : provisional | ||
8 | |||
9 | Basic data processing. | ||
10 | |||
11 | -} | ||
12 | -------------------------------------------------------------------------------- | ||
13 | |||
14 | module Numeric.LinearAlgebra.Data( | ||
15 | |||
16 | -- * Vector | ||
17 | -- | 1D arrays are storable vectors from the vector package. | ||
18 | |||
19 | Vector, (|>), dim, (@>), | ||
20 | |||
21 | -- * Matrix | ||
22 | Matrix, (><), size, (@@>), trans, ctrans, | ||
23 | |||
24 | -- * Construction | ||
25 | scalar, konst, build, assoc, accum, linspace, -- ones, zeros, | ||
26 | |||
27 | -- * Diagonal | ||
28 | ident, diag, diagl, diagRect, takeDiag, | ||
29 | |||
30 | -- * Data manipulation | ||
31 | fromList, toList, subVector, takesV, vjoin, | ||
32 | flatten, reshape, asRow, asColumn, row, col, | ||
33 | fromRows, toRows, fromColumns, toColumns, fromLists, toLists, fromArray2D, | ||
34 | takeRows, dropRows, takeColumns, dropColumns, subMatrix, (?), (¿), fliprl, flipud, | ||
35 | |||
36 | -- * Block matrix | ||
37 | fromBlocks, (¦), (——), diagBlock, repmat, toBlocks, toBlocksEvery, | ||
38 | |||
39 | -- * Mapping functions | ||
40 | conj, cmap, step, cond, | ||
41 | |||
42 | -- * Find elements | ||
43 | find, maxIndex, minIndex, maxElement, minElement, atIndex, | ||
44 | |||
45 | -- * IO | ||
46 | disp, dispf, disps, dispcf, latexFormat, format, readMatrix, | ||
47 | |||
48 | -- | loadMatrix, saveMatrix, fromFile, fileDimensions, fscanfVector, fprintfVector, freadVector, fwriteVector | ||
49 | |||
50 | -- * Conversion | ||
51 | Convert(..), | ||
52 | |||
53 | -- * Misc | ||
54 | arctan2, | ||
55 | rows, cols, | ||
56 | separable, | ||
57 | |||
58 | module Data.Complex | ||
59 | |||
60 | ) where | ||
61 | |||
62 | import Data.Packed.Vector | ||
63 | import Data.Packed.Matrix | ||
64 | import Numeric.Container | ||
65 | import Data.Packed.IO | ||
66 | import Numeric.LinearAlgebra.Util | ||
67 | import Data.Complex | ||
68 | |||
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 | |||
diff --git a/packages/base/src/Numeric/LinearAlgebra/LAPACK.hs b/packages/base/src/Numeric/LinearAlgebra/LAPACK.hs index 9cb67d4..40fef45 100644 --- a/packages/base/src/Numeric/LinearAlgebra/LAPACK.hs +++ b/packages/base/src/Numeric/LinearAlgebra/LAPACK.hs | |||
@@ -3,7 +3,6 @@ | |||
3 | -- Module : Numeric.LinearAlgebra.LAPACK | 3 | -- Module : Numeric.LinearAlgebra.LAPACK |
4 | -- Copyright : (c) Alberto Ruiz 2006-14 | 4 | -- Copyright : (c) Alberto Ruiz 2006-14 |
5 | -- License : BSD3 | 5 | -- License : BSD3 |
6 | -- | ||
7 | -- Maintainer : Alberto Ruiz | 6 | -- Maintainer : Alberto Ruiz |
8 | -- Stability : provisional | 7 | -- Stability : provisional |
9 | -- | 8 | -- |
diff --git a/packages/base/src/Numeric/LinearAlgebra/Util.hs b/packages/base/src/Numeric/LinearAlgebra/Util.hs index 533c54b..f0470ab 100644 --- a/packages/base/src/Numeric/LinearAlgebra/Util.hs +++ b/packages/base/src/Numeric/LinearAlgebra/Util.hs | |||
@@ -3,9 +3,8 @@ | |||
3 | {- | | 3 | {- | |
4 | Module : Numeric.LinearAlgebra.Util | 4 | Module : Numeric.LinearAlgebra.Util |
5 | Copyright : (c) Alberto Ruiz 2013 | 5 | Copyright : (c) Alberto Ruiz 2013 |
6 | License : GPL | 6 | License : BSD3 |
7 | 7 | Maintainer : Alberto Ruiz | |
8 | Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
9 | Stability : provisional | 8 | Stability : provisional |
10 | 9 | ||
11 | -} | 10 | -} |
diff --git a/packages/base/src/Numeric/LinearAlgebra/Util/Convolution.hs b/packages/base/src/Numeric/LinearAlgebra/Util/Convolution.hs index d04c46b..1775f14 100644 --- a/packages/base/src/Numeric/LinearAlgebra/Util/Convolution.hs +++ b/packages/base/src/Numeric/LinearAlgebra/Util/Convolution.hs | |||
@@ -3,9 +3,8 @@ | |||
3 | {- | | 3 | {- | |
4 | Module : Numeric.LinearAlgebra.Util.Convolution | 4 | Module : Numeric.LinearAlgebra.Util.Convolution |
5 | Copyright : (c) Alberto Ruiz 2012 | 5 | Copyright : (c) Alberto Ruiz 2012 |
6 | License : GPL | 6 | License : BSD3 |
7 | 7 | Maintainer : Alberto Ruiz | |
8 | Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
9 | Stability : provisional | 8 | Stability : provisional |
10 | 9 | ||
11 | -} | 10 | -} |
@@ -17,7 +16,7 @@ module Numeric.LinearAlgebra.Util.Convolution( | |||
17 | corr2, conv2, separable | 16 | corr2, conv2, separable |
18 | ) where | 17 | ) where |
19 | 18 | ||
20 | import Numeric.LinearAlgebra | 19 | import Numeric.Container |
21 | 20 | ||
22 | 21 | ||
23 | vectSS :: Element t => Int -> Vector t -> Matrix t | 22 | vectSS :: Element t => Int -> Vector t -> Matrix t |
diff --git a/packages/base/src/Numeric/Matrix.hs b/packages/base/src/Numeric/Matrix.hs index 3478aae..962ee84 100644 --- a/packages/base/src/Numeric/Matrix.hs +++ b/packages/base/src/Numeric/Matrix.hs | |||
@@ -7,12 +7,11 @@ | |||
7 | ----------------------------------------------------------------------------- | 7 | ----------------------------------------------------------------------------- |
8 | -- | | 8 | -- | |
9 | -- Module : Numeric.Matrix | 9 | -- Module : Numeric.Matrix |
10 | -- Copyright : (c) Alberto Ruiz 2010 | 10 | -- Copyright : (c) Alberto Ruiz 2014 |
11 | -- License : GPL-style | 11 | -- License : BSD3 |
12 | -- | 12 | -- |
13 | -- Maintainer : Alberto Ruiz <aruiz@um.es> | 13 | -- Maintainer : Alberto Ruiz |
14 | -- Stability : provisional | 14 | -- Stability : provisional |
15 | -- Portability : portable | ||
16 | -- | 15 | -- |
17 | -- Provides instances of standard classes 'Show', 'Read', 'Eq', | 16 | -- Provides instances of standard classes 'Show', 'Read', 'Eq', |
18 | -- 'Num', 'Fractional', and 'Floating' for 'Matrix'. | 17 | -- 'Num', 'Fractional', and 'Floating' for 'Matrix'. |
diff --git a/packages/base/src/Numeric/Vector.hs b/packages/base/src/Numeric/Vector.hs index 2769cd9..3a425f5 100644 --- a/packages/base/src/Numeric/Vector.hs +++ b/packages/base/src/Numeric/Vector.hs | |||
@@ -7,11 +7,10 @@ | |||
7 | -- | | 7 | -- | |
8 | -- Module : Numeric.Vector | 8 | -- Module : Numeric.Vector |
9 | -- Copyright : (c) Alberto Ruiz 2011 | 9 | -- Copyright : (c) Alberto Ruiz 2011 |
10 | -- License : GPL-style | 10 | -- License : BSD3 |
11 | -- | 11 | -- |
12 | -- Maintainer : Alberto Ruiz <aruiz@um.es> | 12 | -- Maintainer : Alberto Ruiz |
13 | -- Stability : provisional | 13 | -- Stability : provisional |
14 | -- Portability : portable | ||
15 | -- | 14 | -- |
16 | -- Provides instances of standard classes 'Show', 'Read', 'Eq', | 15 | -- Provides instances of standard classes 'Show', 'Read', 'Eq', |
17 | -- 'Num', 'Fractional', and 'Floating' for 'Vector'. | 16 | -- 'Num', 'Fractional', and 'Floating' for 'Vector'. |