14 #if defined (__WAT32__)
20 #include <iostream.hpp>
30 double ln_unsigned_det = 0;
59 cerr <<
"Error matrix not square in solve()"<<
endl;
72 for (
int i=lb;i<=ub;i++)
75 for (
int j=lb;j<=ub;j++)
83 if (
value(big) == 0.0)
86 "Error in matrix inverse -- matrix singular in inv(df1b2matrix)\n";
91 for (
int j=lb;j<=ub;j++)
93 for (
int i=lb;i<j;i++)
96 for (
int k=lb;k<i;k++)
98 sum -= bb(i,k)*bb(k,j);
105 for (
int i=j;i<=ub;i++)
108 for (
int k=lb;k<j;k++)
110 sum -= bb(i,k)*bb(k,j);
122 for (
int k=lb;k<=ub;k++)
133 int itemp=indx(imax);
140 if (
value(bb(j,j)) == 0.0)
148 for (
int i=j+1;i<=ub;i++)
150 bb(i,j) = bb(i,j) * dum;
158 part_prod(lb)=
log(
fabs(bb(lb,lb)));
160 for (
int j=lb+1;j<=ub;j++)
163 part_prod(j)=part_prod(j-1)+
log(
fabs(bb(j,j)));
165 ln_unsigned_det=part_prod(ub);
173 for (
int i=lb;i<=ub;i++)
178 for (
int i=lb;i<=ub;i++)
183 for (
int i=lb;i<=ub;i++)
186 for (
int j=lb;j<=i-1;j++)
192 for (
int i=ub;i>=lb;i--)
195 for (
int j=i+1;j<=ub;j++)
#define ADUNCONST(type, obj)
Creates a shallow copy of obj that is not CONST.
Vector of double precision numbers.
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.
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.