gonum/optimize — pull request #17 by vladimir-ch (2014-12-05 02:02:50+00:00)
Title: Add sanity checks to Bisection and Backtracking

* Add sanity checks to Bisection and Backtracking
* Make the test for descent direction in linesearch.go stricter and consistent with Bisection and Backtracking
* Fix some typos

The change from projGrad > 0 to a stricter projGrad >= 0 should definitely be done. This condition is tested in linesearch.go immediately after getting a new direction from NextDirectioner. I think that NextDirectioners should simply try everything possible not to return non-descent directions.

The tests pass.