diff options
author | Alberto Ruiz <aruiz@um.es> | 2009-06-10 10:42:49 +0000 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2009-06-10 10:42:49 +0000 |
commit | 17b4295ce3927a1cda9b1fdb282318c92bc374cd (patch) | |
tree | 9ba4fe59f6786869d7399db73d2700a8797d23c3 /lib/Numeric | |
parent | 5b737a80a094eb7094343aa4ec890b49acd4252f (diff) |
nmsimplex test compat
Diffstat (limited to 'lib/Numeric')
-rw-r--r-- | lib/Numeric/LinearAlgebra/Tests.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Numeric/LinearAlgebra/Tests.hs b/lib/Numeric/LinearAlgebra/Tests.hs index 464ed27..d7c3f99 100644 --- a/lib/Numeric/LinearAlgebra/Tests.hs +++ b/lib/Numeric/LinearAlgebra/Tests.hs | |||
@@ -109,9 +109,10 @@ expmTest2 = expm nd2 :~15~: (2><2) | |||
109 | 109 | ||
110 | --------------------------------------------------------------------- | 110 | --------------------------------------------------------------------- |
111 | 111 | ||
112 | minimizationTest = TestList [ utest "minimization conjugatefr" (minim1 f df [5,7] ~~ [1,2]) | 112 | minimizationTest = TestList |
113 | , utest "minimization nmsimplex2" (minim2 f [5,7] == 24) | 113 | [ utest "minimization conjugatefr" (minim1 f df [5,7] ~~ [1,2]) |
114 | ] | 114 | , utest "minimization nmsimplex2" (minim2 f [5,7] `elem` [24,25]) |
115 | ] | ||
115 | where f [x,y] = 10*(x-1)^2 + 20*(y-2)^2 + 30 | 116 | where f [x,y] = 10*(x-1)^2 + 20*(y-2)^2 + 30 |
116 | df [x,y] = [20*(x-1), 40*(y-2)] | 117 | df [x,y] = [20*(x-1), 40*(y-2)] |
117 | minim1 g dg ini = fst $ minimizeD ConjugateFR 1E-3 30 1E-2 1E-4 g dg ini | 118 | minim1 g dg ini = fst $ minimizeD ConjugateFR 1E-3 30 1E-2 1E-4 g dg ini |