14 #if defined (__WAT32__)
20 #include <iostream.hpp>
31 return solve(aa,z,ld,sgn);
36 double ln_unsigned_det = 0;
66 cerr <<
"Error matrix not square in solve()"<<
endl;
79 for (
int i=lb;i<=ub;i++)
82 for (
int j=lb;j<=ub;j++)
90 if (
value(big) == 0.0)
93 "Error in matrix inverse -- matrix singular in inv(df1b2matrix)\n";
98 for (
int j=lb;j<=ub;j++)
100 for (
int i=lb;i<j;i++)
105 sum -= bb(i,k)*bb(k,j);
112 for (
int i=j;i<=ub;i++)
117 sum -= bb(i,k)*bb(k,j);
140 int itemp=indx(imax);
147 if (
value(bb(j,j)) == 0.0)
155 for (
int i=j+1;i<=ub;i++)
157 bb(i,j) = bb(i,j) * dum;
165 part_prod(lb)=
log(
fabs(bb(lb,lb)));
167 for (
int j=lb+1;j<=ub;j++)
170 part_prod(j)=part_prod(j-1)+
log(
fabs(bb(j,j)));
172 ln_unsigned_det=part_prod(ub);
180 for (
int i=lb;i<=ub;i++)
185 for (
int i=lb;i<=ub;i++)
190 for (
int i=lb;i<=ub;i++)
193 for (
int j=lb;j<=i-1;j++)
199 for (
int i=ub;i>=lb;i--)
202 for (
int j=i+1;j<=ub;j++)
#define ADUNCONST(type, obj)
Creates a shallow copy of obj that is not CONST.
double sum(const d3_array &darray)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Description not yet available.
df1_two_variable fabs(const df1_two_variable &x)
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.
dvector csolve(const dmatrix &aa, const dvector &z)
Solve a linear system using LU decomposition.
Description not yet available.
Description not yet available.
double sign(const double x)
The sign of a number.
dvector value(const df1_one_vector &v)
d3_array log(const d3_array &arr3)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.