summaryrefslogtreecommitdiff
path: root/lib/Numeric/LinearAlgebra/Tests.hs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Numeric/LinearAlgebra/Tests.hs')
-rw-r--r--lib/Numeric/LinearAlgebra/Tests.hs11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/Numeric/LinearAlgebra/Tests.hs b/lib/Numeric/LinearAlgebra/Tests.hs
index d7c3f99..097756e 100644
--- a/lib/Numeric/LinearAlgebra/Tests.hs
+++ b/lib/Numeric/LinearAlgebra/Tests.hs
@@ -131,6 +131,16 @@ rootFindingTest = TestList [ utest "root Hybrids" (fst sol1 ~~ [1,1])
131 131
132--------------------------------------------------------------------- 132---------------------------------------------------------------------
133 133
134randomTest = c :~1~: snd (meanCov dat) where
135 a = (3><3) [1,2,3,
136 2,4,0,
137 -2,2,1]
138 m = 3 |> [1,2,3]
139 c = a <> trans a
140 dat = gaussianSample 7 (10^6) m c
141
142---------------------------------------------------------------------
143
134rot :: Double -> Matrix Double 144rot :: Double -> Matrix Double
135rot a = (3><3) [ c,0,s 145rot a = (3><3) [ c,0,s
136 , 0,1,0 146 , 0,1,0
@@ -227,6 +237,7 @@ runTests n = do
227 , utest "polySolve" (polySolveProp [1,2,3,4]) 237 , utest "polySolve" (polySolveProp [1,2,3,4])
228 , minimizationTest 238 , minimizationTest
229 , rootFindingTest 239 , rootFindingTest
240 , utest "random" randomTest
230 ] 241 ]
231 return () 242 return ()
232 243