The Fletcher-Reeves conjugate gradient algorithm gsl_multimin_fminimizer_conjugate_fr. This is the example in the GSL manual:
minimize = minimizeConjugateGradient 1E-2 1E-4 1E-3 30
f [x,y] = 10*(x-1)^2 + 20*(y-2)^2 + 30
df [x,y] = [20*(x-1), 40*(y-2)]
main = do
let (s,p) = minimize f df [5,7]
print s
print p
> main
[1.0,2.0]
0. 687.848 4.996 6.991
1. 683.555 4.989 6.972
2. 675.013 4.974 6.935
3. 658.108 4.944 6.861
4. 625.013 4.885 6.712
5. 561.684 4.766 6.415
6. 446.467 4.528 5.821
7. 261.794 4.053 4.632
8. 75.498 3.102 2.255
9. 67.037 2.852 1.630
10. 45.316 2.191 1.762
11. 30.186 0.869 2.026
12. 30. 1. 2. The path to the solution can be graphically shown by means of:
GSL.Plot.mplot $ drop 2 (toColumns p) |