summaryrefslogtreecommitdiff
path: root/lib/Numeric/LinearAlgebra
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2014-05-01 22:47:02 +0200
committerAlberto Ruiz <aruiz@um.es>2014-05-01 22:47:02 +0200
commite168d61eb429aa1de2d68075a4b89a8522e44038 (patch)
tree0abe0286f723b8ee27828c931102e3b9259f0a7a /lib/Numeric/LinearAlgebra
parentcf1379fed234cf99b2ccce6d9311bfc5c58ef4a3 (diff)
top reexport module
Diffstat (limited to 'lib/Numeric/LinearAlgebra')
-rw-r--r--lib/Numeric/LinearAlgebra/Algorithms.hs9
-rw-r--r--lib/Numeric/LinearAlgebra/Data.hs97
-rw-r--r--lib/Numeric/LinearAlgebra/Data/Devel.hs63
3 files changed, 6 insertions, 163 deletions
diff --git a/lib/Numeric/LinearAlgebra/Algorithms.hs b/lib/Numeric/LinearAlgebra/Algorithms.hs
index 7c1c032..de9cb00 100644
--- a/lib/Numeric/LinearAlgebra/Algorithms.hs
+++ b/lib/Numeric/LinearAlgebra/Algorithms.hs
@@ -21,6 +21,8 @@ imported from "Numeric.LinearAlgebra.LAPACK".
21 21
22-} 22-}
23----------------------------------------------------------------------------- 23-----------------------------------------------------------------------------
24{-# OPTIONS_HADDOCK hide #-}
25
24 26
25module Numeric.LinearAlgebra.Algorithms ( 27module Numeric.LinearAlgebra.Algorithms (
26-- * Supported types 28-- * Supported types
@@ -85,8 +87,9 @@ import Data.Array
85import Numeric.ContainerBoot 87import Numeric.ContainerBoot
86 88
87 89
88{- | Class used to define generic linear algebra computations for both real and complex matrices. Only double precision is supported in this version (we can 90{- | Generic linear algebra functions for double precision real and complex matrices.
89transform single precision objects using 'single' and 'double'). 91
92(Single precision data can be converted using 'single' and 'double').
90 93
91-} 94-}
92class (Product t, 95class (Product t,
@@ -438,7 +441,7 @@ i = 0:+1
438 441
439----------------------------------------------------------------------- 442-----------------------------------------------------------------------
440 443
441-- | The nullspace of a matrix from its SVD decomposition. 444-- | The nullspace of a matrix from its precomputed SVD decomposition.
442nullspaceSVD :: Field t 445nullspaceSVD :: Field t
443 => Either Double Int -- ^ Left \"numeric\" zero (eg. 1*'eps'), 446 => Either Double Int -- ^ Left \"numeric\" zero (eg. 1*'eps'),
444 -- or Right \"theoretical\" matrix rank. 447 -- or Right \"theoretical\" matrix rank.
diff --git a/lib/Numeric/LinearAlgebra/Data.hs b/lib/Numeric/LinearAlgebra/Data.hs
deleted file mode 100644
index a3639d5..0000000
--- a/lib/Numeric/LinearAlgebra/Data.hs
+++ /dev/null
@@ -1,97 +0,0 @@
1--------------------------------------------------------------------------------
2{- |
3Module : Numeric.LinearAlgebra.Data
4Copyright : (c) Alberto Ruiz 2014
5License : GPL
6
7Maintainer : Alberto Ruiz
8Stability : provisional
9
10-}
11--------------------------------------------------------------------------------
12
13module Numeric.LinearAlgebra.Data(
14 -- * Vector
15 -- | 1D arrays are storable vectors from the vector package.
16
17 Vector, (|>), dim, (@>),
18
19 -- * Matrix
20 Matrix, (><), size, (@@>), trans, ctrans,
21
22 -- * Construction functions
23
24 scalar, konst, build, assoc, accum, linspace, -- ones, zeros,
25
26 -- * Data manipulation
27
28 fromList, toList, subVector, takesV, vjoin,
29
30 flatten, reshape, asRow, asColumn, row, col,
31
32 fromRows, toRows, fromColumns, toColumns, fromLists, toLists,
33
34 takeRows, dropRows, takeColumns, dropColumns, subMatrix, (?), (¿), fliprl, flipud,
35
36 -- * Diagonal matrices
37
38 ident, diag, diagl, diagRect, takeDiag,
39
40 -- * Block matrices
41
42 fromBlocks, (¦), (——), diagBlock, repmat, toBlocks, toBlocksEvery,
43
44 -- * Mapping functions
45
46 conj, cmap, step, cond,
47
48 -- * Find elements
49
50 find, maxIndex, minIndex, maxElement, minElement, atIndex,
51
52 -- * Products
53
54 (<>), (·), outer, kronecker, cross,
55 sumElements, prodElements, absSum,
56 optimiseMult,
57
58 corr, conv, corrMin, corr2, conv2,
59
60 (<\>),
61
62 -- * Random arrays
63
64 rand, randn, RandDist(..), randomVector, gaussianSample, uniformSample,
65
66 -- * IO
67
68 disp, dispf, disps, dispcf, vecdisp, latexFormat, format,
69 loadMatrix, saveMatrix, fromFile, fileDimensions,
70 readMatrix,
71 fscanfVector, fprintfVector, freadVector, fwriteVector,
72
73-- * Element conversion
74 Convert(..),
75 Complexable(),
76 RealElement(),
77
78 RealOf, ComplexOf, SingleOf, DoubleOf,
79
80 IndexOf,
81
82 module Data.Complex,
83
84 -- * Misc
85 scale, meanCov, arctan2,
86 rows, cols,
87 separable,
88 fromArray2D
89
90) where
91
92import Data.Packed.Vector
93import Data.Packed.Matrix
94import Numeric.Container
95import Numeric.LinearAlgebra.Util
96import Data.Complex
97
diff --git a/lib/Numeric/LinearAlgebra/Data/Devel.hs b/lib/Numeric/LinearAlgebra/Data/Devel.hs
deleted file mode 100644
index 88c980c..0000000
--- a/lib/Numeric/LinearAlgebra/Data/Devel.hs
+++ /dev/null
@@ -1,63 +0,0 @@
1--------------------------------------------------------------------------------
2{- |
3Module : Numeric.LinearAlgebra.Data.Devel
4Copyright : (c) Alberto Ruiz 2014
5License : GPL
6
7Maintainer : Alberto Ruiz
8Stability : provisional
9
10The library can be easily extended using the tools in this module.
11
12-}
13--------------------------------------------------------------------------------
14
15module Numeric.LinearAlgebra.Data.Devel(
16 -- * FFI helpers
17 -- | Sample usage, to upload a perspective matrix to a shader.
18 --
19 -- @ glUniformMatrix4fv 0 1 (fromIntegral gl_TRUE) \`appMatrix\` perspective 0.01 100 (pi\/2) (4\/3)
20 -- @
21 module Data.Packed.Foreign,
22
23 -- * FFI tools
24 -- | Illustrative usage examples can be found
25 -- in the @examples\/devel@ folder included in the package.
26 module Data.Packed.Development,
27
28 -- * ST
29 -- | In-place manipulation inside the ST monad.
30 -- See examples\/inplace.hs in the distribution.
31
32 -- ** Mutable Vectors
33 STVector, newVector, thawVector, freezeVector, runSTVector,
34 readVector, writeVector, modifyVector, liftSTVector,
35 -- ** Mutable Matrices
36 STMatrix, newMatrix, thawMatrix, freezeMatrix, runSTMatrix,
37 readMatrix, writeMatrix, modifyMatrix, liftSTMatrix,
38 -- ** Unsafe functions
39 newUndefinedVector,
40 unsafeReadVector, unsafeWriteVector,
41 unsafeThawVector, unsafeFreezeVector,
42 newUndefinedMatrix,
43 unsafeReadMatrix, unsafeWriteMatrix,
44 unsafeThawMatrix, unsafeFreezeMatrix,
45
46 -- * Special maps and zips
47 mapVectorWithIndex, zipVector, zipVectorWith, unzipVector, unzipVectorWith,
48 mapVectorM, mapVectorM_, mapVectorWithIndexM, mapVectorWithIndexM_,
49 foldLoop, foldVector, foldVectorG, foldVectorWithIndex,
50 mapMatrixWithIndex, mapMatrixWithIndexM, mapMatrixWithIndexM_,
51 liftMatrix, liftMatrix2, liftMatrix2Auto,
52
53 -- * Misc
54 Element, Container, Product, Contraction, LSDiv
55) where
56
57import Data.Packed.Foreign
58import Data.Packed.Development
59import Data.Packed.ST
60import Numeric.Container(Container,Contraction,LSDiv,Product)
61import Data.Packed
62
63