From f39ad090513e48fc2cbaf421c8b39fa3ca12a221 Mon Sep 17 00:00:00 2001 From: Alberto Ruiz Date: Wed, 19 Sep 2007 08:59:32 +0000 Subject: minor changes --- lib/Data/Packed/Internal/Matrix.hs | 2 +- lib/Data/Packed/Matrix.hs | 4 ++-- lib/GSL/gsl-aux.c | 2 +- lib/LinearAlgebra/Interface.hs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'lib') 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" @> constant 2 7 7 |> [2.0,2.0,2.0,2.0,2.0,2.0,2.0]@ -} -constant :: Double -> Int -> Vector Double +constant :: Field a => a -> Int -> Vector a constant = constantD -------------------------------------------------------------------------- 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 ( subMatrix, takeRows, dropRows, takeColumns, dropColumns, ident, diag, diagRect, takeDiag, liftMatrix, liftMatrix2, - dispR, readMatrix, fromArray2D + format, dispR, readMatrix, fromArray2D ) where import Data.Packed.Internal @@ -95,7 +95,7 @@ takeDiag :: (Field t) => Matrix t -> Vector t takeDiag m = fromList [cdat m `at` (k*cols m+k) | k <- [0 .. min (rows m) (cols m) -1]] -- | creates the identity matrix of given dimension -ident :: Int -> Matrix Double +ident :: Field a => Int -> Matrix a ident n = diag (constant 1 n) ------------------------------------------------------------ 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)) { OPV(2,gsl_complex_add(val,xp[k])) OPV(3,gsl_complex_sub(val,xp[k])) OPV(4,gsl_complex_pow(val,xp[k])) - OPV(5,gsl_complex_pow(val,xp[k])) + OPV(5,gsl_complex_pow(xp[k],val)) default: ERROR(BAD_CODE); } } 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 <.> ---------------------------------------------------- --- | @x .* a = scale (recip x) v@ +-- | @x .* a = scale x a@ (.*) :: (Linear c a) => a -> c a -> c a infixl 7 .* a .* x = scale a x -- cgit v1.2.3