Skip to content

Commit

Permalink
Merge pull request #747 from KelkooGroup/master
Browse files Browse the repository at this point in the history
throw exception as soon as t is NaN
  • Loading branch information
dlwh authored Jul 27, 2019
2 parents 8129f6f + 3207601 commit 1dbf3f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ scala:
- 2.12.8
- 2.13.0
jdk:
- oraclejdk11
dist: trusty
- openjdk11
before_install:
- sudo apt-get update -qq
Expand Down
2 changes: 2 additions & 0 deletions math/src/main/scala/breeze/optimize/StrongWolfe.scala
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ class StrongWolfeLineSearch(maxZoomIter: Int, maxLineSearchIter: Int) extends Cu
"Line search t: " + t + " fval: " + c.fval +
" rhs: " + (fval + c1 * c.t * dd) + " cdd: " + c.dd)

if (t.isNaN) throw new FirstOrderException(s"Line search zoom failed")

///////////////
/// Update left or right bracket, or both

Expand Down

0 comments on commit 1dbf3f8

Please sign in to comment.