Search along a line for a minimum within an optimisation algorithm.
Search along a line for a minimum within an optimisation algorithm.
This is a version of the function in Numerical Recipes. It is initialized with a function value and gradient, and it does a series of quadratic searches until a convergence criterion is reached. This version includes code for display the progress of iteration for debugging purposes.