br_min, br_mid, br_max, num_evals] = minbrack(f, a, b, fa)
finds a bracket of three points around a local minimum of
f. The function f must have a one dimensional domain.
a < b is an initial guess at the minimum and maximum points
of a bracket, but minbrack will search outside this interval if
necessary. The bracket consists of three points (in increasing order)
such that f(br_mid) < f(br_min) and f(br_mid) < f(br_max).
fa is the value of the function at a: it is included to
avoid unnecessary function evaluations in the optimization routines.
The return value num_evals is the number of function evaluations
in minbrack.
minbrack(f, a, b, fa, p1, p2, ...) allows additional
arguments to be passed to f
f in the direction sd can be found in linemin
[min, mid, max, nevals]] = minbrack('linef', 0.0, 1.0, fa, f, pt, dir);
where the function linef is used to turn a general function f
into a one dimensional one.
linemin, linefCopyright (c) Christopher M Bishop, Ian T Nabney (1996, 1997)