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