gonum/optimize — pull request #13 by vladimir-ch (2014-12-02 10:28:08+00:00)
Title: Redesign stepsizers

While the recent discussion about StepSizers is fresh, this PR is a proposal to change how the initial step size computation is handled.

Nice points:
* Calls to StepSizer.StepSize(...) are handled at a single place, in Linesearch struct.
* NextDirectioner handles only the computation of the next search direction, just how its name suggests.
* StepSizer gets the previously accepted step size that can be used in the estimation of the new step size. This is demonstrated in ApproximateStepSize (not supposed to be robust at this point; and the name is just a temporary placeholder).
* Repeated computation of projGrad is avoided.