Skip to content

Commit

Permalink
Optim.minimizer(opt) — function API instead of fieldname
Browse files Browse the repository at this point in the history
  • Loading branch information
Changhyun Kwon committed Jan 20, 2017
1 parent 1989f6f commit 15c0bd3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chap7/linesearch.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ d_bar = [-1.0, 0.0]
opt = optimize( lambda -> f_line(x_bar, d_bar, lambda),
0.0, 1.0, GoldenSection())

println("optimal lambda = ", opt.minimizer)
println("optimal f(x+lambda*d) = ", opt.minimum)
println("optimal lambda = ", Optim.minimizer(opt))
println("optimal f(x+lambda*d) = ", Optim.minimum(opt))

0 comments on commit 15c0bd3

Please sign in to comment.