diff options
Diffstat (limited to 'lib/Numeric')
-rw-r--r-- | lib/Numeric/Container.hs | 16 | ||||
-rw-r--r-- | lib/Numeric/Conversion.hs | 6 | ||||
-rw-r--r-- | lib/Numeric/LinearAlgebra/Algorithms.hs | 1 | ||||
-rw-r--r-- | lib/Numeric/Matrix.hs | 5 |
4 files changed, 9 insertions, 19 deletions
diff --git a/lib/Numeric/Container.hs b/lib/Numeric/Container.hs index 1afc5a1..09f8002 100644 --- a/lib/Numeric/Container.hs +++ b/lib/Numeric/Container.hs | |||
@@ -22,7 +22,6 @@ | |||
22 | module Numeric.Container ( | 22 | module Numeric.Container ( |
23 | -- * Generic operations | 23 | -- * Generic operations |
24 | Container(..), | 24 | Container(..), |
25 | ctrans, diag, ident, | ||
26 | -- * Matrix product and related functions | 25 | -- * Matrix product and related functions |
27 | Product(..), | 26 | Product(..), |
28 | mXm,mXv,vXm, | 27 | mXm,mXv,vXm, |
@@ -222,21 +221,6 @@ instance (Container Vector a) => Container Matrix a where | |||
222 | 221 | ||
223 | ---------------------------------------------------- | 222 | ---------------------------------------------------- |
224 | 223 | ||
225 | -- | conjugate transpose | ||
226 | ctrans :: Element e => Matrix e -> Matrix e | ||
227 | ctrans = liftMatrix conjugateD . trans | ||
228 | |||
229 | -- | Creates a square matrix with a given diagonal. | ||
230 | diag :: (Num a, Element a) => Vector a -> Matrix a | ||
231 | diag v = diagRect 0 v n n where n = dim v | ||
232 | |||
233 | -- | creates the identity matrix of given dimension | ||
234 | ident :: (Num a, Element a) => Int -> Matrix a | ||
235 | ident n = diag (constantD 1 n) | ||
236 | |||
237 | ---------------------------------------------------- | ||
238 | |||
239 | |||
240 | -- | Matrix product and related functions | 224 | -- | Matrix product and related functions |
241 | class Element e => Product e where | 225 | class Element e => Product e where |
242 | -- | matrix product | 226 | -- | matrix product |
diff --git a/lib/Numeric/Conversion.hs b/lib/Numeric/Conversion.hs index fbf608a..8941451 100644 --- a/lib/Numeric/Conversion.hs +++ b/lib/Numeric/Conversion.hs | |||
@@ -7,15 +7,15 @@ | |||
7 | 7 | ||
8 | ----------------------------------------------------------------------------- | 8 | ----------------------------------------------------------------------------- |
9 | -- | | 9 | -- | |
10 | -- Module : Numeric.Container | 10 | -- Module : Numeric.Conversion |
11 | -- Copyright : (c) Alberto Ruiz 2007 | 11 | -- Copyright : (c) Alberto Ruiz 2010 |
12 | -- License : GPL-style | 12 | -- License : GPL-style |
13 | -- | 13 | -- |
14 | -- Maintainer : Alberto Ruiz <aruiz@um.es> | 14 | -- Maintainer : Alberto Ruiz <aruiz@um.es> |
15 | -- Stability : provisional | 15 | -- Stability : provisional |
16 | -- Portability : portable | 16 | -- Portability : portable |
17 | -- | 17 | -- |
18 | -- Numeric classes for containers of numbers, including conversion routines | 18 | -- Conversion routines |
19 | -- | 19 | -- |
20 | ----------------------------------------------------------------------------- | 20 | ----------------------------------------------------------------------------- |
21 | 21 | ||
diff --git a/lib/Numeric/LinearAlgebra/Algorithms.hs b/lib/Numeric/LinearAlgebra/Algorithms.hs index 394a1d7..64deba2 100644 --- a/lib/Numeric/LinearAlgebra/Algorithms.hs +++ b/lib/Numeric/LinearAlgebra/Algorithms.hs | |||
@@ -80,6 +80,7 @@ import Numeric.LinearAlgebra.LAPACK as LAPACK | |||
80 | import Data.List(foldl1') | 80 | import Data.List(foldl1') |
81 | import Data.Array | 81 | import Data.Array |
82 | import Numeric.Container hiding ((.*),(*/)) | 82 | import Numeric.Container hiding ((.*),(*/)) |
83 | import Numeric.MatrixBoot | ||
83 | 84 | ||
84 | -- | Auxiliary typeclass used to define generic computations for both real and complex matrices. | 85 | -- | Auxiliary typeclass used to define generic computations for both real and complex matrices. |
85 | class (Product t, | 86 | class (Product t, |
diff --git a/lib/Numeric/Matrix.hs b/lib/Numeric/Matrix.hs index 9260bd5..26d6d6b 100644 --- a/lib/Numeric/Matrix.hs +++ b/lib/Numeric/Matrix.hs | |||
@@ -28,6 +28,10 @@ module Numeric.Matrix ( | |||
28 | -- * Basic functions | 28 | -- * Basic functions |
29 | module Data.Packed.Matrix, | 29 | module Data.Packed.Matrix, |
30 | module Numeric.Vector, | 30 | module Numeric.Vector, |
31 | -- * Matrix creation | ||
32 | diag, ident, | ||
33 | -- * matrix operations | ||
34 | ctrans, | ||
31 | optimiseMult, | 35 | optimiseMult, |
32 | -- * Operators | 36 | -- * Operators |
33 | (<>), (<\>) | 37 | (<>), (<\>) |
@@ -38,6 +42,7 @@ module Numeric.Matrix ( | |||
38 | import Data.Packed.Matrix | 42 | import Data.Packed.Matrix |
39 | import Numeric.Vector | 43 | import Numeric.Vector |
40 | import Numeric.Chain | 44 | import Numeric.Chain |
45 | import Numeric.MatrixBoot | ||
41 | import Numeric.LinearAlgebra.Algorithms | 46 | import Numeric.LinearAlgebra.Algorithms |
42 | 47 | ||
43 | ------------------------------------------------------------------- | 48 | ------------------------------------------------------------------- |