summaryrefslogtreecommitdiff
path: root/lib/Numeric
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Numeric')
-rw-r--r--lib/Numeric/Container.hs16
-rw-r--r--lib/Numeric/Conversion.hs6
-rw-r--r--lib/Numeric/LinearAlgebra/Algorithms.hs1
-rw-r--r--lib/Numeric/Matrix.hs5
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 @@
22module Numeric.Container ( 22module 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
226ctrans :: Element e => Matrix e -> Matrix e
227ctrans = liftMatrix conjugateD . trans
228
229-- | Creates a square matrix with a given diagonal.
230diag :: (Num a, Element a) => Vector a -> Matrix a
231diag v = diagRect 0 v n n where n = dim v
232
233-- | creates the identity matrix of given dimension
234ident :: (Num a, Element a) => Int -> Matrix a
235ident n = diag (constantD 1 n)
236
237----------------------------------------------------
238
239
240-- | Matrix product and related functions 224-- | Matrix product and related functions
241class Element e => Product e where 225class 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
80import Data.List(foldl1') 80import Data.List(foldl1')
81import Data.Array 81import Data.Array
82import Numeric.Container hiding ((.*),(*/)) 82import Numeric.Container hiding ((.*),(*/))
83import 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.
85class (Product t, 86class (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 (
38import Data.Packed.Matrix 42import Data.Packed.Matrix
39import Numeric.Vector 43import Numeric.Vector
40import Numeric.Chain 44import Numeric.Chain
45import Numeric.MatrixBoot
41import Numeric.LinearAlgebra.Algorithms 46import Numeric.LinearAlgebra.Algorithms
42 47
43------------------------------------------------------------------- 48-------------------------------------------------------------------