diff options
Diffstat (limited to 'packages/base/src/Numeric/LinearAlgebra')
-rw-r--r-- | packages/base/src/Numeric/LinearAlgebra/Data.hs | 21 | ||||
-rw-r--r-- | packages/base/src/Numeric/LinearAlgebra/HMatrix.hs | 6 | ||||
-rw-r--r-- | packages/base/src/Numeric/LinearAlgebra/Static.hs | 4 |
3 files changed, 22 insertions, 9 deletions
diff --git a/packages/base/src/Numeric/LinearAlgebra/Data.hs b/packages/base/src/Numeric/LinearAlgebra/Data.hs index d2843c2..a389aac 100644 --- a/packages/base/src/Numeric/LinearAlgebra/Data.hs +++ b/packages/base/src/Numeric/LinearAlgebra/Data.hs | |||
@@ -8,21 +8,29 @@ License : BSD3 | |||
8 | Maintainer : Alberto Ruiz | 8 | Maintainer : Alberto Ruiz |
9 | Stability : provisional | 9 | Stability : provisional |
10 | 10 | ||
11 | Basic data processing. | 11 | This module provides functions for creation and manipulation of vectors and matrices, IO, and other utilities. |
12 | 12 | ||
13 | -} | 13 | -} |
14 | -------------------------------------------------------------------------------- | 14 | -------------------------------------------------------------------------------- |
15 | 15 | ||
16 | module Numeric.LinearAlgebra.Data( | 16 | module Numeric.LinearAlgebra.Data( |
17 | 17 | ||
18 | -- * Elements | ||
19 | R,C,I,Z,type(./.), | ||
20 | |||
18 | -- * Vector | 21 | -- * Vector |
19 | -- | 1D arrays are storable vectors from the vector package. There is no distinction | 22 | {- | 1D arrays are storable vectors directly reexported from the vector package. |
20 | -- between row and column vectors. | 23 | -} |
21 | 24 | ||
22 | fromList, toList, (|>), vector, range, idxs, | 25 | fromList, toList, (|>), vector, range, idxs, |
23 | 26 | ||
24 | -- * Matrix | 27 | -- * Matrix |
25 | 28 | ||
29 | {- | The main data type of hmatrix is a 2D dense array defined on top of | ||
30 | a storable vector. The internal representation is suitable for direct | ||
31 | interface with standard numeric libraries. | ||
32 | -} | ||
33 | |||
26 | (><), matrix, tr, tr', | 34 | (><), matrix, tr, tr', |
27 | 35 | ||
28 | -- * Dimensions | 36 | -- * Dimensions |
@@ -56,8 +64,9 @@ module Numeric.LinearAlgebra.Data( | |||
56 | -- * Matrix extraction | 64 | -- * Matrix extraction |
57 | Extractor(..), (??), | 65 | Extractor(..), (??), |
58 | 66 | ||
59 | takeRows, dropRows, takeColumns, dropColumns, | 67 | (?), (¿), fliprl, flipud, |
60 | subMatrix, (?), (¿), fliprl, flipud, | 68 | |
69 | subMatrix, takeRows, dropRows, takeColumns, dropColumns, | ||
61 | 70 | ||
62 | remap, | 71 | remap, |
63 | 72 | ||
@@ -92,7 +101,7 @@ module Numeric.LinearAlgebra.Data( | |||
92 | separable, | 101 | separable, |
93 | fromArray2D, | 102 | fromArray2D, |
94 | module Data.Complex, | 103 | module Data.Complex, |
95 | R,C,I,Z,Mod, type(./.), | 104 | Mod, |
96 | Vector, Matrix, GMatrix, nRows, nCols | 105 | Vector, Matrix, GMatrix, nRows, nCols |
97 | 106 | ||
98 | ) where | 107 | ) where |
diff --git a/packages/base/src/Numeric/LinearAlgebra/HMatrix.hs b/packages/base/src/Numeric/LinearAlgebra/HMatrix.hs index 8adaaaf..bac1c0c 100644 --- a/packages/base/src/Numeric/LinearAlgebra/HMatrix.hs +++ b/packages/base/src/Numeric/LinearAlgebra/HMatrix.hs | |||
@@ -13,7 +13,7 @@ compatibility with previous version, to be removed | |||
13 | 13 | ||
14 | module Numeric.LinearAlgebra.HMatrix ( | 14 | module Numeric.LinearAlgebra.HMatrix ( |
15 | module Numeric.LinearAlgebra, | 15 | module Numeric.LinearAlgebra, |
16 | (¦),(——),ℝ,ℂ,(<·>) | 16 | (¦),(——),ℝ,ℂ,(<·>),app,mul |
17 | ) where | 17 | ) where |
18 | 18 | ||
19 | import Numeric.LinearAlgebra | 19 | import Numeric.LinearAlgebra |
@@ -23,3 +23,7 @@ infixr 8 <·> | |||
23 | (<·>) :: Numeric t => Vector t -> Vector t -> t | 23 | (<·>) :: Numeric t => Vector t -> Vector t -> t |
24 | (<·>) = dot | 24 | (<·>) = dot |
25 | 25 | ||
26 | app m v = m #> v | ||
27 | |||
28 | mul a b = a <> b | ||
29 | |||
diff --git a/packages/base/src/Numeric/LinearAlgebra/Static.hs b/packages/base/src/Numeric/LinearAlgebra/Static.hs index d0a790d..0dab0e6 100644 --- a/packages/base/src/Numeric/LinearAlgebra/Static.hs +++ b/packages/base/src/Numeric/LinearAlgebra/Static.hs | |||
@@ -22,7 +22,7 @@ Stability : experimental | |||
22 | 22 | ||
23 | Experimental interface with statically checked dimensions. | 23 | Experimental interface with statically checked dimensions. |
24 | 24 | ||
25 | This module is under active development and the interface is subject to changes. | 25 | See code examples at http://dis.um.es/~alberto/hmatrix/static.html. |
26 | 26 | ||
27 | -} | 27 | -} |
28 | 28 | ||
@@ -65,7 +65,7 @@ import Numeric.LinearAlgebra hiding ( | |||
65 | row,col,vector,matrix,linspace,toRows,toColumns, | 65 | row,col,vector,matrix,linspace,toRows,toColumns, |
66 | (<\>),fromList,takeDiag,svd,eig,eigSH,eigSH', | 66 | (<\>),fromList,takeDiag,svd,eig,eigSH,eigSH', |
67 | eigenvalues,eigenvaluesSH,eigenvaluesSH',build, | 67 | eigenvalues,eigenvaluesSH,eigenvaluesSH',build, |
68 | qr,size,app,mul,dot,chol,range,R,C) | 68 | qr,size,dot,chol,range,R,C) |
69 | import qualified Numeric.LinearAlgebra as LA | 69 | import qualified Numeric.LinearAlgebra as LA |
70 | import Data.Proxy(Proxy) | 70 | import Data.Proxy(Proxy) |
71 | import Internal.Static | 71 | import Internal.Static |