diff options
author | Alberto Ruiz <aruiz@um.es> | 2007-09-28 07:37:49 +0000 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2007-09-28 07:37:49 +0000 |
commit | 74e7d42263b196c22d1f5da3d51beec69071600d (patch) | |
tree | 04dd5cd4ef4e22dfd114a6739c9ed39bdaf6f26b /examples/tests.hs | |
parent | 0198366bba7a5f2d67338633f9eb90889ffc31b2 (diff) |
save work
Diffstat (limited to 'examples/tests.hs')
-rw-r--r-- | examples/tests.hs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/examples/tests.hs b/examples/tests.hs index ec838ca..b542113 100644 --- a/examples/tests.hs +++ b/examples/tests.hs | |||
@@ -5,6 +5,9 @@ module Main where | |||
5 | import Data.Packed.Internal((>|<), fdat, cdat, multiply', multiplyG, MatrixOrder(..),debug) | 5 | import Data.Packed.Internal((>|<), fdat, cdat, multiply', multiplyG, MatrixOrder(..),debug) |
6 | import GSL hiding (sin,cos,exp,choose) | 6 | import GSL hiding (sin,cos,exp,choose) |
7 | import LinearAlgebra | 7 | import LinearAlgebra |
8 | import LinearAlgebra.Linear(Linear) | ||
9 | import LAPACK | ||
10 | import GSL.Matrix | ||
8 | import Test.QuickCheck hiding (test) | 11 | import Test.QuickCheck hiding (test) |
9 | import Test.HUnit hiding ((~:),test) | 12 | import Test.HUnit hiding ((~:),test) |
10 | import System.Random(randomRs,mkStdGen) | 13 | import System.Random(randomRs,mkStdGen) |
@@ -263,6 +266,10 @@ gammaTest = test "gamma" (gamma 5 == 24.0) | |||
263 | 266 | ||
264 | --------------------------------------------------------------------- | 267 | --------------------------------------------------------------------- |
265 | 268 | ||
269 | cholRTest = chol ((2><2) [1,2,2,9::Double]) == (2><2) [1,0,2,2.23606797749979] | ||
270 | |||
271 | --------------------------------------------------------------------- | ||
272 | |||
266 | asFortran m = (rows m >|< cols m) $ toList (fdat m) | 273 | asFortran m = (rows m >|< cols m) $ toList (fdat m) |
267 | asC m = (rows m >< cols m) $ toList (cdat m) | 274 | asC m = (rows m >< cols m) $ toList (cdat m) |
268 | 275 | ||
@@ -331,6 +338,7 @@ tests = do | |||
331 | , integrateTest | 338 | , integrateTest |
332 | , polySolveTest | 339 | , polySolveTest |
333 | , test "det" detTest | 340 | , test "det" detTest |
341 | , test "cholR" cholRTest | ||
334 | ] | 342 | ] |
335 | 343 | ||
336 | bigtests = do | 344 | bigtests = do |