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