00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef _CXSC_CMATRIX_INL_INCLUDED
00027 #define _CXSC_CMATRIX_INL_INCLUDED
00028
00029 namespace cxsc {
00030
00031 INLINE cmatrix::cmatrix() throw():dat(NULL),lb1(1),ub1(0),lb2(1),ub2(0),xsize(0),ysize(0)
00032 {
00033 }
00034
00035 INLINE cmatrix::cmatrix(const complex &r) throw():lb1(1),ub1(1),lb2(1),ub2(1),xsize(1),ysize(1)
00036 {
00037 dat=new complex[1];
00038 *dat=r;
00039 }
00040
00041 INLINE cmatrix::cmatrix(const real &r) throw():lb1(1),ub1(1),lb2(1),ub2(1),xsize(1),ysize(1)
00042 {
00043 dat=new complex[1];
00044 *dat=r;
00045 }
00046
00047 INLINE cmatrix::cmatrix(const cmatrix &rm) throw():lb1(rm.lb1),ub1(rm.ub1),lb2(rm.lb2),ub2(rm.ub2),xsize(rm.xsize),ysize(rm.ysize)
00048 {
00049 dat=new complex[xsize*ysize];
00050 for(int i=0;i<xsize*ysize;i++)
00051 dat[i]=rm.dat[i];
00052 }
00053
00054 INLINE cmatrix::cmatrix(const rmatrix &rm) throw():lb1(rm.lb1),ub1(rm.ub1),lb2(rm.lb2),ub2(rm.ub2),xsize(rm.xsize),ysize(rm.ysize)
00055 {
00056 dat=new complex[xsize*ysize];
00057 for(int i=0;i<xsize*ysize;i++)
00058 dat[i]=rm.dat[i];
00059 }
00060
00061 INLINE cmatrix::cmatrix(const int &m, const int &n)
00062 #if(CXSC_INDEX_CHECK)
00063 throw(ERROR_CMATRIX_WRONG_BOUNDARIES):lb1(1),ub1(m),lb2(1),ub2(n),xsize(n),ysize(m)
00064 #else
00065 throw():lb1(1),ub1(m),lb2(1),ub2(n),xsize(n),ysize(m)
00066 #endif
00067 {
00068 #if(CXSC_INDEX_CHECK)
00069 if((n<0)||(m<0)) cxscthrow(ERROR_CMATRIX_WRONG_BOUNDARIES("cmatrix::cmatrix(const int &m, const int &n)"));
00070 #endif
00071 dat=new complex[m*n];
00072 }
00073
00074 INLINE cmatrix::cmatrix(const int &m1, const int &m2, const int &n1, const int &n2)
00075 #if(CXSC_INDEX_CHECK)
00076 throw(ERROR_CMATRIX_WRONG_BOUNDARIES):lb1(m1),ub1(m2),lb2(n1),ub2(n2),xsize(n2-n1+1),ysize(m2-m1+1)
00077 #else
00078 throw():lb1(m1),ub1(m2),lb2(n1),ub2(n2),xsize(n2-n1+1),ysize(m2-m1+1)
00079 #endif
00080 {
00081 #if(CXSC_INDEX_CHECK)
00082 if((m2<m1)||(n2<n1)) cxscthrow(ERROR_CMATRIX_WRONG_BOUNDARIES("cmatrix::cmatrix(const int &m1, const int &n1, const int &m2, const int &n2)"));
00083 #endif
00084 dat=new complex[xsize*ysize];
00085 }
00086
00087 INLINE cvector::cvector(const cmatrix_subv &v) throw():l(v.lb),u(v.ub),size(v.size)
00088 {
00089 dat=new complex[size];
00090 for (int i=0, j=v.start;i<v.size;i++,j+=v.offset)
00091 dat[i]=v.dat[j];
00092 }
00093
00094 INLINE cmatrix::cmatrix(const cvector &v) throw():lb1(v.l),ub1(v.u),lb2(1),ub2(1),xsize(1),ysize(v.size)
00095 {
00096 dat=new complex[v.size];
00097 for(int i=0;i<v.size;i++)
00098 dat[i]=v.dat[i];
00099 }
00100
00101 INLINE cmatrix::cmatrix(const rvector &v) throw():lb1(v.l),ub1(v.u),lb2(1),ub2(1),xsize(1),ysize(v.size)
00102 {
00103 dat=new complex[v.size];
00104 for(int i=0;i<v.size;i++)
00105 dat[i]=v.dat[i];
00106 }
00107
00108 INLINE cmatrix::cmatrix(const cvector_slice &v) throw():lb1(v.start),ub1(v.end),lb2(1),ub2(1),xsize(1),ysize(v.size)
00109 {
00110 dat=new complex[v.size];
00111 for(int i=0,j=v.start-v.l;i<v.size;i++,j++)
00112 dat[i]=v.dat[j];
00113 }
00114
00115 INLINE cmatrix::cmatrix(const rvector_slice &v) throw():lb1(v.start),ub1(v.end),lb2(1),ub2(1),xsize(1),ysize(v.size)
00116 {
00117 dat=new complex[v.size];
00118 for(int i=0,j=v.start-v.l;i<v.size;i++,j++)
00119 dat[i]=v.dat[j];
00120 }
00121
00122
00123 INLINE cmatrix::cmatrix(const cmatrix_slice &sl) throw():lb1(sl.start1),ub1(sl.end1),lb2(sl.start2),ub2(sl.end2),xsize(sl.sxsize),ysize(sl.sysize)
00124 {
00125 int i,j;
00126
00127 dat=new complex[xsize*ysize];
00128 for (i=0;i<ysize;i++)
00129 {
00130 for(j=0;j<xsize;j++)
00131 {
00132 dat[i*xsize+j]=sl.dat[(sl.offset1+i)*sl.mxsize+sl.offset2+j];
00133 }
00134 }
00135 }
00136
00137 INLINE cmatrix::cmatrix(const rmatrix_slice &sl) throw():lb1(sl.start1),ub1(sl.end1),lb2(sl.start2),ub2(sl.end2),xsize(sl.sxsize),ysize(sl.sysize)
00138 {
00139 int i,j;
00140
00141 dat=new complex[xsize*ysize];
00142 for (i=0;i<ysize;i++)
00143 {
00144 for(j=0;j<xsize;j++)
00145 {
00146 dat[i*xsize+j]=sl.dat[(sl.offset1+i)*sl.mxsize+sl.offset2+j];
00147 }
00148 }
00149 }
00150
00151 INLINE cmatrix_subv Row(cmatrix &m,const int &i)
00152 #if(CXSC_INDEX_CHECK)
00153 throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT)
00154 #else
00155 throw()
00156 #endif
00157
00158 {
00159 return m[i];
00160 }
00161
00162 INLINE cmatrix_subv Col(cmatrix &m,const int &i)
00163 #if(CXSC_INDEX_CHECK)
00164 throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT)
00165 #else
00166 throw()
00167 #endif
00168
00169 {
00170 return m[Col(i)];
00171 }
00172
00173 INLINE cmatrix_subv Row(const cmatrix &m,const int &i)
00174 #if(CXSC_INDEX_CHECK)
00175 throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT)
00176 #else
00177 throw()
00178 #endif
00179
00180 {
00181 return m[i];
00182 }
00183
00184 INLINE cmatrix_subv Col(const cmatrix &m,const int &i)
00185 #if(CXSC_INDEX_CHECK)
00186 throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT)
00187 #else
00188 throw()
00189 #endif
00190
00191 {
00192 return m[Col(i)];
00193 }
00194
00195 INLINE complex& cmatrix_subv::operator [](const int &i) const
00196 #if(CXSC_INDEX_CHECK)
00197 throw(ERROR_CVECTOR_ELEMENT_NOT_IN_VEC)
00198 #else
00199 throw()
00200 #endif
00201 {
00202 #if(CXSC_INDEX_CHECK)
00203 if((i<lb)||(i>ub)) cxscthrow(ERROR_CVECTOR_ELEMENT_NOT_IN_VEC("complex &cmatrix_subv::operator [](const int &i) const"));
00204 #endif
00205 return dat[start+((i-lb)*offset)];
00206 }
00207
00208 INLINE complex& cmatrix_subv::operator [](const int &i)
00209 #if(CXSC_INDEX_CHECK)
00210 throw(ERROR_CVECTOR_ELEMENT_NOT_IN_VEC)
00211 #else
00212 throw()
00213 #endif
00214 {
00215 #if(CXSC_INDEX_CHECK)
00216 if((i<lb)||(i>ub)) cxscthrow(ERROR_CVECTOR_ELEMENT_NOT_IN_VEC("complex &cmatrix_subv::operator [](const int &i)"));
00217 #endif
00218 return dat[start+((i-lb)*offset)];
00219 }
00220
00221
00222 INLINE cmatrix_subv cmatrix::operator [](const int &i) const
00223 #if(CXSC_INDEX_CHECK)
00224 throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT)
00225 #else
00226 throw()
00227 #endif
00228 {
00229 #if(CXSC_INDEX_CHECK)
00230 if((i<lb1)||(i>ub1)) cxscthrow(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT("cmatrix_subv cmatrix::operator [](const int &i)"));
00231 #endif
00232 return cmatrix_subv(dat, lb2, ub2, xsize, xsize*(i-lb1),1);
00233 }
00234
00235 INLINE cmatrix_subv cmatrix::operator [](const cxscmatrix_column &i) const
00236 #if(CXSC_INDEX_CHECK)
00237 throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT)
00238 #else
00239 throw()
00240 #endif
00241 {
00242 #if(CXSC_INDEX_CHECK)
00243 if((i.col()<lb2)||(i.col()>ub2)) cxscthrow(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT("cmatrix_subv cmatrix::operator [](const cxscmatrix_column &i)"));
00244 #endif
00245 return cmatrix_subv(dat, lb1, ub1, ysize, i.col()-lb2, xsize);
00246 }
00247
00248 INLINE cmatrix_subv cmatrix::operator [](const int &i)
00249 #if(CXSC_INDEX_CHECK)
00250 throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT)
00251 #else
00252 throw()
00253 #endif
00254 {
00255 #if(CXSC_INDEX_CHECK)
00256 if((i<lb1)||(i>ub1)) cxscthrow(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT("cmatrix_subv cmatrix::operator [](const int &i)"));
00257 #endif
00258 return cmatrix_subv(dat, lb2, ub2, xsize, xsize*(i-lb1),1);
00259 }
00260
00261 INLINE cmatrix_subv cmatrix::operator [](const cxscmatrix_column &i)
00262 #if(CXSC_INDEX_CHECK)
00263 throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT)
00264 #else
00265 throw()
00266 #endif
00267 {
00268 #if(CXSC_INDEX_CHECK)
00269 if((i.col()<lb2)||(i.col()>ub2)) cxscthrow(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT("cmatrix_subv cmatrix::operator [](const cxscmatrix_column &i)"));
00270 #endif
00271 return cmatrix_subv(dat, lb1, ub1, ysize, i.col()-lb2, xsize);
00272 }
00273
00274 INLINE cmatrix_slice cmatrix::operator ()(const int &m, const int &n)
00275 #if(CXSC_INDEX_CHECK)
00276 throw(ERROR_CMATRIX_SUB_ARRAY_TOO_BIG)
00277 #else
00278 throw()
00279 #endif
00280 {
00281 #if(CXSC_INDEX_CHECK)
00282 if((m<1)||(n<1)||(m<lb1)||(n<lb2)||(m>ub1)||(n>ub2)) cxscthrow(ERROR_CMATRIX_SUB_ARRAY_TOO_BIG("cmatrix_slice cmatrix::operator ()(const int &m, const int &n)"));
00283 #endif
00284 return cmatrix_slice(*this,1,m,1,n);
00285 }
00286
00287 INLINE cmatrix_slice cmatrix::operator ()(const int &m1, const int &m2, const int &n1, const int &n2)
00288 #if(CXSC_INDEX_CHECK)
00289 throw(ERROR_CMATRIX_SUB_ARRAY_TOO_BIG)
00290 #else
00291 throw()
00292 #endif
00293 {
00294 #if(CXSC_INDEX_CHECK)
00295 if((m1<lb1)||(n1<lb2)||(m2>ub1)||(n2>ub2)) cxscthrow(ERROR_CMATRIX_SUB_ARRAY_TOO_BIG("cmatrix_slice cmatrix::operator ()(const int &m1, const int &n1, const int &m2, const int &n2)"));
00296 #endif
00297 return cmatrix_slice(*this,m1,m2,n1,n2);
00298 }
00299
00300 INLINE cmatrix_subv cmatrix_slice::operator [](const int &i)
00301 #if(CXSC_INDEX_CHECK)
00302 throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT)
00303 #else
00304 throw()
00305 #endif
00306 {
00307 #if(CXSC_INDEX_CHECK)
00308 if((i<start1)||(i>end1)) cxscthrow(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT("cmatrix_subv cmatrix_slice::operator [](const int &i)"));
00309 #endif
00310 return cmatrix_subv(dat, start2, end2, sxsize, mxsize*(i-start1+offset1)+offset2,1);
00311 }
00312
00313 INLINE cmatrix_subv cmatrix_slice::operator [](const cxscmatrix_column &i)
00314 #if(CXSC_INDEX_CHECK)
00315 throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT)
00316 #else
00317 throw()
00318 #endif
00319 {
00320 #if(CXSC_INDEX_CHECK)
00321 if((i.col()<start2)||(i.col()>end2)) cxscthrow(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT("cmatrix_subv cmatrix_slice::operator [](const cxscmatrix_column &i)"));
00322 #endif
00323 return cmatrix_subv(dat, start1, end1, sysize, offset1*mxsize+i.col()-start2+offset2, mxsize);
00324 }
00325
00326 INLINE cmatrix_subv cmatrix_slice::operator [](const int &i) const
00327 #if(CXSC_INDEX_CHECK)
00328 throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT)
00329 #else
00330 throw()
00331 #endif
00332 {
00333 #if(CXSC_INDEX_CHECK)
00334 if((i<start1)||(i>end1)) cxscthrow(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT("cmatrix_subv cmatrix_slice::operator [](const int &i)"));
00335 #endif
00336 return cmatrix_subv(dat, start2, end2, sxsize, mxsize*(i-start1+offset1)+offset2,1);
00337 }
00338
00339 INLINE cmatrix_subv cmatrix_slice::operator [](const cxscmatrix_column &i) const
00340 #if(CXSC_INDEX_CHECK)
00341 throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT)
00342 #else
00343 throw()
00344 #endif
00345 {
00346 #if(CXSC_INDEX_CHECK)
00347 if((i.col()<start2)||(i.col()>end2)) cxscthrow(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT("cmatrix_subv cmatrix_slice::operator [](const cxscmatrix_column &i)"));
00348 #endif
00349 return cmatrix_subv(dat, start1, end1, sysize, offset1*mxsize+i.col()-start2+offset2, mxsize);
00350 }
00351
00352 INLINE cmatrix_slice cmatrix_slice::operator ()(const int &m, const int &n)
00353 #if(CXSC_INDEX_CHECK)
00354 throw(ERROR_CMATRIX_SUB_ARRAY_TOO_BIG)
00355 #else
00356 throw()
00357 #endif
00358 {
00359 #if(CXSC_INDEX_CHECK)
00360 if((m<1)||(n<1)||(m<start1)||(n<start2)||(m>end1)||(n>end2)) cxscthrow(ERROR_CMATRIX_SUB_ARRAY_TOO_BIG("cmatrix_slice cmatrix_slice::operator ()(const int &m, const int &n)"));
00361 #endif
00362 return cmatrix_slice(*this,1,m,1,n);
00363 }
00364
00365 INLINE cmatrix_slice cmatrix_slice::operator ()(const int &m1, const int &m2, const int &n1, const int &n2)
00366 #if(CXSC_INDEX_CHECK)
00367 throw(ERROR_CMATRIX_SUB_ARRAY_TOO_BIG)
00368 #else
00369 throw()
00370 #endif
00371 {
00372 #if(CXSC_INDEX_CHECK)
00373 if((m1<start1)||(n1<start2)||(m2>end1)||(n2>end2)) cxscthrow(ERROR_CMATRIX_SUB_ARRAY_TOO_BIG("cmatrix_slice cmatrix_slice::operator ()(const int &m1, const int &m2, const int &n1, const int &n2)"));
00374 #endif
00375 return cmatrix_slice(*this,m1,m2,n1,n2);
00376 }
00377
00378 INLINE cmatrix_subv cmatrix_subv::operator ()(const int &i)
00379 #if(CXSC_INDEX_CHECK)
00380 throw(ERROR_CVECTOR_SUB_ARRAY_TOO_BIG)
00381 #else
00382 throw()
00383 #endif
00384 {
00385 #if(CXSC_INDEX_CHECK)
00386 if(1<lb||i>ub) cxscthrow(ERROR_CVECTOR_SUB_ARRAY_TOO_BIG("cmatrix_subv cmatrix_subv::operator ()(const int &i)"));
00387 #endif
00388 return cmatrix_subv(dat,1,i,i,start+(1-lb)*offset,offset);
00389 }
00390
00391 INLINE cmatrix_subv cmatrix_subv::operator ()(const int &i1,const int &i2)
00392 #if(CXSC_INDEX_CHECK)
00393 throw(ERROR_CVECTOR_SUB_ARRAY_TOO_BIG)
00394 #else
00395 throw()
00396 #endif
00397 {
00398 #if(CXSC_INDEX_CHECK)
00399 if(i1<lb||i2>ub) cxscthrow(ERROR_CVECTOR_SUB_ARRAY_TOO_BIG("cmatrix_subv cmatrix_subv::operator ()(const int &i1,const int &i2)"));
00400 #endif
00401 return cmatrix_subv(dat,i1,i2,i2-i1+1,start+(i1-lb)*offset,offset);
00402 }
00403
00404
00405
00406 INLINE cmatrix_subv &cmatrix_subv::operator =(const cmatrix_subv &rv) throw() { return _mvmvassign(*this,rv); }
00407 INLINE cmatrix_subv &cmatrix_subv::operator =(const complex &r) throw() { return _mvsassign(*this,r); }
00408 INLINE cmatrix_subv &cmatrix_subv::operator =(const cvector &v)
00409 #if(CXSC_INDEX_CHECK)
00410 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
00411 #else
00412 throw()
00413 #endif
00414 { return _mvvassign(*this,v); }
00415 INLINE cmatrix_subv &cmatrix_subv::operator =(const cvector_slice &v)
00416 #if(CXSC_INDEX_CHECK)
00417 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
00418 #else
00419 throw()
00420 #endif
00421 { return _mvvassign(*this,cvector(v)); }
00422 INLINE cmatrix_subv &cmatrix_subv::operator =(const rmatrix_subv &rv) throw() { return _mvvassign(*this,rvector(rv)); }
00423 INLINE cmatrix_subv &cmatrix_subv::operator =(const real &r) throw() { return _mvsassign(*this,r); }
00424 INLINE cmatrix_subv &cmatrix_subv::operator =(const rvector &v)
00425 #if(CXSC_INDEX_CHECK)
00426 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
00427 #else
00428 throw()
00429 #endif
00430 { return _mvvassign(*this,v); }
00431 INLINE cmatrix_subv &cmatrix_subv::operator =(const rvector_slice &v)
00432 #if(CXSC_INDEX_CHECK)
00433 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
00434 #else
00435 throw()
00436 #endif
00437 { return _mvvassign(*this,cvector(v)); }
00438 INLINE cmatrix &cmatrix::operator =(const complex &r) throw() { return _msassign(*this,r); }
00439 INLINE cmatrix &cmatrix::operator =(const cmatrix &m) throw() { return _mmassign<cmatrix,cmatrix,complex>(*this,m, complex(0,0)); }
00440 INLINE cmatrix &cmatrix::operator =(const cmatrix_slice &ms) throw() { return _mmsassign<cmatrix,cmatrix_slice,complex>(*this,ms); }
00441 INLINE cmatrix &cmatrix::operator =(const cvector &v) throw() { return _mvassign<cmatrix,cvector,complex>(*this,v); }
00442 INLINE cmatrix &cmatrix::operator =(const cvector_slice &v) throw() { return _mvassign<cmatrix,cvector,complex>(*this,cvector(v)); }
00443 INLINE cmatrix &cmatrix::operator =(const real &r) throw() { return _msassign(*this,complex(r)); }
00444 INLINE cmatrix &cmatrix::operator =(const rmatrix &m) throw() { return _mmassign<cmatrix,rmatrix,complex>(*this,m,complex(0,0)); }
00445 INLINE cmatrix &cmatrix::operator =(const rmatrix_slice &ms) throw() { return _mmsassign<cmatrix,rmatrix_slice,complex>(*this,ms); }
00446 INLINE cmatrix &cmatrix::operator =(const rvector &v) throw() { return _mvassign<cmatrix,rvector,complex>(*this,v); }
00447 INLINE cmatrix &cmatrix::operator =(const rvector_slice &v) throw() { return _mvassign<cmatrix,rvector,complex>(*this,rvector(v)); }
00448
00449 INLINE cmatrix::operator void*() throw() { return _mvoid(*this); }
00450 INLINE cmatrix_slice &cmatrix_slice::operator =(const cmatrix &m)
00451 #if(CXSC_INDEX_CHECK)
00452 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
00453 #else
00454 throw()
00455 #endif
00456 { return _msmassign(*this,m); }
00457 INLINE cmatrix_slice &cmatrix_slice::operator =(const cmatrix_slice &ms)
00458 #if(CXSC_INDEX_CHECK)
00459 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
00460 #else
00461 throw()
00462 #endif
00463 { return _msmsassign(*this,ms); }
00464 INLINE cmatrix_slice &cmatrix_slice::operator =(const complex &r) throw() { return _mssassign(*this,r); }
00465 INLINE cmatrix_slice &cmatrix_slice::operator =(const cvector &v)
00466 #if(CXSC_INDEX_CHECK)
00467 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
00468 #else
00469 throw()
00470 #endif
00471 { return _msmassign(*this,cmatrix(v)); }
00472 INLINE cmatrix_slice &cmatrix_slice::operator =(const cvector_slice &v)
00473 #if(CXSC_INDEX_CHECK)
00474 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
00475 #else
00476 throw()
00477 #endif
00478 { return _msmassign(*this,cmatrix(cvector(v))); }
00479 INLINE cmatrix_slice &cmatrix_slice::operator =(const rmatrix &m)
00480 #if(CXSC_INDEX_CHECK)
00481 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
00482 #else
00483 throw()
00484 #endif
00485 { return _msmassign(*this,m); }
00486 INLINE cmatrix_slice &cmatrix_slice::operator =(const rmatrix_slice &ms)
00487 #if(CXSC_INDEX_CHECK)
00488 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
00489 #else
00490 throw()
00491 #endif
00492 { return _msmsassign(*this,ms); }
00493 INLINE cmatrix_slice &cmatrix_slice::operator =(const real &r) throw() { return _mssassign(*this,r); }
00494 INLINE cmatrix_slice &cmatrix_slice::operator =(const rvector &v)
00495 #if(CXSC_INDEX_CHECK)
00496 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
00497 #else
00498 throw()
00499 #endif
00500 { return _msmassign(*this,rmatrix(v)); }
00501 INLINE cmatrix_slice &cmatrix_slice::operator =(const rvector_slice &v)
00502 #if(CXSC_INDEX_CHECK)
00503 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
00504 #else
00505 throw()
00506 #endif
00507 { return _msmassign(*this,rmatrix(rvector(v))); }
00508 INLINE cmatrix_slice::operator void*() throw() { return _msvoid(*this); }
00509 INLINE cvector operator /(const cmatrix_subv &rv, const complex &s) throw() { return _mvsdiv<cmatrix_subv,complex,cvector>(rv,s); }
00510 INLINE cvector operator *(const cmatrix_subv &rv, const complex &s) throw() { return _mvsmult<cmatrix_subv,complex,cvector>(rv,s); }
00511 INLINE cvector operator *(const complex &s, const cmatrix_subv &rv) throw() { return _mvsmult<cmatrix_subv,complex,cvector>(rv,s); }
00512 INLINE cmatrix_subv &cmatrix_subv::operator *=(const complex &c) throw() { return _mvsmultassign(*this,c); }
00513 INLINE cmatrix_subv &cmatrix_subv::operator +=(const complex &c) throw() { return _mvsplusassign(*this,c); }
00514 INLINE cmatrix_subv &cmatrix_subv::operator -=(const complex &c) throw() { return _mvsminusassign(*this,c); }
00515 INLINE cmatrix_subv &cmatrix_subv::operator /=(const complex &c) throw() { return _mvsdivassign(*this,c); }
00516 INLINE rvector abs(const cmatrix_subv &mv) throw() { return _mvabs<cmatrix_subv,rvector>(mv); }
00517 INLINE rvector Im(const cmatrix_subv &mv) throw() { return _mvim<cmatrix_subv,rvector>(mv); }
00518 INLINE rvector Re(const cmatrix_subv &mv) throw() { return _mvre<cmatrix_subv,rvector>(mv); }
00519 INLINE cmatrix_subv &SetIm(cmatrix_subv &mv,const rvector &rv)
00520 #if(CXSC_INDEX_CHECK)
00521 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
00522 #else
00523 throw()
00524 #endif
00525 { return _mvvsetim(mv,rv); }
00526 INLINE cmatrix_subv &SetRe(cmatrix_subv &mv,const rvector &rv)
00527 #if(CXSC_INDEX_CHECK)
00528 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
00529 #else
00530 throw()
00531 #endif
00532 { return _mvvsetre(mv,rv); }
00533 INLINE cmatrix_subv &SetRe(cmatrix_subv &iv,const real &r) throw() { return _mvssetre(iv,r); }
00534 INLINE cmatrix_subv &SetIm(cmatrix_subv &iv,const real &r) throw() { return _mvssetim(iv,r); }
00535 INLINE cvector &cvector::operator =(const cmatrix_subv &mv) throw() { return _vmvassign<cvector,cmatrix_subv,complex>(*this,mv); }
00536 INLINE cvector_slice &cvector_slice::operator =(const cmatrix_subv &mv) throw() { return _vsvassign(*this,cvector(mv)); }
00537
00538 INLINE complex operator *(const cmatrix_subv & rv1, const cmatrix_subv &rv2)
00539 #if(CXSC_INDEX_CHECK)
00540 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
00541 #else
00542 throw()
00543 #endif
00544 { return _mvmvcmult<cmatrix_subv,cmatrix_subv,complex>(rv1,rv2); }
00545 INLINE complex operator *(const cvector & rv1, const cmatrix_subv &rv2)
00546 #if(CXSC_INDEX_CHECK)
00547 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
00548 #else
00549 throw()
00550 #endif
00551 { return _vmvcmult<cvector,cmatrix_subv,complex>(rv1,rv2); }
00552 INLINE complex operator *(const cmatrix_subv &rv1,const cvector &rv2)
00553 #if(CXSC_INDEX_CHECK)
00554 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
00555 #else
00556 throw()
00557 #endif
00558 { return _vmvcmult<cvector,cmatrix_subv,complex>(rv2,rv1); }
00559 INLINE complex operator *(const cvector_slice &sl,const cmatrix_subv &sv)
00560 #if(CXSC_INDEX_CHECK)
00561 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
00562 #else
00563 throw()
00564 #endif
00565 { return _vmvcmult<cvector,cmatrix_subv,complex>(cvector(sl),sv); }
00566 INLINE complex operator *(const cmatrix_subv &mv,const cvector_slice &vs)
00567 #if(CXSC_INDEX_CHECK)
00568 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
00569 #else
00570 throw()
00571 #endif
00572 { return _vmvcmult<cvector,cmatrix_subv,complex>(cvector(vs),mv); }
00573 INLINE cvector operator +(const cmatrix_subv & rv1, const cmatrix_subv &rv2)
00574 #if(CXSC_INDEX_CHECK)
00575 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
00576 #else
00577 throw()
00578 #endif
00579 { return _mvmvplus<cmatrix_subv,cmatrix_subv,cvector>(rv1,rv2); }
00580 INLINE cvector operator +(const cmatrix_subv &rv1,const cvector &rv2)
00581 #if(CXSC_INDEX_CHECK)
00582 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
00583 #else
00584 throw()
00585 #endif
00586 { return _mvvplus<cmatrix_subv,cvector,cvector>(rv1,rv2); }
00587 INLINE cvector operator +(const cvector & rv1, const cmatrix_subv &rv2)
00588 #if(CXSC_INDEX_CHECK)
00589 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
00590 #else
00591 throw()
00592 #endif
00593 { return _mvvplus<cmatrix_subv,cvector,cvector>(rv2,rv1); }
00594 INLINE cvector operator +(const cvector_slice &sl,const cmatrix_subv &mv)
00595 #if(CXSC_INDEX_CHECK)
00596 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
00597 #else
00598 throw()
00599 #endif
00600 { return _mvvplus<cmatrix_subv,cvector,cvector>(mv,cvector(sl)); }
00601 INLINE cvector operator +(const cmatrix_subv &mv,const cvector_slice &sl)
00602 #if(CXSC_INDEX_CHECK)
00603 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
00604 #else
00605 throw()
00606 #endif
00607 { return _mvvplus<cmatrix_subv,cvector,cvector>(mv,cvector(sl)); }
00608 INLINE cmatrix_subv &cmatrix_subv::operator +=(const cvector &rv)
00609 #if(CXSC_INDEX_CHECK)
00610 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
00611 #else
00612 throw()
00613 #endif
00614 { return _mvvplusassign(*this,rv); }
00615 INLINE cmatrix_subv &cmatrix_subv::operator +=(const cvector_slice &rv)
00616 #if(CXSC_INDEX_CHECK)
00617 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
00618 #else
00619 throw()
00620 #endif
00621 { return _mvvplusassign(*this,cvector(rv)); }
00622 INLINE cvector operator -(const cmatrix_subv & rv1, const cmatrix_subv &rv2)
00623 #if(CXSC_INDEX_CHECK)
00624 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
00625 #else
00626 throw()
00627 #endif
00628 { return _mvmvminus<cmatrix_subv,cmatrix_subv,cvector>(rv1,rv2); }
00629 INLINE cvector operator -(const cvector & rv1, const cmatrix_subv &rv2)
00630 #if(CXSC_INDEX_CHECK)
00631 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
00632 #else
00633 throw()
00634 #endif
00635 { return _vmvminus<cvector,cmatrix_subv,cvector>(rv1,rv2); }
00636 INLINE cvector operator -(const cmatrix_subv &rv1,const cvector &rv2)
00637 #if(CXSC_INDEX_CHECK)
00638 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
00639 #else
00640 throw()
00641 #endif
00642 { return _mvvminus<cmatrix_subv,cvector,cvector>(rv1,rv2); }
00643 INLINE cvector operator -(const cvector_slice &sl,const cmatrix_subv &mv)
00644 #if(CXSC_INDEX_CHECK)
00645 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
00646 #else
00647 throw()
00648 #endif
00649 { return _vmvminus<cvector,cmatrix_subv,cvector>(cvector(sl),mv); }
00650 INLINE cvector operator -(const cmatrix_subv &mv,const cvector_slice &sl)
00651 #if(CXSC_INDEX_CHECK)
00652 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
00653 #else
00654 throw()
00655 #endif
00656 { return _mvvminus<cmatrix_subv,cvector,cvector>(mv,cvector(sl)); }
00657 INLINE cmatrix_subv &cmatrix_subv::operator -=(const cvector &rv)
00658 #if(CXSC_INDEX_CHECK)
00659 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
00660 #else
00661 throw()
00662 #endif
00663 { return _mvvminusassign(*this,rv); }
00664 INLINE cmatrix_subv &cmatrix_subv::operator -=(const cvector_slice &rv)
00665 #if(CXSC_INDEX_CHECK)
00666 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
00667 #else
00668 throw()
00669 #endif
00670 { return _mvvminusassign(*this,cvector(rv)); }
00671
00672
00673 INLINE cmatrix_subv &cmatrix_subv::operator +=(const rvector &rv)
00674 #if(CXSC_INDEX_CHECK)
00675 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
00676 #else
00677 throw()
00678 #endif
00679 { return _mvvplusassign(*this,rv); }
00680 INLINE cmatrix_subv &cmatrix_subv::operator +=(const rvector_slice &rv)
00681 #if(CXSC_INDEX_CHECK)
00682 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
00683 #else
00684 throw()
00685 #endif
00686 { return _mvvplusassign(*this,cvector(rv)); }
00687 INLINE cmatrix_subv &cmatrix_subv::operator -=(const rvector &rv)
00688 #if(CXSC_INDEX_CHECK)
00689 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
00690 #else
00691 throw()
00692 #endif
00693 { return _mvvminusassign(*this,rv); }
00694 INLINE cmatrix_subv &cmatrix_subv::operator -=(const rvector_slice &rv)
00695 #if(CXSC_INDEX_CHECK)
00696 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
00697 #else
00698 throw()
00699 #endif
00700 { return _mvvminusassign(*this,rvector(rv)); }
00701
00702
00708 INLINE cmatrix _cmatrix(const cmatrix &rm) throw() { return rm; }
00714 INLINE cmatrix _cmatrix(const cvector &v) throw() { return cmatrix(v); }
00720 INLINE cmatrix _cmatrix(const cvector_slice &v) throw() { return cmatrix(v); }
00726 INLINE cmatrix _cmatrix(const complex &r) throw() { return cmatrix(r); }
00727 INLINE int Lb(const cmatrix &rm, const int &i)
00728 #if(CXSC_INDEX_CHECK)
00729 throw(ERROR_CMATRIX_WRONG_ROW_OR_COL)
00730 #else
00731 throw()
00732 #endif
00733 { return _mlb(rm,i); }
00734 INLINE int Ub(const cmatrix &rm, const int &i)
00735 #if(CXSC_INDEX_CHECK)
00736 throw(ERROR_CMATRIX_WRONG_ROW_OR_COL)
00737 #else
00738 throw()
00739 #endif
00740 { return _mub(rm,i); }
00741 INLINE int Lb(const cmatrix_slice &rm, const int &i)
00742 #if(CXSC_INDEX_CHECK)
00743 throw(ERROR_CMATRIX_WRONG_ROW_OR_COL)
00744 #else
00745 throw()
00746 #endif
00747 { return _mslb(rm,i); }
00748 INLINE int Ub(const cmatrix_slice &rm, const int &i)
00749 #if(CXSC_INDEX_CHECK)
00750 throw(ERROR_CMATRIX_WRONG_ROW_OR_COL)
00751 #else
00752 throw()
00753 #endif
00754 { return _msub(rm,i); }
00755 INLINE cmatrix &SetLb(cmatrix &m, const int &i,const int &j)
00756 #if(CXSC_INDEX_CHECK)
00757 throw(ERROR_CMATRIX_WRONG_ROW_OR_COL)
00758 #else
00759 throw()
00760 #endif
00761 { return _msetlb(m,i,j); }
00762 INLINE cmatrix &SetUb(cmatrix &m, const int &i,const int &j)
00763 #if(CXSC_INDEX_CHECK)
00764 throw(ERROR_CMATRIX_WRONG_ROW_OR_COL)
00765 #else
00766 throw()
00767 #endif
00768 { return _msetub(m,i,j); }
00769
00770 INLINE int RowLen ( const cmatrix& A )
00771 { return Ub(A,2)-Lb(A,2)+1; }
00772
00773 INLINE int ColLen ( const cmatrix& A )
00774 { return Ub(A,1)-Lb(A,1)+1; }
00775
00776 INLINE int RowLen ( const cmatrix_slice& A )
00777 { return Ub(A,2)-Lb(A,2)+1; }
00778
00779 INLINE int ColLen ( const cmatrix_slice& A )
00780 { return Ub(A,1)-Lb(A,1)+1; }
00781
00782 INLINE void Resize(cmatrix &A) throw() { _mresize(A);}
00783 INLINE void Resize(cmatrix &A,const int &m, const int &n)
00784 #if(CXSC_INDEX_CHECK)
00785 throw(ERROR_CMATRIX_WRONG_BOUNDARIES)
00786 #else
00787 throw()
00788 #endif
00789 { _mresize<cmatrix,complex>(A,m,n); }
00790 INLINE void Resize(cmatrix &A,const int &m1, const int &m2,const int &n1,const int &n2)
00791 #if(CXSC_INDEX_CHECK)
00792 throw(ERROR_CMATRIX_WRONG_BOUNDARIES)
00793 #else
00794 throw()
00795 #endif
00796 { _mresize<cmatrix,complex>(A,m1,m2,n1,n2); }
00797 INLINE rmatrix abs(const cmatrix &m) throw() { return _mabs<cmatrix,rmatrix>(m); }
00798 INLINE rmatrix abs(const cmatrix_slice &ms) throw() { return _msabs<cmatrix_slice,rmatrix>(ms); }
00799 INLINE rmatrix Im(const cmatrix &m) throw() { return _mim<cmatrix,rmatrix>(m); }
00800 INLINE rmatrix Re(const cmatrix &m) throw() { return _mre<cmatrix,rmatrix>(m); }
00801 INLINE rmatrix Im(const cmatrix_slice &m) throw() { return _msim<cmatrix_slice,rmatrix>(m); }
00802 INLINE rmatrix Re(const cmatrix_slice &m) throw() { return _msre<cmatrix_slice,rmatrix>(m); }
00803 INLINE cmatrix &SetIm(cmatrix &cm,const rmatrix &rm)
00804 #if(CXSC_INDEX_CHECK)
00805 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
00806 #else
00807 throw()
00808 #endif
00809 { return _mmsetim<cmatrix,rmatrix>(cm,rm); }
00810 INLINE cmatrix_slice &SetIm(cmatrix_slice &cm,const rmatrix &rm)
00811 #if(CXSC_INDEX_CHECK)
00812 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
00813 #else
00814 throw()
00815 #endif
00816 { return _msmsetim<cmatrix_slice,rmatrix>(cm,rm); }
00817 INLINE cmatrix &SetIm(cmatrix &cm,const rmatrix_slice &rm)
00818 #if(CXSC_INDEX_CHECK)
00819 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
00820 #else
00821 throw()
00822 #endif
00823 { return _mmssetim<cmatrix,rmatrix_slice>(cm,rm); }
00824 INLINE cmatrix_slice &SetIm(cmatrix_slice &cm,const rmatrix_slice &rm)
00825 #if(CXSC_INDEX_CHECK)
00826 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
00827 #else
00828 throw()
00829 #endif
00830 { return _msmssetim<cmatrix_slice,rmatrix_slice>(cm,rm); }
00831 INLINE cmatrix &SetRe(cmatrix &cm,const rmatrix &rm)
00832 #if(CXSC_INDEX_CHECK)
00833 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
00834 #else
00835 throw()
00836 #endif
00837 { return _mmsetre<cmatrix,rmatrix>(cm,rm); }
00838 INLINE cmatrix_slice &SetRe(cmatrix_slice &cm,const rmatrix &rm)
00839 #if(CXSC_INDEX_CHECK)
00840 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
00841 #else
00842 throw()
00843 #endif
00844 { return _msmsetre<cmatrix_slice,rmatrix>(cm,rm); }
00845 INLINE cmatrix &SetRe(cmatrix &cm,const rmatrix_slice &rm)
00846 #if(CXSC_INDEX_CHECK)
00847 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
00848 #else
00849 throw()
00850 #endif
00851 { return _mmssetre<cmatrix,rmatrix_slice>(cm,rm); }
00852 INLINE cmatrix_slice &SetRe(cmatrix_slice &cm,const rmatrix_slice &rm)
00853 #if(CXSC_INDEX_CHECK)
00854 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
00855 #else
00856 throw()
00857 #endif
00858 { return _msmssetre<cmatrix_slice,rmatrix_slice>(cm,rm); }
00859 INLINE complex::complex(const cmatrix &m)
00860 #if(CXSC_INDEX_CHECK)
00861 throw(ERROR_CMATRIX_TYPE_CAST_OF_THICK_OBJ,ERROR_CMATRIX_USE_OF_UNINITIALIZED_OBJ)
00862 #else
00863 throw()
00864 #endif
00865 { _smconstr(*this,m); }
00866
00867 INLINE cmatrix operator *(const complex &c, const cmatrix &m) throw() { return _smmult<complex,cmatrix,cmatrix>(c,m); }
00868 INLINE cmatrix operator *(const complex &c, const cmatrix_slice &ms) throw() { return _smsmult<complex,cmatrix_slice,cmatrix>(c,ms); }
00869 INLINE cmatrix operator *(const cmatrix &m,const complex &c) throw() { return _smmult<complex,cmatrix,cmatrix>(c,m); }
00870 INLINE cmatrix operator *(const cmatrix_slice &ms,const complex &c) throw() { return _smsmult<complex,cmatrix_slice,cmatrix>(c,ms); }
00871 INLINE cmatrix &operator *=(cmatrix &m,const complex &c) throw() { return _msmultassign(m,c); }
00872 INLINE cmatrix_slice &cmatrix_slice::operator *=(const cmatrix &m)
00873 #if(CXSC_INDEX_CHECK)
00874 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
00875 #else
00876 throw()
00877 #endif
00878 { return (*this=*this*m); }
00879 INLINE cmatrix_slice &cmatrix_slice::operator *=(const cmatrix_slice &m)
00880 #if(CXSC_INDEX_CHECK)
00881 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
00882 #else
00883 throw()
00884 #endif
00885 { return (*this=*this*m); }
00886 INLINE cmatrix_slice &cmatrix_slice::operator *=(const complex &c) throw() { return _mssmultassign(*this,c); }
00887 INLINE cmatrix operator /(const cmatrix &m,const complex &c) throw() { return _msdiv<cmatrix,complex,cmatrix>(m,c); }
00888 INLINE cmatrix operator /(const cmatrix_slice &ms, const complex &c) throw() { return _mssdiv<cmatrix_slice,complex,cmatrix>(ms,c); }
00889 INLINE cmatrix &operator /=(cmatrix &m,const complex &c) throw() { return _msdivassign(m,c); }
00890 INLINE cmatrix_slice &cmatrix_slice::operator /=(const complex &c) throw() { return _mssdivassign(*this,c); }
00891 INLINE cmatrix operator *(const real &c, const cmatrix &m) throw() { return _smmult<real,cmatrix,cmatrix>(c,m); }
00892 INLINE cmatrix operator *(const real &c, const cmatrix_slice &ms) throw() { return _smsmult<real,cmatrix_slice,cmatrix>(c,ms); }
00893 INLINE cmatrix operator *(const cmatrix &m,const real &c) throw() { return _smmult<real,cmatrix,cmatrix>(c,m); }
00894 INLINE cmatrix operator *(const cmatrix_slice &ms,const real &c) throw() { return _smsmult<real,cmatrix_slice,cmatrix>(c,ms); }
00895 INLINE cmatrix &operator *=(cmatrix &m,const real &c) throw() { return _msmultassign(m,c); }
00896 INLINE cmatrix_slice &cmatrix_slice::operator *=(const rmatrix &m)
00897 #if(CXSC_INDEX_CHECK)
00898 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
00899 #else
00900 throw()
00901 #endif
00902 { return (*this=*this*m); }
00903 INLINE cmatrix_slice &cmatrix_slice::operator *=(const rmatrix_slice &m)
00904 #if(CXSC_INDEX_CHECK)
00905 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
00906 #else
00907 throw()
00908 #endif
00909 { return (*this=*this*m); }
00910 INLINE cmatrix_slice &cmatrix_slice::operator *=(const real &c) throw() { return _mssmultassign(*this,c); }
00911 INLINE cmatrix operator /(const cmatrix &m,const real &c) throw() { return _msdiv<cmatrix,real,cmatrix>(m,c); }
00912 INLINE cmatrix operator /(const cmatrix_slice &ms, const real &c) throw() { return _mssdiv<cmatrix_slice,real,cmatrix>(ms,c); }
00913 INLINE cmatrix &operator /=(cmatrix &m,const real &c) throw() { return _msdivassign(m,c); }
00914 INLINE cmatrix_slice &cmatrix_slice::operator /=(const real &c) throw() { return _mssdivassign(*this,c); }
00915
00916
00917 INLINE cmatrix operator *(const complex &c, const rmatrix &m) throw() { return _smmult<complex,rmatrix,cmatrix>(c,m); }
00918 INLINE cmatrix operator *(const complex &c, const rmatrix_slice &ms) throw() { return _smsmult<complex,rmatrix_slice,cmatrix>(c,ms); }
00919 INLINE cmatrix operator *(const rmatrix &m,const complex &c) throw() { return _smmult<complex,rmatrix,cmatrix>(c,m); }
00920 INLINE cmatrix operator *(const rmatrix_slice &ms,const complex &c) throw() { return _smsmult<complex,rmatrix_slice,cmatrix>(c,ms); }
00921 INLINE cmatrix operator /(const rmatrix &m,const complex &c) throw() { return _msdiv<rmatrix,complex,cmatrix>(m,c); }
00922 INLINE cmatrix operator /(const rmatrix_slice &ms, const complex &c) throw() { return _mssdiv<rmatrix_slice,complex,cmatrix>(ms,c); }
00923 INLINE cvector::cvector(const cmatrix &sl)
00924 #if(CXSC_INDEX_CHECK)
00925 throw(ERROR_CMATRIX_TYPE_CAST_OF_THICK_OBJ)
00926 #else
00927 throw()
00928 #endif
00929 { _vmconstr<cvector,cmatrix,complex>(*this,sl); }
00930 INLINE cvector::cvector(const cmatrix_slice &sl)
00931 #if(CXSC_INDEX_CHECK)
00932 throw(ERROR_CMATRIX_TYPE_CAST_OF_THICK_OBJ)
00933 #else
00934 throw()
00935 #endif
00936 { _vmsconstr<cvector,cmatrix_slice,complex>(*this,sl); }
00937 INLINE cvector &cvector::operator =(const cmatrix &m)
00938 #if(CXSC_INDEX_CHECK)
00939 throw(ERROR_CMATRIX_TYPE_CAST_OF_THICK_OBJ)
00940 #else
00941 throw()
00942 #endif
00943 { return _vmassign<cvector,cmatrix,complex>(*this,m); }
00944 INLINE cvector &cvector::operator =(const cmatrix_slice &m)
00945 #if(CXSC_INDEX_CHECK)
00946 throw(ERROR_CMATRIX_TYPE_CAST_OF_THICK_OBJ)
00947 #else
00948 throw()
00949 #endif
00950 { return _vmassign<cvector,cmatrix,complex>(*this,cmatrix(m)); }
00951 INLINE cvector_slice & cvector_slice::operator =(const cmatrix_slice &m)
00952 #if(CXSC_INDEX_CHECK)
00953 throw(ERROR__OP_WITH_WRONG_DIM<cvector>,ERROR_CMATRIX_TYPE_CAST_OF_THICK_OBJ)
00954 #else
00955 throw()
00956 #endif
00957 { return _vsvassign(*this,cvector(cmatrix(m))); }
00958 INLINE cmatrix_subv &cmatrix_subv::operator =(const cmatrix &m)
00959 #if(CXSC_INDEX_CHECK)
00960 throw(ERROR_CMATRIX_TYPE_CAST_OF_THICK_OBJ)
00961 #else
00962 throw()
00963 #endif
00964 { return _mvvassign(*this,cvector(m)); }
00965 INLINE cmatrix_subv &cmatrix_subv::operator =(const cmatrix_slice &m)
00966 #if(CXSC_INDEX_CHECK)
00967 throw(ERROR_CMATRIX_TYPE_CAST_OF_THICK_OBJ)
00968 #else
00969 throw()
00970 #endif
00971 { return _mvvassign(*this,cvector(cmatrix(m))); }
00972 INLINE cvector operator *(const cmatrix &m,const cvector &v)
00973 #if(CXSC_INDEX_CHECK)
00974 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
00975 #else
00976 throw()
00977 #endif
00978 { return _mvcmult<cmatrix,cvector,cvector>(m,v); }
00979 INLINE cvector operator *(const cmatrix_slice &ms,const cvector &v)
00980 #if(CXSC_INDEX_CHECK)
00981 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
00982 #else
00983 throw()
00984 #endif
00985 { return _msvcmult<cmatrix_slice,cvector,cvector>(ms,v); }
00986 INLINE cvector operator *(const cvector &v,const cmatrix &m)
00987 #if(CXSC_INDEX_CHECK)
00988 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
00989 #else
00990 throw()
00991 #endif
00992 { return _vmcmult<cvector,cmatrix,cvector>(v,m); }
00993 INLINE cvector operator *(const cvector &v,const cmatrix_slice &ms)
00994 #if(CXSC_INDEX_CHECK)
00995 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
00996 #else
00997 throw()
00998 #endif
00999 { return _vmscmult<cvector,cmatrix_slice,cvector>(v,ms); }
01000 INLINE cvector &operator *=(cvector &v,const cmatrix &m)
01001 #if(CXSC_INDEX_CHECK)
01002 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01003 #else
01004 throw()
01005 #endif
01006 { return _vmcmultassign<cvector,cmatrix,complex>(v,m); }
01007 INLINE cvector &operator *=(cvector &v,const cmatrix_slice &ms)
01008 #if(CXSC_INDEX_CHECK)
01009 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01010 #else
01011 throw()
01012 #endif
01013 { return _vmscmultassign<cvector,cmatrix_slice,complex>(v,ms); }
01014 INLINE cvector_slice &cvector_slice::operator *=(const cmatrix &m)
01015 #if(CXSC_INDEX_CHECK)
01016 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01017 #else
01018 throw()
01019 #endif
01020 { return _vsmcmultassign<cvector_slice,cmatrix,complex>(*this,m); }
01021 INLINE cvector operator *(const cvector_slice &v,const cmatrix &m)
01022 #if(CXSC_INDEX_CHECK)
01023 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01024 #else
01025 throw()
01026 #endif
01027 { return _vmcmult<cvector,cmatrix,cvector>(cvector(v),m); }
01028 INLINE cvector operator *(const cvector_slice &v,const cmatrix_slice &m)
01029 #if(CXSC_INDEX_CHECK)
01030 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01031 #else
01032 throw()
01033 #endif
01034 { return _vmscmult<cvector,cmatrix_slice,cvector>(cvector(v),m); }
01035 INLINE cmatrix_subv &cmatrix_subv::operator =(const rmatrix &m)
01036 #if(CXSC_INDEX_CHECK)
01037 throw(ERROR_CMATRIX_TYPE_CAST_OF_THICK_OBJ)
01038 #else
01039 throw()
01040 #endif
01041 { return _mvvassign(*this,rvector(m)); }
01042 INLINE cmatrix_subv &cmatrix_subv::operator =(const rmatrix_slice &m)
01043 #if(CXSC_INDEX_CHECK)
01044 throw(ERROR_CMATRIX_TYPE_CAST_OF_THICK_OBJ)
01045 #else
01046 throw()
01047 #endif
01048 { return _mvvassign(*this,rvector(rmatrix(m))); }
01049 INLINE cvector operator *(const rvector &v,const cmatrix &m)
01050 #if(CXSC_INDEX_CHECK)
01051 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01052 #else
01053 throw()
01054 #endif
01055 { return _vmcmult<rvector,cmatrix,cvector>(v,m); }
01056 INLINE cvector operator *(const rvector &v,const cmatrix_slice &ms)
01057 #if(CXSC_INDEX_CHECK)
01058 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01059 #else
01060 throw()
01061 #endif
01062 { return _vmscmult<rvector,cmatrix_slice,cvector>(v,ms); }
01063 INLINE cvector operator *(const rvector_slice &v,const cmatrix &m)
01064 #if(CXSC_INDEX_CHECK)
01065 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01066 #else
01067 throw()
01068 #endif
01069 { return _vmcmult<cvector,cmatrix,cvector>(cvector(v),m); }
01070 INLINE cvector operator *(const cmatrix &m,const rvector &v)
01071 #if(CXSC_INDEX_CHECK)
01072 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01073 #else
01074 throw()
01075 #endif
01076 { return _mvcmult<cmatrix,rvector,cvector>(m,v); }
01077 INLINE cvector operator *(const cmatrix_slice &ms,const rvector &v)
01078 #if(CXSC_INDEX_CHECK)
01079 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01080 #else
01081 throw()
01082 #endif
01083 { return _msvcmult<cmatrix_slice,rvector,cvector>(ms,v); }
01084
01085 INLINE const cmatrix &operator +(const cmatrix &m) throw() { return m; }
01086 INLINE cmatrix operator +(const cmatrix_slice &m) throw() { return cmatrix(m); }
01087 INLINE cmatrix operator +(const cmatrix &m1,const cmatrix &m2)
01088 #if(CXSC_INDEX_CHECK)
01089 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01090 #else
01091 throw()
01092 #endif
01093 { return _mmplus<cmatrix,cmatrix,cmatrix>(m1,m2); }
01094 INLINE cmatrix operator +(const cmatrix &m,const cmatrix_slice &ms)
01095 #if(CXSC_INDEX_CHECK)
01096 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01097 #else
01098 throw()
01099 #endif
01100 { return _mmsplus<cmatrix,cmatrix_slice,cmatrix>(m,ms); }
01101 INLINE cmatrix operator +(const cmatrix_slice &ms,const cmatrix &m)
01102 #if(CXSC_INDEX_CHECK)
01103 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01104 #else
01105 throw()
01106 #endif
01107 { return _mmsplus<cmatrix,cmatrix_slice,cmatrix>(m,ms); }
01108 INLINE cmatrix operator +(const cmatrix_slice &m1,const cmatrix_slice &m2)
01109 #if(CXSC_INDEX_CHECK)
01110 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01111 #else
01112 throw()
01113 #endif
01114 { return _msmsplus<cmatrix_slice,cmatrix_slice,cmatrix>(m1,m2); }
01115 INLINE cmatrix &operator +=(cmatrix &m1,const cmatrix &m2)
01116 #if(CXSC_INDEX_CHECK)
01117 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01118 #else
01119 throw()
01120 #endif
01121 { return _mmplusassign(m1,m2); }
01122 INLINE cmatrix &operator +=(cmatrix &m1,const cmatrix_slice &ms)
01123 #if(CXSC_INDEX_CHECK)
01124 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01125 #else
01126 throw()
01127 #endif
01128 { return _mmsplusassign(m1,ms); }
01129 INLINE cmatrix_slice &cmatrix_slice::operator +=(const cmatrix &m1)
01130 #if(CXSC_INDEX_CHECK)
01131 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01132 #else
01133 throw()
01134 #endif
01135 { return _msmplusassign(*this,m1); }
01136 INLINE cmatrix_slice &cmatrix_slice::operator +=(const cmatrix_slice &ms2)
01137 #if(CXSC_INDEX_CHECK)
01138 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01139 #else
01140 throw()
01141 #endif
01142 { return _msmsplusassign(*this,ms2); }
01143 INLINE cmatrix operator -(const cmatrix &m) throw() { return _mminus(m); }
01144 INLINE cmatrix operator -(const cmatrix_slice &m) throw() { return _msminus<cmatrix_slice,cmatrix>(m); }
01145 INLINE cmatrix operator -(const cmatrix &m1,const cmatrix &m2)
01146 #if(CXSC_INDEX_CHECK)
01147 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01148 #else
01149 throw()
01150 #endif
01151 { return _mmminus<cmatrix,cmatrix,cmatrix>(m1,m2); }
01152 INLINE cmatrix operator -(const cmatrix &m,const cmatrix_slice &ms)
01153 #if(CXSC_INDEX_CHECK)
01154 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01155 #else
01156 throw()
01157 #endif
01158 { return _mmsminus<cmatrix,cmatrix_slice,cmatrix>(m,ms); }
01159 INLINE cmatrix operator -(const cmatrix_slice &ms,const cmatrix &m)
01160 #if(CXSC_INDEX_CHECK)
01161 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01162 #else
01163 throw()
01164 #endif
01165 { return _msmminus<cmatrix_slice,cmatrix,cmatrix>(ms,m); }
01166 INLINE cmatrix operator -(const cmatrix_slice &ms1,const cmatrix_slice &ms2)
01167 #if(CXSC_INDEX_CHECK)
01168 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01169 #else
01170 throw()
01171 #endif
01172 { return _msmsminus<cmatrix_slice,cmatrix_slice,cmatrix>(ms1,ms2); }
01173 INLINE cmatrix &operator -=(cmatrix &m1,const cmatrix &m2)
01174 #if(CXSC_INDEX_CHECK)
01175 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01176 #else
01177 throw()
01178 #endif
01179 { return _mmminusassign(m1,m2); }
01180 INLINE cmatrix &operator -=(cmatrix &m1,const cmatrix_slice &ms)
01181 #if(CXSC_INDEX_CHECK)
01182 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01183 #else
01184 throw()
01185 #endif
01186 { return _mmsminusassign(m1,ms); }
01187 INLINE cmatrix_slice &cmatrix_slice::operator -=(const cmatrix &m1)
01188 #if(CXSC_INDEX_CHECK)
01189 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01190 #else
01191 throw()
01192 #endif
01193 { return _msmminusassign(*this,m1); }
01194 INLINE cmatrix_slice &cmatrix_slice::operator -=(const cmatrix_slice &ms2)
01195 #if(CXSC_INDEX_CHECK)
01196 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01197 #else
01198 throw()
01199 #endif
01200 { return _msmsminusassign(*this,ms2); }
01201 INLINE cmatrix operator *(const cmatrix &m1, const cmatrix &m2)
01202 #if(CXSC_INDEX_CHECK)
01203 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01204 #else
01205 throw()
01206 #endif
01207 { return _mmcmult<cmatrix,cmatrix,cmatrix>(m1,m2); }
01208 INLINE cmatrix operator *(const cmatrix &m1, const cmatrix_slice &ms)
01209 #if(CXSC_INDEX_CHECK)
01210 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01211 #else
01212 throw()
01213 #endif
01214 { return _mmscmult<cmatrix,cmatrix_slice,cmatrix>(m1,ms); }
01215 INLINE cmatrix operator *(const cmatrix_slice &ms, const cmatrix &m1)
01216 #if(CXSC_INDEX_CHECK)
01217 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01218 #else
01219 throw()
01220 #endif
01221 { return _msmcmult<cmatrix_slice,cmatrix,cmatrix>(ms,m1); }
01222 INLINE cmatrix operator *(const cmatrix_slice &ms1, const cmatrix_slice &ms2)
01223 #if(CXSC_INDEX_CHECK)
01224 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01225 #else
01226 throw()
01227 #endif
01228 { return _msmscmult<cmatrix_slice,cmatrix_slice,cmatrix>(ms1,ms2); }
01229 INLINE cmatrix &operator *=(cmatrix &m1,const cmatrix &m2)
01230 #if(CXSC_INDEX_CHECK)
01231 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01232 #else
01233 throw()
01234 #endif
01235 { return _mmcmultassign<cmatrix,cmatrix,complex>(m1,m2); }
01236 INLINE cmatrix &operator *=(cmatrix &m1,const cmatrix_slice &ms)
01237 #if(CXSC_INDEX_CHECK)
01238 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01239 #else
01240 throw()
01241 #endif
01242 { return _mmscmultassign<cmatrix,cmatrix_slice,complex>(m1,ms); }
01243 INLINE cmatrix operator +(const rmatrix &m1,const cmatrix &m2)
01244 #if(CXSC_INDEX_CHECK)
01245 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01246 #else
01247 throw()
01248 #endif
01249 { return _mmplus<rmatrix,cmatrix,cmatrix>(m1,m2); }
01250 INLINE cmatrix operator +(const cmatrix &m1,const rmatrix &m2)
01251 #if(CXSC_INDEX_CHECK)
01252 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01253 #else
01254 throw()
01255 #endif
01256 { return _mmplus<rmatrix,cmatrix,cmatrix>(m2,m1); }
01257 INLINE cmatrix operator +(const rmatrix &m,const cmatrix_slice &ms)
01258 #if(CXSC_INDEX_CHECK)
01259 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01260 #else
01261 throw()
01262 #endif
01263 { return _mmsplus<rmatrix,cmatrix_slice,cmatrix>(m,ms); }
01264 INLINE cmatrix operator +(const cmatrix &m,const rmatrix_slice &ms)
01265 #if(CXSC_INDEX_CHECK)
01266 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01267 #else
01268 throw()
01269 #endif
01270 { return _mmsplus<cmatrix,rmatrix_slice,cmatrix>(m,ms); }
01271 INLINE cmatrix operator +(const rmatrix_slice &ms,const cmatrix &m)
01272 #if(CXSC_INDEX_CHECK)
01273 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01274 #else
01275 throw()
01276 #endif
01277 { return _mmsplus<cmatrix,rmatrix_slice,cmatrix>(m,ms); }
01278 INLINE cmatrix operator +(const cmatrix_slice &ms,const rmatrix &m)
01279 #if(CXSC_INDEX_CHECK)
01280 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01281 #else
01282 throw()
01283 #endif
01284 { return _mmsplus<rmatrix,cmatrix_slice,cmatrix>(m,ms); }
01285 INLINE cmatrix operator +(const rmatrix_slice &m1,const cmatrix_slice &m2)
01286 #if(CXSC_INDEX_CHECK)
01287 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01288 #else
01289 throw()
01290 #endif
01291 { return _msmsplus<rmatrix_slice,cmatrix_slice,cmatrix>(m1,m2); }
01292 INLINE cmatrix operator +(const cmatrix_slice &m1,const rmatrix_slice &m2)
01293 #if(CXSC_INDEX_CHECK)
01294 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01295 #else
01296 throw()
01297 #endif
01298 { return _msmsplus<rmatrix_slice,cmatrix_slice,cmatrix>(m2,m1); }
01299 INLINE cmatrix &operator +=(cmatrix &m1,const rmatrix &m2)
01300 #if(CXSC_INDEX_CHECK)
01301 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01302 #else
01303 throw()
01304 #endif
01305 { return _mmplusassign(m1,m2); }
01306 INLINE cmatrix &operator +=(cmatrix &m1,const rmatrix_slice &ms)
01307 #if(CXSC_INDEX_CHECK)
01308 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01309 #else
01310 throw()
01311 #endif
01312 { return _mmsplusassign(m1,ms); }
01313 INLINE cmatrix_slice &cmatrix_slice::operator +=(const rmatrix &m1)
01314 #if(CXSC_INDEX_CHECK)
01315 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01316 #else
01317 throw()
01318 #endif
01319 { return _msmplusassign(*this,m1); }
01320 INLINE cmatrix_slice &cmatrix_slice::operator +=(const rmatrix_slice &ms2)
01321 #if(CXSC_INDEX_CHECK)
01322 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01323 #else
01324 throw()
01325 #endif
01326 { return _msmsplusassign(*this,ms2); }
01327 INLINE cmatrix operator -(const rmatrix &m1,const cmatrix &m2)
01328 #if(CXSC_INDEX_CHECK)
01329 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01330 #else
01331 throw()
01332 #endif
01333 { return _mmminus<rmatrix,cmatrix,cmatrix>(m1,m2); }
01334 INLINE cmatrix operator -(const cmatrix &m1,const rmatrix &m2)
01335 #if(CXSC_INDEX_CHECK)
01336 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01337 #else
01338 throw()
01339 #endif
01340 { return _mmminus<cmatrix,rmatrix,cmatrix>(m1,m2); }
01341 INLINE cmatrix operator -(const rmatrix &m,const cmatrix_slice &ms)
01342 #if(CXSC_INDEX_CHECK)
01343 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01344 #else
01345 throw()
01346 #endif
01347 { return _mmsminus<rmatrix,cmatrix_slice,cmatrix>(m,ms); }
01348 INLINE cmatrix operator -(const cmatrix &m,const rmatrix_slice &ms)
01349 #if(CXSC_INDEX_CHECK)
01350 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01351 #else
01352 throw()
01353 #endif
01354 { return _mmsminus<cmatrix,rmatrix_slice,cmatrix>(m,ms); }
01355 INLINE cmatrix operator -(const rmatrix_slice &ms,const cmatrix &m)
01356 #if(CXSC_INDEX_CHECK)
01357 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01358 #else
01359 throw()
01360 #endif
01361 { return _msmminus<rmatrix_slice,cmatrix,cmatrix>(ms,m); }
01362 INLINE cmatrix operator -(const cmatrix_slice &ms,const rmatrix &m)
01363 #if(CXSC_INDEX_CHECK)
01364 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01365 #else
01366 throw()
01367 #endif
01368 { return _msmminus<cmatrix_slice,rmatrix,cmatrix>(ms,m); }
01369 INLINE cmatrix operator -(const rmatrix_slice &ms1,const cmatrix_slice &ms2)
01370 #if(CXSC_INDEX_CHECK)
01371 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01372 #else
01373 throw()
01374 #endif
01375 { return _msmsminus<rmatrix_slice,cmatrix_slice,cmatrix>(ms1,ms2); }
01376 INLINE cmatrix operator -(const cmatrix_slice &ms1,const rmatrix_slice &ms2)
01377 #if(CXSC_INDEX_CHECK)
01378 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01379 #else
01380 throw()
01381 #endif
01382 { return _msmsminus<cmatrix_slice,rmatrix_slice,cmatrix>(ms1,ms2); }
01383 INLINE cmatrix &operator -=(cmatrix &m1,const rmatrix &m2)
01384 #if(CXSC_INDEX_CHECK)
01385 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01386 #else
01387 throw()
01388 #endif
01389 { return _mmminusassign(m1,m2); }
01390 INLINE cmatrix &operator -=(cmatrix &m1,const rmatrix_slice &ms)
01391 #if(CXSC_INDEX_CHECK)
01392 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01393 #else
01394 throw()
01395 #endif
01396 { return _mmsminusassign(m1,ms); }
01397 INLINE cmatrix_slice &cmatrix_slice::operator -=(const rmatrix &m1)
01398 #if(CXSC_INDEX_CHECK)
01399 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01400 #else
01401 throw()
01402 #endif
01403 { return _msmminusassign(*this,m1); }
01404 INLINE cmatrix_slice &cmatrix_slice::operator -=(const rmatrix_slice &ms2)
01405 #if(CXSC_INDEX_CHECK)
01406 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01407 #else
01408 throw()
01409 #endif
01410 { return _msmsminusassign(*this,ms2); }
01411 INLINE cmatrix operator *(const rmatrix &m1, const cmatrix &m2)
01412 #if(CXSC_INDEX_CHECK)
01413 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01414 #else
01415 throw()
01416 #endif
01417 { return _mmcmult<rmatrix,cmatrix,cmatrix>(m1,m2); }
01418 INLINE cmatrix operator *(const cmatrix &m1, const rmatrix &m2)
01419 #if(CXSC_INDEX_CHECK)
01420 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01421 #else
01422 throw()
01423 #endif
01424 { return _mmcmult<cmatrix,rmatrix,cmatrix>(m1,m2); }
01425 INLINE cmatrix operator *(const rmatrix &m1, const cmatrix_slice &ms)
01426 #if(CXSC_INDEX_CHECK)
01427 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01428 #else
01429 throw()
01430 #endif
01431 { return _mmscmult<rmatrix,cmatrix_slice,cmatrix>(m1,ms); }
01432 INLINE cmatrix operator *(const cmatrix &m1, const rmatrix_slice &ms)
01433 #if(CXSC_INDEX_CHECK)
01434 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01435 #else
01436 throw()
01437 #endif
01438 { return _mmscmult<cmatrix,rmatrix_slice,cmatrix>(m1,ms); }
01439 INLINE cmatrix operator *(const rmatrix_slice &ms, const cmatrix &m1)
01440 #if(CXSC_INDEX_CHECK)
01441 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01442 #else
01443 throw()
01444 #endif
01445 { return _msmcmult<rmatrix_slice,cmatrix,cmatrix>(ms,m1); }
01446 INLINE cmatrix operator *(const cmatrix_slice &ms, const rmatrix &m1)
01447 #if(CXSC_INDEX_CHECK)
01448 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01449 #else
01450 throw()
01451 #endif
01452 { return _msmcmult<cmatrix_slice,rmatrix,cmatrix>(ms,m1); }
01453 INLINE cmatrix operator *(const rmatrix_slice &ms1, const cmatrix_slice &ms2)
01454 #if(CXSC_INDEX_CHECK)
01455 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01456 #else
01457 throw()
01458 #endif
01459 { return _msmscmult<rmatrix_slice,cmatrix_slice,cmatrix>(ms1,ms2); }
01460 INLINE cmatrix operator *(const cmatrix_slice &ms1, const rmatrix_slice &ms2)
01461 #if(CXSC_INDEX_CHECK)
01462 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01463 #else
01464 throw()
01465 #endif
01466 { return _msmscmult<cmatrix_slice,rmatrix_slice,cmatrix>(ms1,ms2); }
01467 INLINE cmatrix &operator *=(cmatrix &m1,const rmatrix &m2)
01468 #if(CXSC_INDEX_CHECK)
01469 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01470 #else
01471 throw()
01472 #endif
01473 { return _mmcmultassign<cmatrix,rmatrix,complex>(m1,m2); }
01474 INLINE cmatrix &operator *=(cmatrix &m1,const rmatrix_slice &ms)
01475 #if(CXSC_INDEX_CHECK)
01476 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
01477 #else
01478 throw()
01479 #endif
01480 { return _mmscmultassign<cmatrix,rmatrix_slice,complex>(m1,ms); }
01481 INLINE bool operator ==(const cmatrix &m1,const cmatrix &m2) throw() { return _mmeq(m1,m2); }
01482 INLINE bool operator !=(const cmatrix &m1,const cmatrix &m2) throw() { return _mmneq(m1,m2); }
01483
01484
01485
01486
01487
01488 INLINE bool operator ==(const cmatrix &m1,const cmatrix_slice &ms) throw() { return _mmseq(m1,ms); }
01489 INLINE bool operator !=(const cmatrix &m1,const cmatrix_slice &ms) throw() { return _mmsneq(m1,ms); }
01490
01491
01492
01493
01494
01495 INLINE bool operator ==(const cmatrix_slice &m1,const cmatrix_slice &m2) throw() { return _msmseq(m1,m2); }
01496 INLINE bool operator !=(const cmatrix_slice &m1,const cmatrix_slice &m2) throw() { return _msmsneq(m1,m2); }
01497
01498
01499
01500
01501
01502 INLINE bool operator !(const cmatrix &ms) throw() { return _mnot(ms); }
01503 INLINE bool operator !(const cmatrix_slice &ms) throw() { return _msnot(ms); }
01504 INLINE std::ostream &operator <<(std::ostream &s,const cmatrix &r) throw() { return _mout(s,r); }
01505 INLINE std::ostream &operator <<(std::ostream &s,const cmatrix_slice &r) throw() { return _msout(s,r); }
01506 INLINE std::istream &operator >>(std::istream &s,cmatrix &r) throw() { return _min(s,r); }
01507 INLINE std::istream &operator >>(std::istream &s,cmatrix_slice &r) throw() { return _msin(s,r); }
01508
01510 INLINE cmatrix cmatrix::operator()(const intvector& p, const intvector& q) {
01511 cmatrix A(*this);
01512 for(int i=0 ; i<ColLen(A) ; i++)
01513 for(int j=0 ; j<RowLen(A) ; j++)
01514 A[i+Lb(A,1)][j+Lb(A,2)] = (*this)[p[i+Lb(p)]+Lb(A,1)][q[j+Lb(q)]+Lb(A,2)];
01515 return A;
01516 }
01517
01519 INLINE cmatrix cmatrix::operator()(const intvector& p) {
01520 cmatrix A(*this);
01521 for(int i=0 ; i<ColLen(A) ; i++)
01522 A[i+Lb(A,1)] = (*this)[p[i+Lb(p)]+Lb(A,1)];
01523 return A;
01524 }
01525
01527 INLINE cmatrix cmatrix::operator()(const intmatrix& P) {
01528 intvector p = permvec(P);
01529 return (*this)(p);
01530 }
01531
01533 INLINE cmatrix cmatrix::operator()(const intmatrix& P, const intmatrix& Q) {
01534 intvector p = permvec(P);
01535 intvector q = perminv(permvec(Q));
01536 return (*this)(p,q);
01537 }
01538
01540 INLINE cvector cvector::operator()(const intmatrix& P) {
01541 intvector p = permvec(P);
01542 return (*this)(p);
01543 }
01544
01545 }
01546
01547 #endif