Skip to content

Commit 045e126

Browse files
committed
Disable the flatness check in HZ
This may cause problems of its own, but for the time being it's better than the status quo. Fixes #173 Closes #174 Fixes #175
1 parent 6c576e5 commit 045e126

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/hagerzhang.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -285,14 +285,14 @@ function (ls::HagerZhang)(ϕ, ϕdϕ,
285285
if display & LINESEARCH > 0
286286
println("Linesearch: secant succeeded")
287287
end
288-
if nextfloat(values[ia]) >= values[ib] && nextfloat(values[iA]) >= values[iB]
289-
# It's so flat, secant didn't do anything useful, time to quit
290-
if display & LINESEARCH > 0
291-
println("Linesearch: secant suggests it's flat")
292-
end
293-
mayterminate[] = false # reset in case another initial guess is used next
294-
return A, values[iA]
295-
end
288+
# if nextfloat(values[ia]) >= values[ib] && nextfloat(values[iA]) >= values[iB]
289+
# # It's so flat, secant didn't do anything useful, time to quit
290+
# if display & LINESEARCH > 0
291+
# println("Linesearch: secant suggests it's flat")
292+
# end
293+
# mayterminate[] = false # reset in case another initial guess is used next
294+
# return A, values[iA]
295+
# end
296296
ia = iA
297297
ib = iB
298298
else

0 commit comments

Comments
 (0)