summaryrefslogtreecommitdiff
path: root/examples/tests.hs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/tests.hs')
-rw-r--r--examples/tests.hs8
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
5import Data.Packed.Internal((>|<), fdat, cdat, multiply', multiplyG, MatrixOrder(..),debug) 5import Data.Packed.Internal((>|<), fdat, cdat, multiply', multiplyG, MatrixOrder(..),debug)
6import GSL hiding (sin,cos,exp,choose) 6import GSL hiding (sin,cos,exp,choose)
7import LinearAlgebra 7import LinearAlgebra
8import LinearAlgebra.Linear(Linear)
9import LAPACK
10import GSL.Matrix
8import Test.QuickCheck hiding (test) 11import Test.QuickCheck hiding (test)
9import Test.HUnit hiding ((~:),test) 12import Test.HUnit hiding ((~:),test)
10import System.Random(randomRs,mkStdGen) 13import System.Random(randomRs,mkStdGen)
@@ -263,6 +266,10 @@ gammaTest = test "gamma" (gamma 5 == 24.0)
263 266
264--------------------------------------------------------------------- 267---------------------------------------------------------------------
265 268
269cholRTest = chol ((2><2) [1,2,2,9::Double]) == (2><2) [1,0,2,2.23606797749979]
270
271---------------------------------------------------------------------
272
266asFortran m = (rows m >|< cols m) $ toList (fdat m) 273asFortran m = (rows m >|< cols m) $ toList (fdat m)
267asC m = (rows m >< cols m) $ toList (cdat m) 274asC 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
336bigtests = do 344bigtests = do