summaryrefslogtreecommitdiff
path: root/lib/Numeric/LinearAlgebra/Tests/Instances.hs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Numeric/LinearAlgebra/Tests/Instances.hs')
-rw-r--r--lib/Numeric/LinearAlgebra/Tests/Instances.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Numeric/LinearAlgebra/Tests/Instances.hs b/lib/Numeric/LinearAlgebra/Tests/Instances.hs
index e7fecf2..677ad2b 100644
--- a/lib/Numeric/LinearAlgebra/Tests/Instances.hs
+++ b/lib/Numeric/LinearAlgebra/Tests/Instances.hs
@@ -1,4 +1,4 @@
1{-# OPTIONS #-} 1{-# LANGUAGE FlexibleContexts, UndecidableInstances #-}
2----------------------------------------------------------------------------- 2-----------------------------------------------------------------------------
3{- | 3{- |
4Module : Numeric.LinearAlgebra.Tests.Instances 4Module : Numeric.LinearAlgebra.Tests.Instances
@@ -71,7 +71,7 @@ instance (Field a, Arbitrary a) => Arbitrary (Rot a) where
71 71
72-- a complex hermitian or real symmetric matrix 72-- a complex hermitian or real symmetric matrix
73newtype (Her a) = Her (Matrix a) deriving Show 73newtype (Her a) = Her (Matrix a) deriving Show
74instance (Field a, Arbitrary a) => Arbitrary (Her a) where 74instance (Field a, Arbitrary a, Num (Vector a)) => Arbitrary (Her a) where
75 arbitrary = do 75 arbitrary = do
76 Sq m <- arbitrary 76 Sq m <- arbitrary
77 let m' = m/2 77 let m' = m/2
@@ -106,7 +106,7 @@ instance (Field a, Arbitrary a) => Arbitrary (SqWC a) where
106 106
107-- a positive definite square matrix (the eigenvalues are between 0 and 100) 107-- a positive definite square matrix (the eigenvalues are between 0 and 100)
108newtype (PosDef a) = PosDef (Matrix a) deriving Show 108newtype (PosDef a) = PosDef (Matrix a) deriving Show
109instance (Field a, Arbitrary a) => Arbitrary (PosDef a) where 109instance (Field a, Arbitrary a, Num (Vector a)) => Arbitrary (PosDef a) where
110 arbitrary = do 110 arbitrary = do
111 Her m <- arbitrary 111 Her m <- arbitrary
112 let (_,v) = eigSH m 112 let (_,v) = eigSH m