summaryrefslogtreecommitdiff
path: root/packages/base/src/Numeric/LinearAlgebra
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2014-05-21 09:57:03 +0200
committerAlberto Ruiz <aruiz@um.es>2014-05-21 09:57:03 +0200
commite07c3dee7235496b71a89233106d93f6cc94ada1 (patch)
tree1ad29c3fc93ee076ad68e3ee759c9a3357f9cd5b /packages/base/src/Numeric/LinearAlgebra
parent92de588b82945bb251a056c34a8ef0c00cb00e5a (diff)
Numeric.Container and Numeric.LinearAlgebra moved to base
Diffstat (limited to 'packages/base/src/Numeric/LinearAlgebra')
-rw-r--r--packages/base/src/Numeric/LinearAlgebra/Base.hs141
-rw-r--r--packages/base/src/Numeric/LinearAlgebra/Data.hs2
-rw-r--r--packages/base/src/Numeric/LinearAlgebra/Devel.hs2
-rw-r--r--packages/base/src/Numeric/LinearAlgebra/Random.hs2
-rw-r--r--packages/base/src/Numeric/LinearAlgebra/Util.hs2
-rw-r--r--packages/base/src/Numeric/LinearAlgebra/Util/Convolution.hs2
6 files changed, 5 insertions, 146 deletions
diff --git a/packages/base/src/Numeric/LinearAlgebra/Base.hs b/packages/base/src/Numeric/LinearAlgebra/Base.hs
deleted file mode 100644
index 8d44d26..0000000
--- a/packages/base/src/Numeric/LinearAlgebra/Base.hs
+++ /dev/null
@@ -1,141 +0,0 @@
1-----------------------------------------------------------------------------
2{- |
3Module : Numeric.LinearAlgebra
4Copyright : (c) Alberto Ruiz 2006-14
5License : BSD3
6Maintainer : Alberto Ruiz
7Stability : provisional
8
9-}
10-----------------------------------------------------------------------------
11module Numeric.LinearAlgebra.Base (
12
13 -- * Basic types and data processing
14 module Numeric.LinearAlgebra.Data,
15
16 -- | The standard numeric classes are defined elementwise:
17 --
18 -- >>> fromList [1,2,3] * fromList [3,0,-2 :: Double]
19 -- fromList [3.0,0.0,-6.0]
20 --
21 -- >>> (3><3) [1..9] * ident 3 :: Matrix Double
22 -- (3><3)
23 -- [ 1.0, 0.0, 0.0
24 -- , 0.0, 5.0, 0.0
25 -- , 0.0, 0.0, 9.0 ]
26 --
27 -- In arithmetic operations single-element vectors and matrices
28 -- (created from numeric literals or using 'scalar') automatically
29 -- expand to match the dimensions of the other operand:
30 --
31 -- >>> 5 + 2*ident 3 :: Matrix Double
32 -- (3><3)
33 -- [ 7.0, 5.0, 5.0
34 -- , 5.0, 7.0, 5.0
35 -- , 5.0, 5.0, 7.0 ]
36 --
37
38 -- * Matrix product
39 (<.>),
40
41 -- | This operator can also be written using the unicode symbol ◇ (25c7).
42 --
43
44 -- | The matrix x matrix product is also implemented in the "Data.Monoid" instance, where
45 -- single-element matrices (created from numeric literals or using 'scalar')
46 -- are used for scaling.
47 --
48 -- >>> let m = (2><3)[1..] :: Matrix Double
49 -- >>> m <> 2 <> diagl[0.5,1,0]
50 -- (2><3)
51 -- [ 1.0, 4.0, 0.0
52 -- , 4.0, 10.0, 0.0 ]
53 --
54 -- 'mconcat' uses 'optimiseMult' to get the optimal association order.
55
56 -- * Other products
57 outer, kronecker, cross,
58 scale,
59 sumElements, prodElements, absSum,
60
61 -- * Linear Systems
62 (<\>),
63 linearSolve,
64 linearSolveLS,
65 linearSolveSVD,
66 luSolve,
67 cholSolve,
68
69 -- * Inverse and pseudoinverse
70 inv, pinv, pinvTol,
71
72 -- * Determinant and rank
73 rcond, rank, ranksv,
74 det, invlndet,
75
76 -- * Singular value decomposition
77 svd,
78 fullSVD,
79 thinSVD,
80 compactSVD,
81 singularValues,
82 leftSV, rightSV,
83
84 -- * Eigensystems
85 eig, eigSH, eigSH',
86 eigenvalues, eigenvaluesSH, eigenvaluesSH',
87 geigSH',
88
89 -- * QR
90 qr, rq, qrRaw, qrgr,
91
92 -- * Cholesky
93 chol, cholSH, mbCholSH,
94
95 -- * Hessenberg
96 hess,
97
98 -- * Schur
99 schur,
100
101 -- * LU
102 lu, luPacked,
103
104 -- * Matrix functions
105 expm,
106 sqrtm,
107 matFunc,
108
109 -- * Nullspace
110 nullspacePrec,
111 nullVector,
112 nullspaceSVD,
113 null1, null1sym,
114
115 orth,
116
117 -- * Norms
118 norm1, norm2, normInf, pnorm, NormType(..),
119
120 -- * Correlation and convolution
121 corr, conv, corrMin, corr2, conv2,
122
123 -- * Random arrays
124
125 RandDist(..), randomVector, rand, randn, gaussianSample, uniformSample,
126
127 -- * Misc
128 meanCov, peps, relativeError, haussholder, optimiseMult, udot, Seed, (◇)
129) where
130
131import Numeric.LinearAlgebra.Data
132
133import Numeric.Matrix()
134import Numeric.Vector()
135import Data.Packed.Numeric
136import Numeric.LinearAlgebra.Algorithms
137import Numeric.LinearAlgebra.Util
138import Numeric.LinearAlgebra.Random
139
140
141
diff --git a/packages/base/src/Numeric/LinearAlgebra/Data.hs b/packages/base/src/Numeric/LinearAlgebra/Data.hs
index 45fc00c..7e8af03 100644
--- a/packages/base/src/Numeric/LinearAlgebra/Data.hs
+++ b/packages/base/src/Numeric/LinearAlgebra/Data.hs
@@ -62,7 +62,7 @@ module Numeric.LinearAlgebra.Data(
62 62
63import Data.Packed.Vector 63import Data.Packed.Vector
64import Data.Packed.Matrix 64import Data.Packed.Matrix
65import Data.Packed.Numeric 65import Numeric.Container
66import Numeric.LinearAlgebra.Util 66import Numeric.LinearAlgebra.Util
67import Data.Complex 67import Data.Complex
68 68
diff --git a/packages/base/src/Numeric/LinearAlgebra/Devel.hs b/packages/base/src/Numeric/LinearAlgebra/Devel.hs
index b5ef60d..c41db2d 100644
--- a/packages/base/src/Numeric/LinearAlgebra/Devel.hs
+++ b/packages/base/src/Numeric/LinearAlgebra/Devel.hs
@@ -60,7 +60,7 @@ module Numeric.LinearAlgebra.Devel(
60import Data.Packed.Foreign 60import Data.Packed.Foreign
61import Data.Packed.Development 61import Data.Packed.Development
62import Data.Packed.ST 62import Data.Packed.ST
63import Data.Packed.Numeric(Container,Contraction,LSDiv,Product, 63import Numeric.Container(Container,Contraction,LSDiv,Product,
64 Complexable(),RealElement(), 64 Complexable(),RealElement(),
65 RealOf, ComplexOf, SingleOf, DoubleOf, IndexOf) 65 RealOf, ComplexOf, SingleOf, DoubleOf, IndexOf)
66import Data.Packed 66import Data.Packed
diff --git a/packages/base/src/Numeric/LinearAlgebra/Random.hs b/packages/base/src/Numeric/LinearAlgebra/Random.hs
index b36c7a3..7afd658 100644
--- a/packages/base/src/Numeric/LinearAlgebra/Random.hs
+++ b/packages/base/src/Numeric/LinearAlgebra/Random.hs
@@ -20,7 +20,7 @@ module Numeric.LinearAlgebra.Random (
20) where 20) where
21 21
22import Numeric.Vectorized 22import Numeric.Vectorized
23import Data.Packed.Numeric 23import Numeric.Container
24import Numeric.LinearAlgebra.Algorithms 24import Numeric.LinearAlgebra.Algorithms
25import System.Random(randomIO) 25import System.Random(randomIO)
26 26
diff --git a/packages/base/src/Numeric/LinearAlgebra/Util.hs b/packages/base/src/Numeric/LinearAlgebra/Util.hs
index 440f6d1..2f91e18 100644
--- a/packages/base/src/Numeric/LinearAlgebra/Util.hs
+++ b/packages/base/src/Numeric/LinearAlgebra/Util.hs
@@ -48,7 +48,7 @@ module Numeric.LinearAlgebra.Util(
48 vtrans 48 vtrans
49) where 49) where
50 50
51import Data.Packed.Numeric 51import Numeric.Container
52import Numeric.LinearAlgebra.Algorithms hiding (i) 52import Numeric.LinearAlgebra.Algorithms hiding (i)
53import Numeric.Matrix() 53import Numeric.Matrix()
54import Numeric.Vector() 54import Numeric.Vector()
diff --git a/packages/base/src/Numeric/LinearAlgebra/Util/Convolution.hs b/packages/base/src/Numeric/LinearAlgebra/Util/Convolution.hs
index 1d4e089..e4cba8f 100644
--- a/packages/base/src/Numeric/LinearAlgebra/Util/Convolution.hs
+++ b/packages/base/src/Numeric/LinearAlgebra/Util/Convolution.hs
@@ -16,7 +16,7 @@ module Numeric.LinearAlgebra.Util.Convolution(
16 corr2, conv2, separable 16 corr2, conv2, separable
17) where 17) where
18 18
19import Data.Packed.Numeric 19import Numeric.Container
20 20
21 21
22vectSS :: Element t => Int -> Vector t -> Matrix t 22vectSS :: Element t => Int -> Vector t -> Matrix t