summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2007-09-19 08:59:32 +0000
committerAlberto Ruiz <aruiz@um.es>2007-09-19 08:59:32 +0000
commitf39ad090513e48fc2cbaf421c8b39fa3ca12a221 (patch)
treeb42f3b473034a301f11e25d82b902be2ce39db4f /lib
parente34d5566b9abfd235ce210f9f9909b23d52bd138 (diff)
minor changes
Diffstat (limited to 'lib')
-rw-r--r--lib/Data/Packed/Internal/Matrix.hs2
-rw-r--r--lib/Data/Packed/Matrix.hs4
-rw-r--r--lib/GSL/gsl-aux.c2
-rw-r--r--lib/LinearAlgebra/Interface.hs2
4 files changed, 5 insertions, 5 deletions
diff --git a/lib/Data/Packed/Internal/Matrix.hs b/lib/Data/Packed/Internal/Matrix.hs
index 951cec6..63ebddf 100644
--- a/lib/Data/Packed/Internal/Matrix.hs
+++ b/lib/Data/Packed/Internal/Matrix.hs
@@ -349,7 +349,7 @@ foreign import ccall safe "aux.h constantC"
349@> constant 2 7 349@> constant 2 7
3507 |> [2.0,2.0,2.0,2.0,2.0,2.0,2.0]@ 3507 |> [2.0,2.0,2.0,2.0,2.0,2.0,2.0]@
351-} 351-}
352constant :: Double -> Int -> Vector Double 352constant :: Field a => a -> Int -> Vector a
353constant = constantD 353constant = constantD
354 354
355-------------------------------------------------------------------------- 355--------------------------------------------------------------------------
diff --git a/lib/Data/Packed/Matrix.hs b/lib/Data/Packed/Matrix.hs
index 5a4b919..404fde7 100644
--- a/lib/Data/Packed/Matrix.hs
+++ b/lib/Data/Packed/Matrix.hs
@@ -27,7 +27,7 @@ module Data.Packed.Matrix (
27 subMatrix, takeRows, dropRows, takeColumns, dropColumns, 27 subMatrix, takeRows, dropRows, takeColumns, dropColumns,
28 ident, diag, diagRect, takeDiag, 28 ident, diag, diagRect, takeDiag,
29 liftMatrix, liftMatrix2, 29 liftMatrix, liftMatrix2,
30 dispR, readMatrix, fromArray2D 30 format, dispR, readMatrix, fromArray2D
31) where 31) where
32 32
33import Data.Packed.Internal 33import Data.Packed.Internal
@@ -95,7 +95,7 @@ takeDiag :: (Field t) => Matrix t -> Vector t
95takeDiag m = fromList [cdat m `at` (k*cols m+k) | k <- [0 .. min (rows m) (cols m) -1]] 95takeDiag m = fromList [cdat m `at` (k*cols m+k) | k <- [0 .. min (rows m) (cols m) -1]]
96 96
97-- | creates the identity matrix of given dimension 97-- | creates the identity matrix of given dimension
98ident :: Int -> Matrix Double 98ident :: Field a => Int -> Matrix a
99ident n = diag (constant 1 n) 99ident n = diag (constant 1 n)
100 100
101------------------------------------------------------------ 101------------------------------------------------------------
diff --git a/lib/GSL/gsl-aux.c b/lib/GSL/gsl-aux.c
index c2839a8..0e8406c 100644
--- a/lib/GSL/gsl-aux.c
+++ b/lib/GSL/gsl-aux.c
@@ -229,7 +229,7 @@ int mapValCAux(int code, gsl_complex* pval, KGCVEC(x), GCVEC(r)) {
229 OPV(2,gsl_complex_add(val,xp[k])) 229 OPV(2,gsl_complex_add(val,xp[k]))
230 OPV(3,gsl_complex_sub(val,xp[k])) 230 OPV(3,gsl_complex_sub(val,xp[k]))
231 OPV(4,gsl_complex_pow(val,xp[k])) 231 OPV(4,gsl_complex_pow(val,xp[k]))
232 OPV(5,gsl_complex_pow(val,xp[k])) 232 OPV(5,gsl_complex_pow(xp[k],val))
233 default: ERROR(BAD_CODE); 233 default: ERROR(BAD_CODE);
234 } 234 }
235} 235}
diff --git a/lib/LinearAlgebra/Interface.hs b/lib/LinearAlgebra/Interface.hs
index 7d6ff0f..0d2c0a0 100644
--- a/lib/LinearAlgebra/Interface.hs
+++ b/lib/LinearAlgebra/Interface.hs
@@ -47,7 +47,7 @@ infixl 7 <.>
47 47
48---------------------------------------------------- 48----------------------------------------------------
49 49
50-- | @x .* a = scale (recip x) v@ 50-- | @x .* a = scale x a@
51(.*) :: (Linear c a) => a -> c a -> c a 51(.*) :: (Linear c a) => a -> c a -> c a
52infixl 7 .* 52infixl 7 .*
53a .* x = scale a x 53a .* x = scale a x