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/src/Numeric/LinearAlgebra/Base.hs | |
parent | 1838c4248679b7476bb8716a76171712dc3cd335 (diff) |
license changes, reexport modules
Diffstat (limited to 'packages/base/src/Numeric/LinearAlgebra/Base.hs')
-rw-r--r-- | packages/base/src/Numeric/LinearAlgebra/Base.hs | 139 |
1 files changed, 139 insertions, 0 deletions
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 | |||