16 #define ISZERO(d) ((d)==0.0)
47 cerr <<
"illegal value for number of steps in limited memory"
48 " quasi-newton method -- set equal to 10" <<
endl;
70 cerr <<
"Usage -crit option needs number -- ignored" <<
endl;
78 cerr <<
"Usage -crit option needs positive number -- ignored" <<
endl;
86 if (!(!convergence_criteria))
97 if (!(!maximum_function_evaluations) && !maxfn_option)
99 int ind=
min(maximum_function_evaluations.
indexmax(),
144 #if defined(USE_DDOUBLE)
146 if(fmod(
double(itn),
double(iprint)) == 0)
147 #define double dd_real
149 if(fmod(
double(itn),
double(iprint)) == 0)
160 ad_printf(
"\nIntermediate statistics: ");
163 ad_printf(
"%d variables; iteration %ld; function evaluation %ld\n",
171 "Function value %12.4le; maximum gradient component mag %12.4le\n",
176 double xf=
value(fbest);
179 "Function value %12.4le; maximum gradient component mag %12.4le\n",
192 xlbfgs_(&nvar, &m, x , f, g, &diagco, diag,
193 iprintx, &crit, &xtol, w, &iflag,&itn);
207 cout <<
"Exceeded maxiter" <<
endl;
223 ad_printf(
"%d variables; iteration %ld; function evaluation %ld\n",
226 "Function value %12.4le; maximum gradient component mag %12.4le\n",
244 cout << i <<
" " << v(i) <<
endl;
void fmmdisp(const dvector &x, const dvector &g, const int &nvar, int scroll_flag, int noprintx)
Description not yet available.
dvector eigenvalues(const banded_symmetric_dmatrix &_SS)
Description not yet available.
Vector of double precision numbers.
int indexmin() const
Get minimum valid index.
dvariable random_effects_maximization(const dvar_vector &v)
virtual dvar_vector user_dfrandeff(const dvar_vector &x)
ivector sgn(const dvector &v)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
dmatrix symmetrize(const dmatrix &matrix)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
prnstream & endl(prnstream &)
dmatrix eigenvectors(const banded_symmetric_dmatrix &_SS, const dvector &_e)
Description not yet available.
static dvector maximum_function_evaluations
int indexmax() const
Get maximum valid index.
Description not yet available.
Description not yet available.
int xlbfgs_(integer *n, integer *m, dvar_vector &x, dvariable &f, dvar_vector &g, logical *diagco, dvar_vector &diag, integer *iprint, double *eps, double *xtol, dvar_vector &w, integer *iflag, integer *iter)
double ln_det(const dmatrix &m1, int &sgn)
Compute log determinant of a constant matrix.
int option_match(int argc, char *argv[], const char *string)
Checks if the program has been invoked with a particular command line argument ("string").
virtual dvar_matrix user_d2frandeff(const dvar_vector &x)
Class definition of matrix with derivitive information .
virtual dvariable user_randeff(const dvar_vector &x)
static void set_YES_DERIVATIVES(void)
Enable accumulation of derivative information.
void initialize(const dvector &ww)
Description not yet available.
dvector value(const df1_one_vector &v)
static dvector convergence_criteria
Fundamental data type for reverse mode automatic differentiation.
int ad_printf(FILE *stream, const char *format, Args...args)