24 int tmp_nvar = 0, tmp_ndvar = 0;
25 cif >> tmp_nvar >> tmp_ndvar;
28 cerr <<
" tmp_nvar != nvar1 in file " << tmpstring
36 dmatrix uhat_prime(1,us,1,nvar);
46 ifs1 >> usize >> xsize;
49 cerr <<
"Error reading from file " << tmpstring <<
endl;
53 if (xsize !=nvar ||usize !=us)
55 cerr <<
"size error in file " << tmpstring <<
endl;
62 cerr <<
"Error reading from file " << tmpstring <<
endl;
71 cerr <<
"error in sizes in mod_sd" <<
endl;
76 cerr <<
"error in sizes in mod_sd" <<
endl;
85 for (
int i=mmin;i<=mmax;i++)
96 for (
int j=rmin;j<=rmax;j++)
98 for (
int k=cmin;k<=cmax;k++)
111 int cmin=uhat_prime(rmin).
indexmin();
112 int cmax=uhat_prime(rmin).
indexmax();
113 for (
int i=rmin;i<=rmax;i++)
115 for (
int j=cmin;j<=cmax;j++)
117 uhat_prime(i,j)*=scale(j);
140 for (
int i=mmin;i<=mmax;i++)
148 for (
int j=rmin;j<=rmax;j++)
150 for (
int k=rmin;k<=rmax;k++)
156 Suu(j1,k1)-=tmp(j,k);
160 Suu(j1,k1)+=tmp(j,k);
170 scale(xsize+1,Bnvar)=1.0;
172 for (
int i=1;i<=xsize;i++)
174 for (
int j=1;j<=xsize;j++)
180 for (
int i=xsize+1;i<=Bnvar;i++)
182 for (
int j=1;j<=xsize;j++)
184 BS(i,j)=Sux(i-xsize,j);
189 for (
int i=xsize+1;i<=Bnvar;i++)
191 for (
int j=xsize+1;j<=Bnvar;j++)
193 BS(i,j)=Suu(i-xsize,j-xsize);
laplace_approximation_calculator * lapprox
void deallocate()
Deallocate dmatrix memory.
imatrix * block_diagonal_re_list
dmatrix trans(const dmatrix &m1)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
int allocated(const ivector &v)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Vector of double precision numbers.
imatrix * block_diagonal_fe_list
d3_array * block_diagonal_Dux
static adstring adprogram_name
prnstream & endl(prnstream &)
Description not yet available.
void get_bigS(int ndvar, int nvar1, int nvar, dmatrix &S, dmatrix &BS, dvector &scale)
Description not yet available.
Description not yet available.
static int saddlepointflag
d3_array * block_diagonal_hessian
Description not yet available.
Description not yet available.
Description not yet available.
void initialize(void)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
static unsigned int wd_flag
df1_one_variable inv(const df1_one_variable &x)