101 cerr <<
"bounds error" <<
endl;
105 for (
int i=0;i<=
bw-1;i++)
107 d(i)=B.
d(i)(i+_lb,_ub);
117 for (
int i=0;i<
bw;i++)
127 for (
int i=0;i<
bw;i++)
136 (
int _min,
int _max,
int _bw)
141 d.allocate(0,bw-1,lb,_max);
153 int cmin=pos.
lb(nrl);
154 int cmax=pos.
ub(nrl);
170 int cmin=pos.
lb(nrl);
171 int cmax=pos.
ub(nrl);
188 for (
int i=imin;i<=imax;i++)
190 for (
int j=imin;j<=imax;j++)
219 for (
int i=imin;i<=imax;i++)
221 for (
int j=imin;j<=imax;j++)
234 (*this)(i,j)=S(i1,j1);
246 (
int _min,
int _max,
int _bw)
251 d.allocate(0,_bw-1,lb,_max);
261 ostream & ofs = (ostream&) _ofs;
266 for (
int i=imin;i<=imax;i++)
268 for (
int j=imin;j<=imax;j++)
273 ofs << S(i,j) <<
" ";
282 if (i<imax) ofs <<
endl;
297 int minsave=
M.indexmin();
301 int bw=
M.bandwidth();
303 #ifndef SAFE_INITIALIZE
312 cerr <<
"Error matrix not positive definite in choleski_decomp"
320 L(i,1)=
M(i,1)/L(1,1);
325 for (j=i-bw+1;j<=i-1;j++)
330 for (k=i-bw+1;k<=j-1;k++)
339 for (k=i-bw+1;k<=i-1;k++)
347 cerr <<
"Error matrix not positive definite in choleski_decomp"
367 int _bw=
M.bandwidth();
368 int mmin=
M.indexmin();
369 int mmax=
M.indexmax();
375 d.allocate(0,_bw-1,lb,mmax);
377 if (bw<bandwidth()) initialize();
379 if (
M.indexmin() != indexmin() ||
M.indexmax() != indexmax()
380 ||
M.bandwidth() > bandwidth() )
382 cerr <<
"incompatible shape in symmetric_dmatrix::operator = "
387 for (
int i=mmin;i<=mmax;i++)
389 int jmin=
admax(mmin,i-bw+1);
390 for (
int j=jmin;j<=i;j++)
416 cerr <<
"error bandwidth not equal 2" <<
endl;
426 for(
int i=lb;i<=ub;i++)
428 for(
int j=i;j<=
min(bw+i-1,ub);j++)
431 if(i!=j)
M(i,j)=
M(j,i);
447 cerr <<
"error bandwidth not equal 2" <<
endl;
457 for(
int i=lb;i<=ub;i++)
459 for(
int j=i;j<=
min(bw+i-1,ub);j++)
462 if(i!=j)
M(i,j)=
M(j,i);
Description not yet available.
void allocate(void)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
double & operator()(int i, int j)
dmatrix(void)
Default constructor.
dvector eigenvalues(const banded_symmetric_dmatrix &_SS)
Description not yet available.
int allocated(const ivector &v)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
#define ADUNCONST(type, obj)
Creates a shallow copy of obj that is not CONST.
Vector of double precision numbers.
int bandwidth(void) const
void initialize(void)
Description not yet available.
void fill_seqadd(int, int)
Fills ivector elements with values starting from base and incremented by offset.
df1_one_matrix choleski_decomp(const df1_one_matrix &MM)
prnstream & endl(prnstream &)
dmatrix eigenvectors(const banded_symmetric_dmatrix &_SS, const dvector &_e)
Description not yet available.
Array of integers(int) with indexes from index_min to indexmax.
d3_array sqrt(const d3_array &arr3)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
banded_lower_triangular_dmatrix(const dvar_matrix_position &mpos)
Description not yet available.
double & operator()(int i, int j)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Description not yet available.
Description not yet available.
void shift(int)
Description not yet available.
ostream & operator<<(const ostream &_s, preshowpoint p)
Description not yet available.
banded_symmetric_dmatrix(void)
banded_symmetric_dmatrix sub(int l, int u)
Description not yet available.
size_t pos(const adstring &substr, const adstring &s)
void shift(int)
Description not yet available.
void initialize(void)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
int bandwidth(void) const
Description not yet available.