summaryrefslogtreecommitdiff
path: root/lib/Numeric/LinearAlgebra/Tests.hs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Numeric/LinearAlgebra/Tests.hs')
-rw-r--r--lib/Numeric/LinearAlgebra/Tests.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Numeric/LinearAlgebra/Tests.hs b/lib/Numeric/LinearAlgebra/Tests.hs
index 83f581f..464ed27 100644
--- a/lib/Numeric/LinearAlgebra/Tests.hs
+++ b/lib/Numeric/LinearAlgebra/Tests.hs
@@ -109,13 +109,13 @@ expmTest2 = expm nd2 :~15~: (2><2)
109 109
110--------------------------------------------------------------------- 110---------------------------------------------------------------------
111 111
112minimizationTest = TestList [ utest "minimization conj grad" (minim1 f df [5,7] ~~ [1,2]) 112minimizationTest = TestList [ utest "minimization conjugatefr" (minim1 f df [5,7] ~~ [1,2])
113 , utest "minimization bg2" (minim2 f df [5,7] ~~ [1,2]) 113 , utest "minimization nmsimplex2" (minim2 f [5,7] == 24)
114 ] 114 ]
115 where f [x,y] = 10*(x-1)^2 + 20*(y-2)^2 + 30 115 where f [x,y] = 10*(x-1)^2 + 20*(y-2)^2 + 30
116 df [x,y] = [20*(x-1), 40*(y-2)] 116 df [x,y] = [20*(x-1), 40*(y-2)]
117 minim1 g dg ini = fst $ minimizeConjugateGradient 1E-2 1E-4 1E-3 30 g dg ini 117 minim1 g dg ini = fst $ minimizeD ConjugateFR 1E-3 30 1E-2 1E-4 g dg ini
118 minim2 g dg ini = fst $ minimizeVectorBFGS2 1E-2 1E-2 1E-3 30 g dg ini 118 minim2 g ini = rows $ snd $ minimize NMSimplex2 1E-2 30 [1,1] g ini
119 119
120--------------------------------------------------------------------- 120---------------------------------------------------------------------
121 121