summaryrefslogtreecommitdiff
path: root/lib/Numeric/GSL/Minimization.hs
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2014-04-30 16:10:20 +0200
committerAlberto Ruiz <aruiz@um.es>2014-04-30 16:10:20 +0200
commitcf1379fed234cf99b2ccce6d9311bfc5c58ef4a3 (patch)
tree2532837500eb98af048404e33018fa88d8a7f535 /lib/Numeric/GSL/Minimization.hs
parentb8b7b47450a1007d4d8c77bb7d04e2744c3bfcd4 (diff)
improved documentation
Diffstat (limited to 'lib/Numeric/GSL/Minimization.hs')
-rw-r--r--lib/Numeric/GSL/Minimization.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Numeric/GSL/Minimization.hs b/lib/Numeric/GSL/Minimization.hs
index 7ccca81..1879dab 100644
--- a/lib/Numeric/GSL/Minimization.hs
+++ b/lib/Numeric/GSL/Minimization.hs
@@ -16,15 +16,15 @@ Minimization of a multidimensional function using some of the algorithms describ
16The example in the GSL manual: 16The example in the GSL manual:
17 17
18@ 18@
19
20f [x,y] = 10*(x-1)^2 + 20*(y-2)^2 + 30 19f [x,y] = 10*(x-1)^2 + 20*(y-2)^2 + 30
21 20
22main = do 21main = do
23 let (s,p) = minimize NMSimplex2 1E-2 30 [1,1] f [5,7] 22 let (s,p) = minimize NMSimplex2 1E-2 30 [1,1] f [5,7]
24 print s 23 print s
25 print p 24 print p
25@
26 26
27\> main 27>>> main
28[0.9920430849306288,1.9969168063253182] 28[0.9920430849306288,1.9969168063253182]
29 0.000 512.500 1.130 6.500 5.000 29 0.000 512.500 1.130 6.500 5.000
30 1.000 290.625 1.409 5.250 4.000 30 1.000 290.625 1.409 5.250 4.000
@@ -33,7 +33,6 @@ main = do
33 ... 33 ...
3422.000 30.001 0.013 0.992 1.997 3422.000 30.001 0.013 0.992 1.997
3523.000 30.001 0.008 0.992 1.997 3523.000 30.001 0.008 0.992 1.997
36@
37 36
38The path to the solution can be graphically shown by means of: 37The path to the solution can be graphically shown by means of:
39 38