22 int mmin=variance_components_vector->indexmin();
23 int mmax=variance_components_vector->indexmax();
28 cerr <<
"error -- Has not been impelmented" <<
endl;
32 if (Hess_components==0)
34 int umin=Hess.indexmin();
35 int umax=Hess.indexmax();
36 tmpHess=
new dmatrix(umin,umax,umin,umax);
37 Hess_components=
new d3_array(mmin,mmax,umin,umax,umin,umax);
38 if (tmpHess==0 || Hess_components==0)
40 cerr <<
"error allocating memory" <<
endl;
48 for (
int i=1;i<=nvar;i++) y(i)=
x(i);
49 step=get_newton_raphson_info_banded(pfmin);
54 cerr <<
"Illegal value for hesstype here" <<
endl;
61 vsave=
value(*variance_components_vector);
62 for(
int ic=mmin;ic<=mmax;ic++)
64 (*variance_components_vector)(ic)+=0.2;
76 cerr <<
"Illegal value for hesstype here" <<
endl;
85 for (
int i=1;i<=nvar;i++) y(i)=
x(i);
86 step=get_newton_raphson_info_banded(pfmin);
91 cerr <<
"error -- Has not been impelmented" <<
endl;
98 throw std::bad_alloc();
104 (*Hess_components)(ic)= (Hess-*tmpHess)/0.2;
109 exp(-2.0*
value(*variance_components_vector)(ic));
110 (*Hess_components)(ic)= (Hess-*tmpHess)/(dfp-df0(ic));
112 (*variance_components_vector)(ic)-=0.2;
116 cerr <<
"Illegal value for hesstype here" <<
endl;
120 *variance_components_vector=vsave;
130 int mmin=variance_components_vector->
indexmin();
131 int mmax=variance_components_vector->indexmax();
138 int umin=Hess.indexmin();
139 int umax=Hess.indexmax();
145 cerr <<
"error -- Has not been impelmented" <<
endl;
150 for(
int ic=mmin;ic<=mmax;ic++)
155 (*variance_components_vector)(ic)*((*Hess_components)(ic));
159 vHess+=
exp(-2.0*(*variance_components_vector)(ic))*
160 ((*Hess_components)(ic));
166 cerr <<
"Illegal value for hesstype here" <<
endl;
191 dvector g=get_gradient_lme(pfmin);
198 dvar_matrix vHess=get_hessian_from_components_lme(pfmin);
208 cerr <<
"sgn sucks" <<
endl;
210 int mmin=variance_components_vector->indexmin();
211 int mmax=variance_components_vector->indexmax();
219 double maxg=
max(
fabs(get_gradient_lme(uhat,pfmin)));
222 cout <<
"max g = " << std::scientific << setprecision(10) << maxg <<
endl;
226 dvector g2=get_gradient_lme_hp(f2,pfmin);
254 double f =
value(vf);
281 double f =
value(vf);
static void reset_all(const dvector &)
Description not yet available.
virtual void AD_uf_inner()
static void set_no_derivatives(void)
static void set_NO_DERIVATIVES(void)
Disable accumulation of derivative information.
Description not yet available.
dvector get_gradient_lme(const dvector &x, function_minimizer *pfmin)
Description not yet available.
#define ADUNCONST(type, obj)
Creates a shallow copy of obj that is not CONST.
Vector of double precision numbers.
static void xinit_all(const dvector &x)
Description not yet available.
void initialize(void)
Zero initialize allocated dvar_matrix, then saves adjoint function and position data.
void get_hessian_components_banded_lme(function_minimizer *pfmin)
Description not yet available.
dvar_matrix get_hessian_from_components_lme(function_minimizer *pfmin)
Description not yet available.
dvector get_gradient_lme_hp(const double &x, function_minimizer *pfmin)
Description not yet available.
df1_two_variable fabs(const df1_two_variable &x)
static dvariable reset(const dvar_vector &x)
dvector banded_calculations_lme(const dvector &_x, const double &_f, function_minimizer *pfmin)
Description not yet available.
static void restore_start_phase(void)
void gradcalc(int nvar, const dvector &g)
ivector sgn(const dvector &v)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
dvector solve(const dmatrix &aa, const dvector &z)
Solve a linear system using LU decomposition.
prnstream & endl(prnstream &)
Description not yet available.
static void set_active_only_random_effects(void)
static objective_function_value * pobjfun
Description not yet available.
static void xinit(const dvector &x)
d3_array exp(const d3_array &arr3)
Returns d3_array results with computed exp from elements in arr3.
static int nvarcalc_all(void)
Description not yet available.
static void set_inactive_random_effects(void)
Description not yet available.
Class definition of matrix with derivitive information .
Description not yet available.
Description not yet available.
void reset_gradient_stack(void)
Rewind buffer.
static void set_YES_DERIVATIVES(void)
Enable accumulation of derivative information.
dvector value(const df1_one_vector &v)
Description not yet available.
static double fun_without_pen
Fundamental data type for reverse mode automatic differentiation.
static void set_inactive_only_random_effects(void)