summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2007-09-28 07:37:49 +0000
committerAlberto Ruiz <aruiz@um.es>2007-09-28 07:37:49 +0000
commit74e7d42263b196c22d1f5da3d51beec69071600d (patch)
tree04dd5cd4ef4e22dfd114a6739c9ed39bdaf6f26b /examples
parent0198366bba7a5f2d67338633f9eb90889ffc31b2 (diff)
save work
Diffstat (limited to 'examples')
-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