summaryrefslogtreecommitdiff
path: root/lib/Numeric
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Numeric')
-rw-r--r--lib/Numeric/LinearAlgebra/Tests.hs9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Numeric/LinearAlgebra/Tests.hs b/lib/Numeric/LinearAlgebra/Tests.hs
index 097756e..4495396 100644
--- a/lib/Numeric/LinearAlgebra/Tests.hs
+++ b/lib/Numeric/LinearAlgebra/Tests.hs
@@ -131,7 +131,7 @@ rootFindingTest = TestList [ utest "root Hybrids" (fst sol1 ~~ [1,1])
131 131
132--------------------------------------------------------------------- 132---------------------------------------------------------------------
133 133
134randomTest = c :~1~: snd (meanCov dat) where 134randomTestGaussian = c :~1~: snd (meanCov dat) where
135 a = (3><3) [1,2,3, 135 a = (3><3) [1,2,3,
136 2,4,0, 136 2,4,0,
137 -2,2,1] 137 -2,2,1]
@@ -139,6 +139,10 @@ randomTest = c :~1~: snd (meanCov dat) where
139 c = a <> trans a 139 c = a <> trans a
140 dat = gaussianSample 7 (10^6) m c 140 dat = gaussianSample 7 (10^6) m c
141 141
142randomTestUniform = c :~1~: snd (meanCov dat) where
143 c = diag $ 3 |> map ((/12).(^2)) [1,2,3]
144 dat = uniformSample 7 (10^6) [(0,1),(1,3),(3,6)]
145
142--------------------------------------------------------------------- 146---------------------------------------------------------------------
143 147
144rot :: Double -> Matrix Double 148rot :: Double -> Matrix Double
@@ -237,7 +241,8 @@ runTests n = do
237 , utest "polySolve" (polySolveProp [1,2,3,4]) 241 , utest "polySolve" (polySolveProp [1,2,3,4])
238 , minimizationTest 242 , minimizationTest
239 , rootFindingTest 243 , rootFindingTest
240 , utest "random" randomTest 244 , utest "randomGaussian" randomTestGaussian
245 , utest "randomUniform" randomTestUniform
241 ] 246 ]
242 return () 247 return ()
243 248