summaryrefslogtreecommitdiff
path: root/packages/base/src/Numeric/LinearAlgebra/Base.hs
diff options
context:
space:
mode:
Diffstat (limited to 'packages/base/src/Numeric/LinearAlgebra/Base.hs')
-rw-r--r--packages/base/src/Numeric/LinearAlgebra/Base.hs139
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{- |
3Module : Numeric.LinearAlgebra
4Copyright : (c) Alberto Ruiz 2006-14
5License : BSD3
6Maintainer : Alberto Ruiz
7Stability : provisional
8
9This module reexports the most common Linear Algebra functions.
10
11-}
12-----------------------------------------------------------------------------
13module 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
130import Numeric.LinearAlgebra.Data
131
132import Numeric.Matrix()
133import Numeric.Vector()
134import Numeric.Container
135import Numeric.LinearAlgebra.Algorithms
136import Numeric.LinearAlgebra.Util
137
138
139