12 #define ISZERO(d) ((d)==0.0)
50 cerr <<
"not implemented" <<
endl;
75 for (j=i+1;j<=n;j++) sum -=
beta(j)(i)*c(j);
90 for (i=mmin;i<=mmax;i++)
92 if (
value(b(i,i))<0.0)
112 for (
int k=rmin;k<=rmax;k++)
119 cerr <<
"not implemented" <<
endl;
143 for (j=i+1;j<=n;j++) sum -=
beta(j)(i)*c(j);
178 || (
M(mmin).indexmin() != mmin)
179 || (
M(mmin).indexmax() != mmax) )
181 cerr <<
" Inconsistent sizes in "
182 " dmatrix reorder(const dmatrix& M,const ivector& indx) "
190 for (i=mmin;i<=mmax;i++)
197 for (i=mmin;i<=mmax;i++)
210 cerr <<
" Inconsistent sizes in "
211 " dvector reorder(const dvector& M,const ivector& indx) "
219 for (i=mmin;i<=mmax;i++)
226 for (i=mmin;i<=mmax;i++)
257 sum-=ai(1,i)*bj(1,i);
266 sum-=ai(1,j)*bj(1,j);
286 gamma(j)=1.0/
beta(j,j);
289 alpha(i,j)*=gamma(j);
305 cerr <<
"not implemented" <<
endl;
310 double cld=
ln_det(CM,ssgn);
319 cout << setprecision(16) << cld-
value(ld) <<
" ";
338 for (
int i=mmin;i<=mmax;i++)
359 for (
int i=mmin;i<=mmax;i++)
372 cerr <<
"not implemented" <<
endl;
392 cerr <<
"not implemented" <<
endl;
415 cerr <<
"not implemented" <<
endl;
void ludcmp(const dmatrix &a, const ivector &indx, const double &d)
Lu decomposition of a constant matrix.
void xswitch(int &i1, int &i2)
Vector of double precision numbers.
void lubksb(dmatrix a, const ivector &indx, dvector b)
LU decomposition back susbstitution alogrithm for constant object.
double sum(const d3_array &darray)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
void fill_seqadd(double, double)
Fills dvector elements with values starting from base and incremented by offset.
Description not yet available.
void initialize(void)
Description not yet available.
void fill_seqadd(int, int)
Fills ivector elements with values starting from base and incremented by offset.
Description not yet available.
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 &)
Array of integers(int) with indexes from index_min to indexmax.
dvariable beta(const prevariable &a, const prevariable &b)
Beta density function.
Description not yet available.
double ln_det(const dmatrix &m1, int &sgn)
Compute log determinant of a constant matrix.
Description not yet available.
df1b2matrix_pair(const df1b2matrix &_a, const df1b2matrix &_b)
df1b2matrix reorder(const df1b2matrix &M, const ivector &indx)
df1b2variable get_ln_det(const df1b2matrix &b, int &sgn)
Description not yet available.
void initialize(void)
Description not yet available.
dvector value(const df1_one_vector &v)
ivector getreindex(ivector &indx)
d3_array log(const d3_array &arr3)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.