Scythe-1.0.3
template<matrix_order RO, matrix_style RS, typename T , matrix_order PO, matrix_style PS, typename FUNCTOR , typename RNGTYPE >
Matrix<T,RO,RS> scythe::BFGS ( FUNCTOR  fun,
const Matrix< T, PO, PS > &  theta,
rng< RNGTYPE > &  runif,
unsigned int  maxit,
tolerance,
bool  trace = false 
)

Find function minimum using the BFGS algorithm.

Numerically find the minimum of a function using the BFGS algorithm.

Parameters:
funThe function to minimize. This function should take one Matrix (vector) argument of type T and return a single value of type T.
thetaA column vector of parameter values that anchor the 1-dimensional function.
runifA random uniform number generator function object (an object that returns a random uniform variate on (0,1) when its () operator is invoked).
maxitThe maximum number of iterations.
toleranceThe convergence tolerance.
traceBoolean value determining whether BFGS should print to stdout (defaults to false).
See also:
linesearch1(FUNCTOR fun, const Matrix<T,PO1,PS1>& theta, const Matrix<T,PO2,PS2>& p)
linesearch2(FUNCTOR fun, const Matrix<T,PO1,PS1>& theta, const Matrix<T,PO2,PS2>& p, rng<RNGTYPE>& runif)
zoom(FUNCTOR fun, T alpha_lo, T alpha_hi, const Matrix<T,PO1,PS1>& theta, const Matrix<T,PO2,PS2>& p)
Exceptions:
scythe_dimension_error(Level 1)
scythe_convergence_error(Level 0)
Note:
Users will typically wish to implement fun in terms of a functor. Using a functor provides a generic way in which to evaluate functions with more than one parameter. Furthermore, although one can pass a function pointer to this routine, the compiler cannot inline and fully optimize code referenced by function pointers.

References gradfdif(), hesscdif(), inv(), scythe::Matrix_base< ORDER, STYLE >::isColVector(), linesearch2(), SCYTHE_CHECK_10, scythe::Matrix_base< ORDER, STYLE >::size(), and t().