10 const int underflow_flag,
const dvector& xscale,
11 const double& _ln_det_proj_jac)
13 double& ln_det_proj_jac=(
double&) _ln_det_proj_jac;
23 cerr <<
"Error opening file admodel.hes" <<
endl;
32 cout <<
"the number of independent variables is wrong in admodel.hes"
42 cerr <<
"Error reading the hessian from file admodel.hes" <<
endl;
57 double minsize =
min(ss);
70 for (ii=i+1;ii<=nvar;ii++)
75 dmatrix tmpS(1,nvar-1,1,nvar-1);
85 for (i=1;i<=nvar-1;i++)
87 tmpS(i,i)=p1(i)*p1(i);
90 tmpS(i,j)=p1(i)*p1(j);
94 ln_det_proj_jac=
ln_det(tmpS,sgn);
103 for (ii=i+1;ii<=nvar;ii++)
108 for (i=1;i<=nvar;i++)
110 for (
int j=1;j<i;j++)
112 double tmp=(h(i,j)+h(j,i))/2.;
119 for (i=1;i<=nvar;i++)
121 for (
int j=1;j<=nvar;j++)
123 h(i,j)/=(xscale(i)*xscale(j));
131 for (
int j=1;j<i;j++)
141 cerr <<
"Error restricted Hessian is not positive definite" <<
endl;
double projected_hess_determinant(const dvector &g, const int underflow_flag, const dvector &xscale, const double &ln_det_proj_jac)
Vector of double precision numbers.
double norm(const d3_array &a)
Return computed norm value of a.
ivector sgn(const dvector &v)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
prnstream & endl(prnstream &)
Description not yet available.
Description not yet available.
double ln_det(const dmatrix &m1, int &sgn)
Compute log determinant of a constant matrix.
Description not yet available.