Skip to content

Commit

Permalink
Fix bug in direction reset in cg.jl. (#229)
Browse files Browse the repository at this point in the history
  • Loading branch information
pkofod committed Jun 20, 2016
1 parent 5c9dde8 commit e8e75a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ function optimize{T}(df::DifferentiableFunction,
@inbounds s[i] = -pg[i]
end
dphi0 = vecdot(g, s)
if dphi0 < 0
if dphi0 >= 0
break
end
end
Expand Down

0 comments on commit e8e75a8

Please sign in to comment.