From faeaf6d261b760e628c1e63551d822d16876c0cc Mon Sep 17 00:00:00 2001 From: Alberto Ruiz Date: Wed, 22 Oct 2008 12:59:18 +0000 Subject: -Wall --- lib/Numeric/LinearAlgebra/Tests/Instances.hs | 6 +++--- lib/Numeric/LinearAlgebra/Tests/Properties.hs | 15 +++++++-------- 2 files changed, 10 insertions(+), 11 deletions(-) (limited to 'lib/Numeric/LinearAlgebra/Tests') diff --git a/lib/Numeric/LinearAlgebra/Tests/Instances.hs b/lib/Numeric/LinearAlgebra/Tests/Instances.hs index 677ad2b..4e829d2 100644 --- a/lib/Numeric/LinearAlgebra/Tests/Instances.hs +++ b/lib/Numeric/LinearAlgebra/Tests/Instances.hs @@ -30,9 +30,9 @@ import Control.Monad(replicateM) instance (Arbitrary a, RealFloat a) => Arbitrary (Complex a) where arbitrary = do - r <- arbitrary - i <- arbitrary - return (r:+i) + re <- arbitrary + im <- arbitrary + return (re :+ im) coarbitrary = undefined chooseDim = sized $ \m -> choose (1,max 1 m) diff --git a/lib/Numeric/LinearAlgebra/Tests/Properties.hs b/lib/Numeric/LinearAlgebra/Tests/Properties.hs index 5663b86..b5321c2 100644 --- a/lib/Numeric/LinearAlgebra/Tests/Properties.hs +++ b/lib/Numeric/LinearAlgebra/Tests/Properties.hs @@ -39,11 +39,10 @@ module Numeric.LinearAlgebra.Tests.Properties ( ) where import Numeric.LinearAlgebra -import Numeric.LinearAlgebra.Tests.Instances(Sq(..),Her(..),Rot(..)) import Test.QuickCheck -import Debug.Trace +-- import Debug.Trace -debug x = trace (show x) x +-- debug x = trace (show x) x -- relative error dist :: (Normed t, Num t) => t -> t -> Double @@ -77,7 +76,7 @@ hermitian m = square m && m |~| ctrans m wellCond m = rcond m > 1/100 positiveDefinite m = minimum (toList e) > 0 - where (e,v) = eigSH m + where (e,_v) = eigSH m upperTriang m = rows m == 1 || down == z where down = fromList $ concat $ zipWith drop [1..] (toLists (ctrans m)) @@ -107,8 +106,8 @@ pinvProp m = m <> p <> m |~| m detProp m = s d1 |~| s d2 where d1 = det m - d2 = det' m * det q - det' m = product $ toList $ takeDiag r + d2 = det' * det q + det' = product $ toList $ takeDiag r (q,r) = qr m s x = fromList [x] @@ -147,10 +146,10 @@ schurProp2 m = m |~| u <> s <> ctrans u && unitary u && upperHessenberg s -- fix cholProp m = m |~| ctrans c <> c && upperTriang c where c = chol m - pos = positiveDefinite m + -- pos = positiveDefinite m expmDiagProp m = expm (logm m) :~ 7 ~: complex m - where logm m = matFunc log m + where logm = matFunc log multProp1 (a,b) = a <> b |~| mulH a b -- cgit v1.2.3