C-XSC - A C++ Class Library for Extended Scientific Computing
2.5.4
|
00001 /* 00002 ** CXSC is a C++ library for eXtended Scientific Computing (V 2.5.4) 00003 ** 00004 ** Copyright (C) 1990-2000 Institut fuer Angewandte Mathematik, 00005 ** Universitaet Karlsruhe, Germany 00006 ** (C) 2000-2014 Wiss. Rechnen/Softwaretechnologie 00007 ** Universitaet Wuppertal, Germany 00008 ** 00009 ** This library is free software; you can redistribute it and/or 00010 ** modify it under the terms of the GNU Library General Public 00011 ** License as published by the Free Software Foundation; either 00012 ** version 2 of the License, or (at your option) any later version. 00013 ** 00014 ** This library is distributed in the hope that it will be useful, 00015 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00017 ** Library General Public License for more details. 00018 ** 00019 ** You should have received a copy of the GNU Library General Public 00020 ** License along with this library; if not, write to the Free 00021 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00022 */ 00023 00024 /* CVS $Id: cmatrix.hpp,v 1.37 2014/01/30 17:23:44 cxsc Exp $ */ 00025 00026 #ifndef _CXSC_CMATRIX_HPP_INCLUDED 00027 #define _CXSC_CMATRIX_HPP_INCLUDED 00028 00029 #include "xscclass.hpp" 00030 #include "cdot.hpp" 00031 #include "cidot.hpp" 00032 #include "cvector.hpp" 00033 #include "except.hpp" 00034 #include "matrix.hpp" 00035 #include "rmatrix.hpp" 00036 00037 namespace cxsc { 00038 00039 class cmatrix; 00040 class cmatrix_slice; 00041 class srmatrix; 00042 class srmatrix_slice; 00043 class srmatrix_subv; 00044 class scmatrix; 00045 class scmatrix_slice; 00046 class scmatrix_subv; 00047 00048 00050 00053 class cmatrix_subv 00054 { 00055 friend class cvector; 00056 friend class civector; 00057 friend class cmatrix; 00058 friend class cmatrix_slice; 00059 private: 00060 complex *dat; 00061 int lb,ub; 00062 int size,start,offset; // start=first element index 0..n-1 00063 00064 public: 00066 friend INLINE cmatrix_subv Row(cmatrix &m,const int &i) 00067 #if(CXSC_INDEX_CHECK) 00068 throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT); 00069 #else 00070 throw(); 00071 #endif 00072 00073 friend INLINE cmatrix_subv Col(cmatrix &m,const int &i) 00074 #if(CXSC_INDEX_CHECK) 00075 throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT); 00076 #else 00077 throw(); 00078 #endif 00079 friend INLINE cmatrix_subv Row(const cmatrix &m,const int &i) 00080 #if(CXSC_INDEX_CHECK) 00081 throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT); 00082 #else 00083 throw(); 00084 #endif 00085 00086 friend INLINE cmatrix_subv Col(const cmatrix &m,const int &i) 00087 #if(CXSC_INDEX_CHECK) 00088 throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT); 00089 #else 00090 throw(); 00091 #endif 00092 //#if(CXSC_INDEX_CHECK) 00093 #ifdef _CXSC_FRIEND_TPL 00094 //----------------- Templates --------------------------------------- 00095 template <class MV1,class MV2> friend MV1 &_mvmvassign(MV1 &v,const MV2 &rv) 00096 #if(CXSC_INDEX_CHECK) 00097 throw(ERROR__OP_WITH_WRONG_DIM<MV1>); 00098 #else 00099 throw(); 00100 #endif 00101 template <class MV,class S> friend MV &_mvsassign(MV &v,const S &r) throw(); 00102 template <class MV,class V> friend MV &_mvvassign(MV &v,const V &rv) 00103 #if(CXSC_INDEX_CHECK) 00104 throw(ERROR__OP_WITH_WRONG_DIM<MV>); 00105 #else 00106 throw(); 00107 #endif 00108 template <class V,class MV2,class S> friend V &_vmvassign(V &v,const MV2 &rv) throw(); 00109 template <class MV,class V> friend V _mvabs(const MV &mv) throw(); 00110 template <class MV,class V> friend V _mvim(const MV &mv) throw(); 00111 template <class MV,class V> friend V _mvre(const MV &mv) throw(); 00112 template <class MV,class V> friend MV &_mvvsetim(MV &v,const V &rv) 00113 #if(CXSC_INDEX_CHECK) 00114 throw(ERROR__OP_WITH_WRONG_DIM<MV>); 00115 #else 00116 throw(); 00117 #endif 00118 template <class MV,class V> friend MV &_mvvsetre(MV &v,const V &rv) 00119 #if(CXSC_INDEX_CHECK) 00120 throw(ERROR__OP_WITH_WRONG_DIM<MV>); 00121 #else 00122 throw(); 00123 #endif 00124 template <class MV,class S> friend MV &_mvssetim(MV &mv, const S &s) throw(); 00125 template <class MV,class S> friend MV &_mvssetre(MV &mv, const S &s) throw(); 00126 template <class DP,class V,class SV> friend void _vmvaccu(DP &dp, const V & rv1, const SV &rv2) 00127 #if(CXSC_INDEX_CHECK) 00128 throw(OP_WITH_WRONG_DIM); 00129 #else 00130 throw(); 00131 #endif 00132 template <class DP,class MV1,class MV2> friend void _mvmvaccu(DP &dp, const MV1 & rv1, const MV2 &rv2) 00133 #if(CXSC_INDEX_CHECK) 00134 throw(OP_WITH_WRONG_DIM); 00135 #else 00136 throw(); 00137 #endif 00138 00139 template <class MV1,class MV2,class S> friend S _mvmvcmult(const MV1 & rv1, const MV2 &rv2) 00140 #if(CXSC_INDEX_CHECK) 00141 throw(ERROR__OP_WITH_WRONG_DIM<MV1>); 00142 #else 00143 throw(); 00144 #endif 00145 template <class MV1,class MV2,class S> friend S _mvmvcimult(const MV1 & rv1, const MV2 &rv2) 00146 #if(CXSC_INDEX_CHECK) 00147 throw(ERROR__OP_WITH_WRONG_DIM<MV1>); 00148 #else 00149 throw(); 00150 #endif 00151 template <class V,class MV,class S> friend S _vmvcmult(const V &rv1, const MV &rv2) 00152 #if(CXSC_INDEX_CHECK) 00153 throw(ERROR__OP_WITH_WRONG_DIM<MV>); 00154 #else 00155 throw(); 00156 #endif 00157 template <class V,class MV,class S> friend S _vmvcimult(const V &rv1, const MV &rv2) 00158 #if(CXSC_INDEX_CHECK) 00159 throw(ERROR__OP_WITH_WRONG_DIM<MV>); 00160 #else 00161 throw(); 00162 #endif 00163 template <class MV,class S,class E> friend E _mvsmult(const MV &rv, const S &s) throw(); 00164 template <class MV1,class MV2,class E> friend E _mvmvplus(const MV1 &rv1, const MV2 &rv2) 00165 #if(CXSC_INDEX_CHECK) 00166 throw(ERROR__OP_WITH_WRONG_DIM<E>); 00167 #else 00168 throw(); 00169 #endif 00170 template <class MV1,class MV2,class E> friend E _mvmvminus(const MV1 &rv1, const MV2 &rv2) 00171 #if(CXSC_INDEX_CHECK) 00172 throw(ERROR__OP_WITH_WRONG_DIM<E>); 00173 #else 00174 throw(); 00175 #endif 00176 template <class MV,class V,class E> friend E _mvvplus(const MV &rv1, const V &rv2) 00177 #if(CXSC_INDEX_CHECK) 00178 throw(ERROR__OP_WITH_WRONG_DIM<E>); 00179 #else 00180 throw(); 00181 #endif 00182 template <class MV,class V,class E> friend E _mvvminus(const MV &rv1, const V &rv2) 00183 #if(CXSC_INDEX_CHECK) 00184 throw(ERROR__OP_WITH_WRONG_DIM<E>); 00185 #else 00186 throw(); 00187 #endif 00188 template <class V,class MV,class E> friend E _vmvminus(const V &rv1, const MV &rv2) 00189 #if(CXSC_INDEX_CHECK) 00190 throw(ERROR__OP_WITH_WRONG_DIM<E>); 00191 #else 00192 throw(); 00193 #endif 00194 template <class MV,class S,class E> friend E _mvsdiv(const MV &rv, const S &s) throw(); 00195 template <class MV,class S> friend MV &_mvsmultassign(MV &v,const S &r) throw(); 00196 template <class MV, class S> friend MV &_mvsplusassign(MV &v,const S &r) throw(); 00197 template <class MV,class S> friend MV &_mvsminusassign(MV &v,const S &r) throw(); 00198 template <class MV,class S> friend MV &_mvsdivassign(MV &v,const S &r) throw(); 00199 template <class MV,class V> friend MV &_mvvplusassign(MV &v,const V &rv) 00200 #if(CXSC_INDEX_CHECK) 00201 throw(ERROR__OP_WITH_WRONG_DIM<MV>); 00202 #else 00203 throw(); 00204 #endif 00205 template <class V,class MV> friend V &_vmvplusassign(V &rv,const MV &v) 00206 #if(CXSC_INDEX_CHECK) 00207 throw(ERROR__OP_WITH_WRONG_DIM<V>); 00208 #else 00209 throw(); 00210 #endif 00211 template <class MV,class V> friend MV &_mvvminusassign(MV &v,const V &rv) 00212 #if(CXSC_INDEX_CHECK) 00213 throw(ERROR__OP_WITH_WRONG_DIM<MV>); 00214 #else 00215 throw(); 00216 #endif 00217 template <class V,class MV> friend V &_vmvminusassign(V &rv,const MV &v) 00218 #if(CXSC_INDEX_CHECK) 00219 throw(ERROR__OP_WITH_WRONG_DIM<V>); 00220 #else 00221 throw(); 00222 #endif 00223 // Real 00224 00225 00226 // interval 00227 00228 template <class V,class MV> friend V &_vmvsetinf(V &rv,const MV &v) 00229 #if(CXSC_INDEX_CHECK) 00230 throw(ERROR__OP_WITH_WRONG_DIM<V>); 00231 #else 00232 throw(); 00233 #endif 00234 template <class V,class MV> friend V &_vmvsetsup(V &rv,const MV &v) 00235 #if(CXSC_INDEX_CHECK) 00236 throw(ERROR__OP_WITH_WRONG_DIM<V>); 00237 #else 00238 throw(); 00239 #endif 00240 template <class V,class MV> friend V &_vmvusetinf(V &rv,const MV &v) 00241 #if(CXSC_INDEX_CHECK) 00242 throw(ERROR__OP_WITH_WRONG_DIM<V>); 00243 #else 00244 throw(); 00245 #endif 00246 template <class V,class MV> friend V &_vmvusetsup(V &rv,const MV &v) 00247 #if(CXSC_INDEX_CHECK) 00248 throw(ERROR__OP_WITH_WRONG_DIM<V>); 00249 #else 00250 throw(); 00251 #endif 00252 00253 #endif 00254 00255 //----------------- Konstruktoren ---------------------------------- 00256 00258 explicit INLINE cmatrix_subv (complex *d, const int &l, const int &u, const int &s, const int &st, const int &o) throw():dat(d),lb(l),ub(u),size(s),start(st),offset(o) { } 00259 public: 00261 INLINE cmatrix_subv(const cmatrix_subv &v) throw():dat(v.dat),lb(v.lb),ub(v.ub),size(v.size),start(v.start),offset(v.offset) { } 00262 public: 00263 00264 //---------------------- Standardfunktionen ------------------------ 00266 friend INLINE int Lb(const cmatrix_subv &rv) throw() { return rv.lb; } 00268 friend INLINE int Ub(const cmatrix_subv &rv) throw() { return rv.ub; } 00270 friend INLINE int VecLen(const cmatrix_subv &rv) throw() { return rv.size; } 00271 00273 INLINE complex& operator [](const int &i) const 00274 #if(CXSC_INDEX_CHECK) 00275 throw(ERROR_CVECTOR_ELEMENT_NOT_IN_VEC); 00276 #else 00277 throw(); 00278 #endif 00279 00281 INLINE complex& operator [](const int &i) 00282 #if(CXSC_INDEX_CHECK) 00283 throw(ERROR_CVECTOR_ELEMENT_NOT_IN_VEC); 00284 #else 00285 throw(); 00286 #endif 00287 00289 INLINE cmatrix_subv &operator ()() throw() { return *this; } 00291 INLINE cmatrix_subv operator ()(const int &i) 00292 #if(CXSC_INDEX_CHECK) 00293 throw(ERROR_CVECTOR_SUB_ARRAY_TOO_BIG); 00294 #else 00295 throw(); 00296 #endif 00297 00298 INLINE cmatrix_subv operator ()(const int &i1,const int &i2) 00299 #if(CXSC_INDEX_CHECK) 00300 throw(ERROR_CVECTOR_SUB_ARRAY_TOO_BIG); 00301 #else 00302 throw(); 00303 #endif 00304 00306 INLINE cmatrix_subv &operator =(const scmatrix_subv &rv); 00308 INLINE cmatrix_subv &operator =(const scvector &r); 00310 INLINE cmatrix_subv &operator =(const scvector_slice &r); 00312 INLINE cmatrix_subv &operator =(const srmatrix_subv &rv); 00314 INLINE cmatrix_subv &operator =(const srvector &r); 00316 INLINE cmatrix_subv &operator =(const srvector_slice &r); 00317 00319 INLINE cmatrix_subv &operator =(const cmatrix_subv &rv) throw(); 00321 INLINE cmatrix_subv &operator =(const complex &r) throw(); 00323 INLINE cmatrix_subv &operator =(const cmatrix &m) 00324 #if(CXSC_INDEX_CHECK) 00325 throw(ERROR_CMATRIX_TYPE_CAST_OF_THICK_OBJ); 00326 #else 00327 throw(); 00328 #endif 00329 00330 INLINE cmatrix_subv &operator =(const cmatrix_slice &m) 00331 #if(CXSC_INDEX_CHECK) 00332 throw(ERROR_CMATRIX_TYPE_CAST_OF_THICK_OBJ); 00333 #else 00334 throw(); 00335 #endif 00336 00337 INLINE cmatrix_subv &operator =(const cvector &v) 00338 #if(CXSC_INDEX_CHECK) 00339 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM); 00340 #else 00341 throw(); 00342 #endif 00343 00344 INLINE cmatrix_subv &operator =(const cvector_slice &v) 00345 #if(CXSC_INDEX_CHECK) 00346 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM); 00347 #else 00348 throw(); 00349 #endif 00350 00351 //Sparse 00353 INLINE cmatrix_subv &operator +=(const scmatrix_subv &rv); 00355 INLINE cmatrix_subv &operator +=(const scvector &r); 00357 INLINE cmatrix_subv &operator +=(const scvector_slice &r); 00359 INLINE cmatrix_subv &operator +=(const srmatrix_subv &rv); 00361 INLINE cmatrix_subv &operator +=(const srvector &r); 00363 INLINE cmatrix_subv &operator +=(const srvector_slice &r); 00365 INLINE cmatrix_subv &operator -=(const scmatrix_subv &rv); 00367 INLINE cmatrix_subv &operator -=(const scvector &r); 00369 INLINE cmatrix_subv &operator -=(const scvector_slice &r); 00371 INLINE cmatrix_subv &operator -=(const srmatrix_subv &rv); 00373 INLINE cmatrix_subv &operator -=(const srvector &r); 00375 INLINE cmatrix_subv &operator -=(const srvector_slice &r); 00376 00378 INLINE cmatrix_subv &operator *=(const complex &c) throw(); 00380 INLINE cmatrix_subv &operator +=(const complex &c) throw(); 00382 INLINE cmatrix_subv &operator -=(const complex &c) throw(); 00384 INLINE cmatrix_subv &operator /=(const complex &c) throw(); 00386 INLINE cmatrix_subv &operator -=(const cvector &rv) 00387 #if(CXSC_INDEX_CHECK) 00388 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM); 00389 #else 00390 throw(); 00391 #endif 00392 00393 INLINE cmatrix_subv &operator +=(const cvector &rv) 00394 #if(CXSC_INDEX_CHECK) 00395 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM); 00396 #else 00397 throw(); 00398 #endif 00399 00400 INLINE cmatrix_subv &operator -=(const cvector_slice &rv) 00401 #if(CXSC_INDEX_CHECK) 00402 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM); 00403 #else 00404 throw(); 00405 #endif 00406 00407 INLINE cmatrix_subv &operator +=(const cvector_slice &rv) 00408 #if(CXSC_INDEX_CHECK) 00409 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM); 00410 #else 00411 throw(); 00412 #endif 00413 // Real 00415 INLINE cmatrix_subv &operator =(const rmatrix_subv &rv) throw(); 00417 INLINE cmatrix_subv &operator =(const real &r) throw(); 00419 INLINE cmatrix_subv &operator =(const rmatrix &m) 00420 #if(CXSC_INDEX_CHECK) 00421 throw(ERROR_CMATRIX_TYPE_CAST_OF_THICK_OBJ); 00422 #else 00423 throw(); 00424 #endif 00425 00426 INLINE cmatrix_subv &operator =(const rmatrix_slice &m) 00427 #if(CXSC_INDEX_CHECK) 00428 throw(ERROR_CMATRIX_TYPE_CAST_OF_THICK_OBJ); 00429 #else 00430 throw(); 00431 #endif 00432 00433 INLINE cmatrix_subv &operator =(const rvector &v) 00434 #if(CXSC_INDEX_CHECK) 00435 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM); 00436 #else 00437 throw(); 00438 #endif 00439 00440 INLINE cmatrix_subv &operator =(const rvector_slice &v) 00441 #if(CXSC_INDEX_CHECK) 00442 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM); 00443 #else 00444 throw(); 00445 #endif 00446 00448 INLINE cmatrix_subv &operator *=(const real &c) throw(); 00450 INLINE cmatrix_subv &operator +=(const real &c) throw(); 00452 INLINE cmatrix_subv &operator -=(const real &c) throw(); 00454 INLINE cmatrix_subv &operator /=(const real &c) throw(); 00456 INLINE cmatrix_subv &operator -=(const rvector &rv) 00457 #if(CXSC_INDEX_CHECK) 00458 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM); 00459 #else 00460 throw(); 00461 #endif 00462 00463 INLINE cmatrix_subv &operator +=(const rvector &rv) 00464 #if(CXSC_INDEX_CHECK) 00465 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM); 00466 #else 00467 throw(); 00468 #endif 00469 00470 INLINE cmatrix_subv &operator -=(const rvector_slice &rv) 00471 #if(CXSC_INDEX_CHECK) 00472 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM); 00473 #else 00474 throw(); 00475 #endif 00476 00477 INLINE cmatrix_subv &operator +=(const rvector_slice &rv) 00478 #if(CXSC_INDEX_CHECK) 00479 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM); 00480 #else 00481 throw(); 00482 #endif 00483 //#else 00484 //#endif 00485 00486 }; 00487 00489 INLINE cmatrix_subv Row(cmatrix &m,const int &i) 00490 #if(CXSC_INDEX_CHECK) 00491 throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT); 00492 #else 00493 throw(); 00494 #endif 00495 00496 INLINE cmatrix_subv Col(cmatrix &m,const int &i) 00497 #if(CXSC_INDEX_CHECK) 00498 throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT); 00499 #else 00500 throw(); 00501 #endif 00502 00503 00504 00505 //----------------------- Matrix ----------------------------------------------- 00506 00507 class cmatrix_slice; 00508 00510 00513 class cmatrix 00514 { 00515 friend class cmatrix_slice; 00516 friend class cmatrix_subv; 00517 friend class cimatrix; 00518 private: 00519 complex *dat; 00520 int lb1,ub1,lb2,ub2,xsize,ysize; 00521 00522 public: 00523 double* to_blas_array() const { return (double*)dat; } 00524 //#if(CXSC_INDEX_CHECK) 00525 #ifdef _CXSC_FRIEND_TPL 00526 //----------------- Templates --------------------------------------- 00527 template <class S,class M> friend void _smconstr(S &s,const M &m) 00528 #if(CXSC_INDEX_CHECK) 00529 throw(ERROR__TYPE_CAST_OF_THICK_OBJ<M>,ERROR__USE_OF_UNINITIALIZED_OBJ<M>); 00530 #else 00531 throw(); 00532 #endif 00533 template <class V,class M,class S> friend void _vmconstr(V &v,const M &m) 00534 #if(CXSC_INDEX_CHECK) 00535 throw(ERROR__TYPE_CAST_OF_THICK_OBJ<M>); 00536 #else 00537 throw(); 00538 #endif 00539 template <class M1,class M2,class S> friend M1 &_mmassign(M1 &m1,const M2 &m,S ms) throw(); 00540 template <class M,class MS2,class S> friend M &_mmsassign(M &m,const MS2 &ms) throw(); 00541 template <class MS,class M> friend MS &_msmassign(MS &ms,const M &m) 00542 #if(CXSC_INDEX_CHECK) 00543 throw(ERROR__OP_WITH_WRONG_DIM<MS>); 00544 #else 00545 throw(); 00546 #endif 00547 template <class M,class S> friend M &_msassign(M &m,const S &r) throw(); 00548 template <class V,class M,class S> friend V &_vmassign(V &v,const M &m) 00549 #if(CXSC_INDEX_CHECK) 00550 throw(ERROR__TYPE_CAST_OF_THICK_OBJ<M>); 00551 #else 00552 throw(); 00553 #endif 00554 template <class M,class V,class S> friend M &_mvassign(M &m,const V &v) throw(); 00555 template <class M> friend int _mlb(const M &m, const int &i) 00556 #if(CXSC_INDEX_CHECK) 00557 throw(ERROR__WRONG_ROW_OR_COL<M>); 00558 #else 00559 throw(); 00560 #endif 00561 template <class M> friend int _mub(const M &m, const int &i) 00562 #if(CXSC_INDEX_CHECK) 00563 throw(ERROR__WRONG_ROW_OR_COL<M>); 00564 #else 00565 throw(); 00566 #endif 00567 template <class M> friend M &_msetlb(M &m, const int &i,const int &j) 00568 #if(CXSC_INDEX_CHECK) 00569 throw(ERROR__WRONG_ROW_OR_COL<M>); 00570 #else 00571 throw(); 00572 #endif 00573 template <class M> friend M &_msetub(M &m, const int &i,const int &j) 00574 #if(CXSC_INDEX_CHECK) 00575 throw(ERROR__WRONG_ROW_OR_COL<M>); 00576 #else 00577 throw(); 00578 #endif 00579 template <class M,class E> friend E _mre(const M &m) throw(); 00580 template <class M,class E> friend E _mim(const M &m) throw(); 00581 template <class M1,class M2> friend M1 &_mmsetre(M1 &m1,const M2 &m2) 00582 #if(CXSC_INDEX_CHECK) 00583 throw(ERROR__OP_WITH_WRONG_DIM<M1>); 00584 #else 00585 throw(); 00586 #endif 00587 template <class M1,class M2> friend M1 &_mmsetim(M1 &m1,const M2 &m2) 00588 #if(CXSC_INDEX_CHECK) 00589 throw(ERROR__OP_WITH_WRONG_DIM<M1>); 00590 #else 00591 throw(); 00592 #endif 00593 template <class M1,class MS2> friend M1 &_mmssetre(M1 &m1,const MS2 &ms2) 00594 #if(CXSC_INDEX_CHECK) 00595 throw(ERROR__OP_WITH_WRONG_DIM<M1>); 00596 #else 00597 throw(); 00598 #endif 00599 template <class M1,class MS2> friend M1 &_mmssetim(M1 &m1,const MS2 &ms2) 00600 #if(CXSC_INDEX_CHECK) 00601 throw(ERROR__OP_WITH_WRONG_DIM<M1>); 00602 #else 00603 throw(); 00604 #endif 00605 template <class M> friend void _mresize(M &A) throw(); 00606 template <class M,class S> friend void _mresize(M &A,const int &m, const int &n) 00607 #if(CXSC_INDEX_CHECK) 00608 throw(ERROR__WRONG_BOUNDARIES<M>); 00609 #else 00610 throw(); 00611 #endif 00612 template <class M,class S> friend void _mresize(M &A,const int &m1, const int &m2,const int &n1,const int &n2) 00613 #if(CXSC_INDEX_CHECK) 00614 throw(ERROR__WRONG_BOUNDARIES<M>); 00615 #else 00616 throw(); 00617 #endif 00618 template <class M,class E> friend E _mabs(const M &m) throw(); 00619 //-------------- matrix-matrix ------------- 00620 template <class M1,class M2,class E> friend E _mmplus(const M1 &m1,const M2 &m2) 00621 #if(CXSC_INDEX_CHECK) 00622 throw(ERROR__OP_WITH_WRONG_DIM<M1>); 00623 #else 00624 throw(); 00625 #endif 00626 template <class M,class MS,class E> friend E _mmsplus(const M &m,const MS &ms) 00627 #if(CXSC_INDEX_CHECK) 00628 throw(ERROR__OP_WITH_WRONG_DIM<M>); 00629 #else 00630 throw(); 00631 #endif 00632 template <class M> friend M _mminus(const M &m) throw(); 00633 template <class MS,class E> friend E _msminus(const MS &ms) throw(); 00634 template <class M1,class M2,class E> friend E _mmminus(const M1 &m1,const M2 &m2) 00635 #if(CXSC_INDEX_CHECK) 00636 throw(ERROR__OP_WITH_WRONG_DIM<M1>); 00637 #else 00638 throw(); 00639 #endif 00640 template <class M1,class M2> friend M1 &_mmplusassign(M1 &m1,const M2 &m2) 00641 #if(CXSC_INDEX_CHECK) 00642 throw(ERROR__OP_WITH_WRONG_DIM<M1>); 00643 #else 00644 throw(); 00645 #endif 00646 template <class M,class MS> friend M &_mmsplusassign(M &m1,const MS &ms) 00647 #if(CXSC_INDEX_CHECK) 00648 throw(ERROR__OP_WITH_WRONG_DIM<M>); 00649 #else 00650 throw(); 00651 #endif 00652 template <class MS,class M> friend MS &_msmplusassign(MS &ms,const M &m1) 00653 #if(CXSC_INDEX_CHECK) 00654 throw(ERROR__OP_WITH_WRONG_DIM<MS>); 00655 #else 00656 throw(); 00657 #endif 00658 template <class MS1,class MS2,class E> friend E _msmsplus(const MS1 &m1,const MS2 &m2) 00659 #if(CXSC_INDEX_CHECK) 00660 throw(ERROR__OP_WITH_WRONG_DIM<E>); 00661 #else 00662 throw(); 00663 #endif 00664 template <class M,class MS,class E> friend E _mmsminus(const M &m,const MS &ms) 00665 #if(CXSC_INDEX_CHECK) 00666 throw(ERROR__OP_WITH_WRONG_DIM<E>); 00667 #else 00668 throw(); 00669 #endif 00670 template <class MS,class M,class E> friend E _msmminus(const MS &ms,const M &m) 00671 #if(CXSC_INDEX_CHECK) 00672 throw(ERROR__OP_WITH_WRONG_DIM<E>); 00673 #else 00674 throw(); 00675 #endif 00676 template <class MS1,class MS2,class E> friend E _msmsminus(const MS1 &ms1,const MS2 &ms2) 00677 #if(CXSC_INDEX_CHECK) 00678 throw(ERROR__OP_WITH_WRONG_DIM<E>); 00679 #else 00680 throw(); 00681 #endif 00682 template <class M1,class M2> friend M1 &_mmminusassign(M1 &m1,const M2 &m2) 00683 #if(CXSC_INDEX_CHECK) 00684 throw(ERROR__OP_WITH_WRONG_DIM<M1>); 00685 #else 00686 throw(); 00687 #endif 00688 template <class M,class MS> friend M &_mmsminusassign(M &m1,const MS &ms) 00689 #if(CXSC_INDEX_CHECK) 00690 throw(ERROR__OP_WITH_WRONG_DIM<M>); 00691 #else 00692 throw(); 00693 #endif 00694 template <class MS,class M> friend MS &_msmminusassign(MS &ms,const M &m1) 00695 #if(CXSC_INDEX_CHECK) 00696 throw(ERROR__OP_WITH_WRONG_DIM<MS>); 00697 #else 00698 throw(); 00699 #endif 00700 template <class M1,class M2,class E> friend E _mmcmult(const M1 &m1, const M2 &m2) 00701 #if(CXSC_INDEX_CHECK) 00702 throw(ERROR__OP_WITH_WRONG_DIM<E>); 00703 #else 00704 throw(); 00705 #endif 00706 template <class M1,class M2,class E> friend E _mmcimult(const M1 &m1, const M2 &m2) 00707 #if(CXSC_INDEX_CHECK) 00708 throw(ERROR__OP_WITH_WRONG_DIM<E>); 00709 #else 00710 throw(); 00711 #endif 00712 template <class M1,class M2,class S> friend M1 &_mmcmultassign(M1 &m1,const M2 &m2) 00713 #if(CXSC_INDEX_CHECK) 00714 throw(ERROR__OP_WITH_WRONG_DIM<M1>); 00715 #else 00716 throw(); 00717 #endif 00718 template <class M1,class M2,class S> friend M1 &_mmcimultassign(M1 &m1,const M2 &m2) 00719 #if(CXSC_INDEX_CHECK) 00720 throw(ERROR__OP_WITH_WRONG_DIM<M1>); 00721 #else 00722 throw(); 00723 #endif 00724 template <class M,class MS,class E> friend E _mmscmult(const M &m1, const MS &ms) 00725 #if(CXSC_INDEX_CHECK) 00726 throw(ERROR__OP_WITH_WRONG_DIM<E>); 00727 #else 00728 throw(); 00729 #endif 00730 template <class M,class MS,class E> friend E _mmscimult(const M &m1, const MS &ms) 00731 #if(CXSC_INDEX_CHECK) 00732 throw(ERROR__OP_WITH_WRONG_DIM<E>); 00733 #else 00734 throw(); 00735 #endif 00736 template <class MS,class M,class E> friend E _msmcmult(const MS &ms, const M &m2) 00737 #if(CXSC_INDEX_CHECK) 00738 throw(ERROR__OP_WITH_WRONG_DIM<E>); 00739 #else 00740 throw(); 00741 #endif 00742 template <class MS,class M,class E> friend E _msmcimult(const MS &ms, const M &m2) 00743 #if(CXSC_INDEX_CHECK) 00744 throw(ERROR__OP_WITH_WRONG_DIM<E>); 00745 #else 00746 throw(); 00747 #endif 00748 template <class M,class MS,class S> friend M &_mmscmultassign(M &m1,const MS &ms) 00749 #if(CXSC_INDEX_CHECK) 00750 throw(ERROR__OP_WITH_WRONG_DIM<M>); 00751 #else 00752 throw(); 00753 #endif 00754 template <class M,class MS,class S> friend M &_mmscimultassign(M &m1,const MS &ms) 00755 #if(CXSC_INDEX_CHECK) 00756 throw(ERROR__OP_WITH_WRONG_DIM<M>); 00757 #else 00758 throw(); 00759 #endif 00760 template <class MS1,class MS2,class E> friend E _msmscmult(const MS1 &ms1, const MS2 &ms2) 00761 #if(CXSC_INDEX_CHECK) 00762 throw(ERROR__OP_WITH_WRONG_DIM<E>); 00763 #else 00764 throw(); 00765 #endif 00766 template <class MS1,class MS2,class E> friend E _msmscimult(const MS1 &ms1, const MS2 &ms2) 00767 #if(CXSC_INDEX_CHECK) 00768 throw(ERROR__OP_WITH_WRONG_DIM<E>); 00769 #else 00770 throw(); 00771 #endif 00772 template <class M1,class M2,class E> friend E _mmconv(const M1 &m1,const M2 &m2) 00773 #if(CXSC_INDEX_CHECK) 00774 throw(ERROR__OP_WITH_WRONG_DIM<M1>); 00775 #else 00776 throw(); 00777 #endif 00778 template <class M,class MS,class E> friend E _mmsconv(const M &m,const MS &ms) 00779 #if(CXSC_INDEX_CHECK) 00780 throw(ERROR__OP_WITH_WRONG_DIM<M>); 00781 #else 00782 throw(); 00783 #endif 00784 //-------- matrix-scalar ----------------- 00785 template <class S,class M,class E> friend E _smmult(const S &c, const M &m) throw(); 00786 template <class M,class S> friend M &_msmultassign(M &m,const S &c) throw(); 00787 template <class S,class MS,class E> friend E _smsmult(const S &c, const MS &ms) throw(); 00788 template <class M,class S,class E> friend E _msdiv(const M &m,const S &c) throw(); 00789 template <class M,class S> friend M &_msdivassign(M &m,const S &c) throw(); 00790 template <class MS,class S,class E> friend E _mssdiv(const MS &ms, const S &c) throw(); 00791 //-------- matrix-vector --------------------- 00792 template <class M,class V,class E> friend E _mvcmult(const M &m,const V &v) 00793 #if(CXSC_INDEX_CHECK) 00794 throw(ERROR__OP_WITH_WRONG_DIM<M>); 00795 #else 00796 throw(); 00797 #endif 00798 template <class M,class V,class E> friend E _mvcimult(const M &m,const V &v) 00799 #if(CXSC_INDEX_CHECK) 00800 throw(ERROR__OP_WITH_WRONG_DIM<M>); 00801 #else 00802 throw(); 00803 #endif 00804 template <class V,class M,class E> friend E _vmcmult(const V &v,const M &m) 00805 #if(CXSC_INDEX_CHECK) 00806 throw(ERROR__OP_WITH_WRONG_DIM<M>); 00807 #else 00808 throw(); 00809 #endif 00810 template <class V,class M,class E> friend E _vmcimult(const V &v,const M &m) 00811 #if(CXSC_INDEX_CHECK) 00812 throw(ERROR__OP_WITH_WRONG_DIM<M>); 00813 #else 00814 throw(); 00815 #endif 00816 template <class V,class M,class S> friend V &_vmcmultassign(V &v,const M &m) 00817 #if(CXSC_INDEX_CHECK) 00818 throw(ERROR__OP_WITH_WRONG_DIM<M>); 00819 #else 00820 throw(); 00821 #endif 00822 template <class V,class M,class S> friend V &_vmcimultassign(V &v,const M &m) 00823 #if(CXSC_INDEX_CHECK) 00824 throw(ERROR__OP_WITH_WRONG_DIM<M>); 00825 #else 00826 throw(); 00827 #endif 00828 template <class VS,class M,class S> friend VS &_vsmcmultassign(VS &v,const M &m) 00829 #if(CXSC_INDEX_CHECK) 00830 throw(ERROR__OP_WITH_WRONG_DIM<M>); 00831 #else 00832 throw(); 00833 #endif 00834 template <class VS,class M,class S> friend VS &_vsmcimultassign(VS &v,const M &m) 00835 #if(CXSC_INDEX_CHECK) 00836 throw(ERROR__OP_WITH_WRONG_DIM<M>); 00837 #else 00838 throw(); 00839 #endif 00840 00841 template <class M> friend void *_mvoid(const M &m) throw(); 00842 template <class M> friend bool _mnot(const M &m) throw(); 00843 template <class MS> friend void *_msvoid(const MS &ms) throw(); 00844 template <class MS> friend bool _msnot(const MS &ms) throw(); 00845 template <class M1,class M2> friend bool _mmeq(const M1 &m1,const M2 &m2) throw(); 00846 template <class M1,class M2> friend bool _mmneq(const M1 &m1,const M2 &m2) throw(); 00847 template <class M1,class M2> friend bool _mmless(const M1 &m1,const M2 &m2) throw(); 00848 template <class M1,class M2> friend bool _mmleq(const M1 &m1,const M2 &m2) throw(); 00849 template <class M,class MS> friend bool _mmseq(const M &m1,const MS &ms) throw(); 00850 template <class M,class MS> friend bool _mmsneq(const M &m1,const MS &ms) throw(); 00851 template <class M,class MS> friend bool _mmsless(const M &m1,const MS &ms) throw(); 00852 template <class M,class MS> friend bool _mmsleq(const M &m1,const MS &ms) throw(); 00853 template <class MS,class M> friend bool _msmless(const MS &ms,const M &m1) throw(); 00854 template <class MS,class M> friend bool _msmleq(const MS &ms,const M &m1) throw(); 00855 template <class M> friend std::ostream &_mout(std::ostream &s,const M &r) throw(); 00856 template <class M> friend std::istream &_min(std::istream &s,M &r) throw(); 00857 00858 // Real 00859 00860 //--- Real --------- matrix-matrix ---------------------- 00861 00862 //--- Real --------- matrix-scalar ---------------------- 00863 00864 //--- Real --------- matrix-vector ---------------------- 00865 template <class MS,class V,class E> friend E _msvcmult(const MS &ms,const V &v) 00866 #if(CXSC_INDEX_CHECK) 00867 throw(ERROR__OP_WITH_WRONG_DIM<MS>); 00868 #else 00869 throw(); 00870 #endif 00871 template <class MS,class V,class E> friend E _msvcimult(const MS &ms,const V &v) 00872 #if(CXSC_INDEX_CHECK) 00873 throw(ERROR__OP_WITH_WRONG_DIM<MS>); 00874 #else 00875 throw(); 00876 #endif 00877 template <class V,class MS,class E> friend E _vmscmult(const V &v,const MS &ms) 00878 #if(CXSC_INDEX_CHECK) 00879 throw(ERROR__OP_WITH_WRONG_DIM<MS>); 00880 #else 00881 throw(); 00882 #endif 00883 template <class V,class MS,class E> friend E _vmscimult(const V &v,const MS &ms) 00884 #if(CXSC_INDEX_CHECK) 00885 throw(ERROR__OP_WITH_WRONG_DIM<MS>); 00886 #else 00887 throw(); 00888 #endif 00889 00890 // interval -------- 00891 // matrix-matrix 00892 00893 template <class MS1,class MS2,class E> friend E _msmsconv(const MS1 &m1,const MS2 &m2) 00894 #if(CXSC_INDEX_CHECK) 00895 throw(ERROR__OP_WITH_WRONG_DIM<E>); 00896 #else 00897 throw(); 00898 #endif 00899 template <class M1,class M2,class E> friend E _mmsect(const M1 &m1,const M2 &m2) 00900 #if(CXSC_INDEX_CHECK) 00901 throw(ERROR__OP_WITH_WRONG_DIM<M1>); 00902 #else 00903 throw(); 00904 #endif 00905 template <class M,class MS,class E> friend E _mmssect(const M &m,const MS &ms) 00906 #if(CXSC_INDEX_CHECK) 00907 throw(ERROR__OP_WITH_WRONG_DIM<M>); 00908 #else 00909 throw(); 00910 #endif 00911 00912 template <class MS1,class MS2,class E> friend E _msmssect(const MS1 &m1,const MS2 &m2) 00913 #if(CXSC_INDEX_CHECK) 00914 throw(ERROR__OP_WITH_WRONG_DIM<E>); 00915 #else 00916 throw(); 00917 #endif 00918 // matrix-scalar 00919 00920 // matrix-vector 00921 00922 // cinterval ---------- 00923 00924 template <class M,class E> friend E _mdiam(const M &m) throw(); 00925 template <class M,class E> friend E _mmid(const M &m) throw(); 00926 template <class MS,class E> friend E _msdiam(const MS &ms) throw(); 00927 template <class MS,class E> friend E _msmid(const MS &ms) throw(); 00928 template <class M,class E> friend E _minf(const M &m) throw(); 00929 template <class MS,class E> friend E _msinf(const MS &ms) throw(); 00930 template <class M,class E> friend E _msup(const M &m) throw(); 00931 template <class MS,class E> friend E _mssup(const MS &ms) throw(); 00932 template <class M1,class M2> friend M1 &_mmsetinf(M1 &m1,const M2 &m2) 00933 #if(CXSC_INDEX_CHECK) 00934 throw(ERROR__OP_WITH_WRONG_DIM<M1>); 00935 #else 00936 throw(); 00937 #endif 00938 template <class M1,class M2> friend M1 &_mmsetsup(M1 &m1,const M2 &m2) 00939 #if(CXSC_INDEX_CHECK) 00940 throw(ERROR__OP_WITH_WRONG_DIM<M1>); 00941 #else 00942 throw(); 00943 #endif 00944 template <class M1,class M2> friend M1 &_mmusetinf(M1 &m1,const M2 &m2) 00945 #if(CXSC_INDEX_CHECK) 00946 throw(ERROR__OP_WITH_WRONG_DIM<M1>); 00947 #else 00948 throw(); 00949 #endif 00950 template <class M1,class M2> friend M1 &_mmusetsup(M1 &m1,const M2 &m2) 00951 #if(CXSC_INDEX_CHECK) 00952 throw(ERROR__OP_WITH_WRONG_DIM<M1>); 00953 #else 00954 throw(); 00955 #endif 00956 template <class MS1,class M2> friend MS1 &_msmsetinf(MS1 &ms1,const M2 &m2) 00957 #if(CXSC_INDEX_CHECK) 00958 throw(ERROR__OP_WITH_WRONG_DIM<MS1>); 00959 #else 00960 throw(); 00961 #endif 00962 template <class MS1,class M2> friend MS1 &_msmsetsup(MS1 &ms1,const M2 &m2) 00963 #if(CXSC_INDEX_CHECK) 00964 throw(ERROR__OP_WITH_WRONG_DIM<MS1>); 00965 #else 00966 throw(); 00967 #endif 00968 template <class MS1,class M2> friend MS1 &_msmusetinf(MS1 &ms1,const M2 &m2) 00969 #if(CXSC_INDEX_CHECK) 00970 throw(ERROR__OP_WITH_WRONG_DIM<MS1>); 00971 #else 00972 throw(); 00973 #endif 00974 template <class MS1,class M2> friend MS1 &_msmusetsup(MS1 &ms1,const M2 &m2) 00975 #if(CXSC_INDEX_CHECK) 00976 throw(ERROR__OP_WITH_WRONG_DIM<MS1>); 00977 #else 00978 throw(); 00979 #endif 00980 00981 // matrix-matrix 00982 00983 template <class M1,class M2> friend M1 &_mmconvassign(M1 &m1,const M2 &m2) 00984 #if(CXSC_INDEX_CHECK) 00985 throw(ERROR__OP_WITH_WRONG_DIM<M1>); 00986 #else 00987 throw(); 00988 #endif 00989 template <class M,class MS> friend M &_mmsconvassign(M &m1,const MS &ms) 00990 #if(CXSC_INDEX_CHECK) 00991 throw(ERROR__OP_WITH_WRONG_DIM<M>); 00992 #else 00993 throw(); 00994 #endif 00995 template <class MS,class M> friend MS &_msmconvassign(MS &ms,const M &m1) 00996 #if(CXSC_INDEX_CHECK) 00997 throw(ERROR__OP_WITH_WRONG_DIM<MS>); 00998 #else 00999 throw(); 01000 #endif 01001 01002 template <class M1,class M2> friend M1 &_mmsectassign(M1 &m1,const M2 &m2) 01003 #if(CXSC_INDEX_CHECK) 01004 throw(ERROR__OP_WITH_WRONG_DIM<M1>); 01005 #else 01006 throw(); 01007 #endif 01008 template <class M,class MS> friend M &_mmssectassign(M &m1,const MS &ms) 01009 #if(CXSC_INDEX_CHECK) 01010 throw(ERROR__OP_WITH_WRONG_DIM<M>); 01011 #else 01012 throw(); 01013 #endif 01014 template <class MS,class M> friend MS &_msmsectassign(MS &ms,const M &m1) 01015 #if(CXSC_INDEX_CHECK) 01016 throw(ERROR__OP_WITH_WRONG_DIM<MS>); 01017 #else 01018 throw(); 01019 #endif 01020 // matrix-scalar 01021 01022 // matrix-vector 01023 01024 #endif 01025 01026 //-------------------------- Konstruktoren ---------------------------- 01027 01028 // complex 01030 INLINE cmatrix(const cmatrix &rm) throw(); 01032 INLINE cmatrix(const cmatrix_slice &rm) throw(); 01034 INLINE cmatrix(const scmatrix &rm); 01036 INLINE cmatrix(const scmatrix_slice &rm); 01038 INLINE cmatrix() throw(); 01040 explicit INLINE cmatrix(const int &m, const int &n) 01041 #if(CXSC_INDEX_CHECK) 01042 throw(ERROR_CMATRIX_WRONG_BOUNDARIES); 01043 #else 01044 throw(); 01045 #endif 01046 01047 explicit INLINE cmatrix(const int &m1, const int &n1, const int &m2, const int &n2) 01048 #if(CXSC_INDEX_CHECK) 01049 throw(ERROR_CMATRIX_WRONG_BOUNDARIES); 01050 #else 01051 throw(); 01052 #endif 01053 01054 explicit INLINE cmatrix(const cvector &v) throw(); 01056 explicit INLINE cmatrix(const cvector_slice &v) throw(); 01058 explicit INLINE cmatrix(const complex &r) throw(); 01060 INLINE cmatrix &operator =(const complex &r) throw(); 01062 INLINE cmatrix &operator =(const cmatrix &m) throw(); 01064 INLINE cmatrix &operator =(const cmatrix_slice &ms) throw(); 01066 INLINE cmatrix &operator =(const scmatrix &m); 01068 INLINE cmatrix &operator =(const scmatrix_slice &ms); 01070 INLINE cmatrix &operator =(const cvector &v) throw(); 01072 INLINE cmatrix &operator =(const cvector_slice &v) throw(); 01073 // real 01075 explicit INLINE cmatrix(const real &) throw(); 01077 explicit INLINE cmatrix(const rmatrix &rm) throw(); 01079 explicit INLINE cmatrix(const rmatrix_slice &rm) throw(); 01081 explicit INLINE cmatrix(const srmatrix &rm); 01083 explicit INLINE cmatrix(const srmatrix_slice &rm); 01085 explicit INLINE cmatrix(const rvector &v) throw(); 01087 explicit INLINE cmatrix(const rvector_slice &v) throw(); 01089 INLINE cmatrix &operator =(const real &r) throw(); 01091 INLINE cmatrix &operator =(const rmatrix &m) throw(); 01093 INLINE cmatrix &operator =(const rmatrix_slice &ms) throw(); 01095 INLINE cmatrix &operator =(const srmatrix &m); 01097 INLINE cmatrix &operator =(const srmatrix_slice &ms); 01099 INLINE cmatrix &operator =(const rvector &v) throw(); 01101 INLINE cmatrix &operator =(const rvector_slice &v) throw(); 01102 01103 //--------------------------- Destruktoren ----------------------------- 01104 01105 INLINE ~cmatrix() throw() { delete [] dat; } 01106 01107 01108 //--------------------------- Operatoren ----------------------------- 01110 INLINE cmatrix &operator +=(const srmatrix &m); 01112 INLINE cmatrix &operator +=(const srmatrix_slice &ms); 01114 INLINE cmatrix &operator +=(const scmatrix &m); 01116 INLINE cmatrix &operator +=(const scmatrix_slice &ms); 01118 INLINE cmatrix &operator -=(const srmatrix &m); 01120 INLINE cmatrix &operator -=(const srmatrix_slice &ms); 01122 INLINE cmatrix &operator -=(const scmatrix &m); 01124 INLINE cmatrix &operator -=(const scmatrix_slice &ms); 01126 INLINE cmatrix &operator *=(const srmatrix &m); 01128 INLINE cmatrix &operator *=(const srmatrix_slice &ms); 01130 INLINE cmatrix &operator *=(const scmatrix &m); 01132 INLINE cmatrix &operator *=(const scmatrix_slice &ms); 01133 01135 INLINE cmatrix operator()(const intvector& p, const intvector& q); 01137 INLINE cmatrix operator()(const intmatrix& P, const intmatrix& Q); 01139 INLINE cmatrix operator()(const intvector& p); 01141 INLINE cmatrix operator()(const intmatrix& P); 01142 01143 01144 //------------------------- Standardfunktionen ------------------------- 01145 01147 INLINE cmatrix_subv operator [](const int &i) const 01148 #if(CXSC_INDEX_CHECK) 01149 throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT); 01150 #else 01151 throw(); 01152 #endif 01153 01154 INLINE cmatrix_subv operator [](const cxscmatrix_column &i) const 01155 #if(CXSC_INDEX_CHECK) 01156 throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT); 01157 #else 01158 throw(); 01159 #endif 01160 01161 INLINE cmatrix_subv operator [](const int &i) 01162 #if(CXSC_INDEX_CHECK) 01163 throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT); 01164 #else 01165 throw(); 01166 #endif 01167 01168 INLINE cmatrix_subv operator [](const cxscmatrix_column &i) 01169 #if(CXSC_INDEX_CHECK) 01170 throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT); 01171 #else 01172 throw(); 01173 #endif 01174 01175 INLINE cmatrix &operator ()() throw() { return *this; } 01177 INLINE cmatrix_slice operator ()(const int &m, const int &n) 01178 #if(CXSC_INDEX_CHECK) 01179 throw(ERROR_CMATRIX_SUB_ARRAY_TOO_BIG); 01180 #else 01181 throw(); 01182 #endif 01183 01184 INLINE cmatrix_slice operator ()(const int &m1, const int &m2, const int &n1, const int &n2) 01185 #if(CXSC_INDEX_CHECK) 01186 throw(ERROR_CMATRIX_SUB_ARRAY_TOO_BIG); 01187 #else 01188 throw(); 01189 #endif 01190 INLINE operator void*() throw(); 01191 //#else 01192 //#endif 01193 }; 01194 01195 01197 01202 class cmatrix_slice 01203 { 01204 friend class cmatrix; 01205 friend class cimatrix; 01206 private: 01207 complex *dat; 01208 int offset1,offset2,mxsize,mysize; 01209 int start1,end1,start2,end2,sxsize,sysize; // slice size 01210 01211 public: 01212 //#if(CXSC_INDEX_CHECK) 01213 #ifdef _CXSC_FRIEND_TPL 01214 //----------------- Templates --------------------------------------- 01215 template <class V,class MS,class S> friend void _vmsconstr(V &v,const MS &m) 01216 #if(CXSC_INDEX_CHECK) 01217 throw(ERROR__TYPE_CAST_OF_THICK_OBJ<MS>); 01218 #else 01219 throw(); 01220 #endif 01221 template <class MS,class M> friend MS &_msmassign(MS &ms,const M &m) 01222 #if(CXSC_INDEX_CHECK) 01223 throw(ERROR__OP_WITH_WRONG_DIM<MS>); 01224 #else 01225 throw(); 01226 #endif 01227 template <class MS1,class MS2> friend MS1 &_msmsassign(MS1 &ms1,const MS2 &ms) 01228 #if(CXSC_INDEX_CHECK) 01229 throw(ERROR__OP_WITH_WRONG_DIM<MS1>); 01230 #else 01231 throw(); 01232 #endif 01233 template <class M,class MS2,class S> friend M &_mmsassign(M &m,const MS2 &ms) throw(); 01234 template <class MS,class S> friend MS &_mssassign(MS &ms,const S &r) throw(); 01235 01236 template <class MS> friend int _mslb(const MS &ms, const int &i) 01237 #if(CXSC_INDEX_CHECK) 01238 throw(ERROR__WRONG_ROW_OR_COL<MS>); 01239 #else 01240 throw(); 01241 #endif 01242 template <class MS> friend int _msub(const MS &ms, const int &i) 01243 #if(CXSC_INDEX_CHECK) 01244 throw(ERROR__WRONG_ROW_OR_COL<MS>); 01245 #else 01246 throw(); 01247 #endif 01248 template <class MS,class E> friend E _msre(const MS &ms) throw(); 01249 template <class MS,class E> friend E _msim(const MS &ms) throw(); 01250 template <class MS1,class M2> friend MS1 &_msmsetre(MS1 &ms1,const M2 &m2) 01251 #if(CXSC_INDEX_CHECK) 01252 throw(ERROR__OP_WITH_WRONG_DIM<MS1>); 01253 #else 01254 throw(); 01255 #endif 01256 template <class MS1,class M2> friend MS1 &_msmsetim(MS1 &ms1,const M2 &m2) 01257 #if(CXSC_INDEX_CHECK) 01258 throw(ERROR__OP_WITH_WRONG_DIM<MS1>); 01259 #else 01260 throw(); 01261 #endif 01262 template <class MS1,class MS2> friend MS1 &_msmssetre(MS1 &ms1,const MS2 &ms2) 01263 #if(CXSC_INDEX_CHECK) 01264 throw(ERROR__OP_WITH_WRONG_DIM<MS1>); 01265 #else 01266 throw(); 01267 #endif 01268 template <class MS1,class MS2> friend MS1 &_msmssetim(MS1 &ms1,const MS2 &ms2) 01269 #if(CXSC_INDEX_CHECK) 01270 throw(ERROR__OP_WITH_WRONG_DIM<MS1>); 01271 #else 01272 throw(); 01273 #endif 01274 template <class MS,class E> friend E _msabs(const MS &ms) throw(); 01275 //-------- matrix-matrix -------------- 01276 template <class MS,class E> friend E _msminus(const MS &ms) throw(); 01277 template <class M,class MS,class E> friend E _mmsplus(const M &m,const MS &ms) 01278 #if(CXSC_INDEX_CHECK) 01279 throw(ERROR__OP_WITH_WRONG_DIM<M>); 01280 #else 01281 throw(); 01282 #endif 01283 template <class MS1,class MS2,class E> friend E _msmsplus(const MS1 &m1,const MS2 &m2) 01284 #if(CXSC_INDEX_CHECK) 01285 throw(ERROR__OP_WITH_WRONG_DIM<E>); 01286 #else 01287 throw(); 01288 #endif 01289 template <class M,class MS> friend M &_mmsplusassign(M &m1,const MS &ms) 01290 #if(CXSC_INDEX_CHECK) 01291 throw(ERROR__OP_WITH_WRONG_DIM<M>); 01292 #else 01293 throw(); 01294 #endif 01295 template <class MS,class M> friend MS &_msmplusassign(MS &ms,const M &m1) 01296 #if(CXSC_INDEX_CHECK) 01297 throw(ERROR__OP_WITH_WRONG_DIM<MS>); 01298 #else 01299 throw(); 01300 #endif 01301 template <class MS1,class MS2> friend MS1 &_msmsplusassign(MS1 &ms1,const MS2 &ms2) 01302 #if(CXSC_INDEX_CHECK) 01303 throw(ERROR__OP_WITH_WRONG_DIM<MS1>); 01304 #else 01305 throw(); 01306 #endif 01307 template <class M,class MS,class E> friend E _mmsminus(const M &m,const MS &ms) 01308 #if(CXSC_INDEX_CHECK) 01309 throw(ERROR__OP_WITH_WRONG_DIM<E>); 01310 #else 01311 throw(); 01312 #endif 01313 template <class MS,class M,class E> friend E _msmminus(const MS &ms,const M &m) 01314 #if(CXSC_INDEX_CHECK) 01315 throw(ERROR__OP_WITH_WRONG_DIM<E>); 01316 #else 01317 throw(); 01318 #endif 01319 template <class MS1,class MS2,class E> friend E _msmsminus(const MS1 &ms1,const MS2 &ms2) 01320 #if(CXSC_INDEX_CHECK) 01321 throw(ERROR__OP_WITH_WRONG_DIM<E>); 01322 #else 01323 throw(); 01324 #endif 01325 template <class M,class MS> friend M &_mmsminusassign(M &m1,const MS &ms) 01326 #if(CXSC_INDEX_CHECK) 01327 throw(ERROR__OP_WITH_WRONG_DIM<M>); 01328 #else 01329 throw(); 01330 #endif 01331 template <class MS,class M> friend MS &_msmminusassign(MS &ms,const M &m1) 01332 #if(CXSC_INDEX_CHECK) 01333 throw(ERROR__OP_WITH_WRONG_DIM<MS>); 01334 #else 01335 throw(); 01336 #endif 01337 template <class MS1,class MS2> friend MS1 &_msmsminusassign(MS1 &ms1,const MS2 &ms2) 01338 #if(CXSC_INDEX_CHECK) 01339 throw(ERROR__OP_WITH_WRONG_DIM<MS1>); 01340 #else 01341 throw(); 01342 #endif 01343 template <class M,class MS,class E> friend E _mmscmult(const M &m1, const MS &ms) 01344 #if(CXSC_INDEX_CHECK) 01345 throw(ERROR__OP_WITH_WRONG_DIM<E>); 01346 #else 01347 throw(); 01348 #endif 01349 template <class M,class MS,class E> friend E _mmscimult(const M &m1, const MS &ms) 01350 #if(CXSC_INDEX_CHECK) 01351 throw(ERROR__OP_WITH_WRONG_DIM<E>); 01352 #else 01353 throw(); 01354 #endif 01355 template <class MS,class M,class E> friend E _msmcmult(const MS &ms, const M &m2) 01356 #if(CXSC_INDEX_CHECK) 01357 throw(ERROR__OP_WITH_WRONG_DIM<E>); 01358 #else 01359 throw(); 01360 #endif 01361 template <class MS,class M,class E> friend E _msmcimult(const MS &ms, const M &m2) 01362 #if(CXSC_INDEX_CHECK) 01363 throw(ERROR__OP_WITH_WRONG_DIM<E>); 01364 #else 01365 throw(); 01366 #endif 01367 template <class M,class MS,class S> friend M &_mmscmultassign(M &m1,const MS &ms) 01368 #if(CXSC_INDEX_CHECK) 01369 throw(ERROR__OP_WITH_WRONG_DIM<M>); 01370 #else 01371 throw(); 01372 #endif 01373 template <class M,class MS,class S> friend M &_mmscimultassign(M &m1,const MS &ms) 01374 #if(CXSC_INDEX_CHECK) 01375 throw(ERROR__OP_WITH_WRONG_DIM<M>); 01376 #else 01377 throw(); 01378 #endif 01379 template <class MS1,class MS2,class E> friend E _msmscmult(const MS1 &ms1, const MS2 &ms2) 01380 #if(CXSC_INDEX_CHECK) 01381 throw(ERROR__OP_WITH_WRONG_DIM<E>); 01382 #else 01383 throw(); 01384 #endif 01385 template <class MS1,class MS2,class E> friend E _msmscimult(const MS1 &ms1, const MS2 &ms2) 01386 #if(CXSC_INDEX_CHECK) 01387 throw(ERROR__OP_WITH_WRONG_DIM<E>); 01388 #else 01389 throw(); 01390 #endif 01391 template <class M,class MS,class E> friend E _mmsconv(const M &m,const MS &ms) 01392 #if(CXSC_INDEX_CHECK) 01393 throw(ERROR__OP_WITH_WRONG_DIM<M>); 01394 #else 01395 throw(); 01396 #endif 01397 template <class MS1,class MS2,class E> friend E _msmsconv(const MS1 &m1,const MS2 &m2) 01398 #if(CXSC_INDEX_CHECK) 01399 throw(ERROR__OP_WITH_WRONG_DIM<E>); 01400 #else 01401 throw(); 01402 #endif 01403 //--------- matrix-vector -------------- 01404 template <class MS,class V,class E> friend E _msvcmult(const MS &ms,const V &v) 01405 #if(CXSC_INDEX_CHECK) 01406 throw(ERROR__OP_WITH_WRONG_DIM<MS>); 01407 #else 01408 throw(); 01409 #endif 01410 template <class MS,class V,class E> friend E _msvcimult(const MS &ms,const V &v) 01411 #if(CXSC_INDEX_CHECK) 01412 throw(ERROR__OP_WITH_WRONG_DIM<MS>); 01413 #else 01414 throw(); 01415 #endif 01416 template <class V,class MS,class E> friend E _vmscmult(const V &v,const MS &ms) 01417 #if(CXSC_INDEX_CHECK) 01418 throw(ERROR__OP_WITH_WRONG_DIM<MS>); 01419 #else 01420 throw(); 01421 #endif 01422 template <class V,class MS,class E> friend E _vmscimult(const V &v,const MS &ms) 01423 #if(CXSC_INDEX_CHECK) 01424 throw(ERROR__OP_WITH_WRONG_DIM<MS>); 01425 #else 01426 throw(); 01427 #endif 01428 template <class V,class MS,class S> friend V &_vmscmultassign(V &v,const MS &ms) 01429 #if(CXSC_INDEX_CHECK) 01430 throw(ERROR__OP_WITH_WRONG_DIM<MS>); 01431 #else 01432 throw(); 01433 #endif 01434 template <class V,class MS,class S> friend V &_vmscimultassign(V &v,const MS &ms) 01435 #if(CXSC_INDEX_CHECK) 01436 throw(ERROR__OP_WITH_WRONG_DIM<MS>); 01437 #else 01438 throw(); 01439 #endif 01440 //--------- matrix-scalar -------------- 01441 template <class S,class MS,class E> friend E _smsmult(const S &c, const MS &ms) throw(); 01442 template <class MS,class S> friend MS &_mssmultassign(MS &ms,const S &c) throw(); 01443 template <class MS,class S,class E> friend E _mssdiv(const MS &ms, const S &c) throw(); 01444 template <class MS,class S> friend MS &_mssdivassign(MS &ms,const S &c) throw(); 01445 01446 template <class MS> friend void *_msvoid(const MS &ms) throw(); 01447 template <class MS> friend bool _msnot(const MS &ms) throw(); 01448 template <class M,class MS> friend bool _mmseq(const M &m1,const MS &ms) throw(); 01449 template <class M,class MS> friend bool _mmsneq(const M &m1,const MS &ms) throw(); 01450 template <class M,class MS> friend bool _mmsless(const M &m1,const MS &ms) throw(); 01451 template <class M,class MS> friend bool _mmsleq(const M &m1,const MS &ms) throw(); 01452 template <class MS,class M> friend bool _msmless(const MS &ms,const M &m1) throw(); 01453 template <class MS,class M> friend bool _msmleq(const MS &ms,const M &m1) throw(); 01454 template <class MS1,class MS2> friend bool _msmseq(const MS1 &ms1,const MS2 &ms2) throw(); 01455 template <class MS1,class MS2> friend bool _msmsneq(const MS1 &ms1,const MS2 &ms2) throw(); 01456 template <class MS1,class MS2> friend bool _msmsless(const MS1 &ms1,const MS2 &ms2) throw(); 01457 template <class MS1,class MS2> friend bool _msmsleq(const MS1 &ms1,const MS2 &ms2) throw(); 01458 template <class MS> friend std::ostream &_msout(std::ostream &s,const MS &r) throw(); 01459 template <class MS> friend std::istream &_msin(std::istream &s,MS &r) throw(); 01460 01461 // Real 01462 01463 //--- Real ------------ matrix-scalar ----------- 01464 //--- Real ------------ matrix-vector ----------- 01465 //--- Real ------------ matrix-matrix ----------- 01466 // interval ---------------- 01467 // matrix-matrix 01468 01469 template <class M,class MS,class E> friend E _mmssect(const M &m,const MS &ms) 01470 #if(CXSC_INDEX_CHECK) 01471 throw(ERROR__OP_WITH_WRONG_DIM<M>); 01472 #else 01473 throw(); 01474 #endif 01475 template <class MS1,class MS2,class E> friend E _msmssect(const MS1 &m1,const MS2 &m2) 01476 #if(CXSC_INDEX_CHECK) 01477 throw(ERROR__OP_WITH_WRONG_DIM<E>); 01478 #else 01479 throw(); 01480 #endif 01481 // matrix-scalar 01482 // matrix-vector 01483 01484 // cinterval -------------- 01485 01486 template <class M1,class MS2> friend M1 &_mmssetinf(M1 &m1,const MS2 &ms2) 01487 #if(CXSC_INDEX_CHECK) 01488 throw(ERROR__OP_WITH_WRONG_DIM<M1>); 01489 #else 01490 throw(); 01491 #endif 01492 template <class M1,class MS2> friend M1 &_mmssetsup(M1 &m1,const MS2 &ms2) 01493 #if(CXSC_INDEX_CHECK) 01494 throw(ERROR__OP_WITH_WRONG_DIM<M1>); 01495 #else 01496 throw(); 01497 #endif 01498 template <class M1,class MS2> friend M1 &_mmsusetinf(M1 &m1,const MS2 &ms2) 01499 #if(CXSC_INDEX_CHECK) 01500 throw(ERROR__OP_WITH_WRONG_DIM<M1>); 01501 #else 01502 throw(); 01503 #endif 01504 template <class M1,class MS2> friend M1 &_mmsusetsup(M1 &m1,const MS2 &ms2) 01505 #if(CXSC_INDEX_CHECK) 01506 throw(ERROR__OP_WITH_WRONG_DIM<M1>); 01507 #else 01508 throw(); 01509 #endif 01510 template <class MS1,class MS2> friend MS1 &_msmssetinf(MS1 &ms1,const MS2 &ms2) 01511 #if(CXSC_INDEX_CHECK) 01512 throw(ERROR__OP_WITH_WRONG_DIM<MS1>); 01513 #else 01514 throw(); 01515 #endif 01516 template <class MS1,class MS2> friend MS1 &_msmssetsup(MS1 &ms1,const MS2 &ms2) 01517 #if(CXSC_INDEX_CHECK) 01518 throw(ERROR__OP_WITH_WRONG_DIM<MS1>); 01519 #else 01520 throw(); 01521 #endif 01522 template <class MS1,class MS2> friend MS1 &_msmsusetinf(MS1 &ms1,const MS2 &ms2) 01523 #if(CXSC_INDEX_CHECK) 01524 throw(ERROR__OP_WITH_WRONG_DIM<MS1>); 01525 #else 01526 throw(); 01527 #endif 01528 template <class MS1,class MS2> friend MS1 &_msmsusetsup(MS1 &ms1,const MS2 &ms2) 01529 #if(CXSC_INDEX_CHECK) 01530 throw(ERROR__OP_WITH_WRONG_DIM<MS1>); 01531 #else 01532 throw(); 01533 #endif 01534 01535 // matrix-matrix 01536 01537 template <class M,class MS> friend M &_mmsconvassign(M &m1,const MS &ms) 01538 #if(CXSC_INDEX_CHECK) 01539 throw(ERROR__OP_WITH_WRONG_DIM<M>); 01540 #else 01541 throw(); 01542 #endif 01543 template <class MS1,class MS2> friend MS1 &_msmsconvassign(MS1 &ms1,const MS2 &ms2) 01544 #if(CXSC_INDEX_CHECK) 01545 throw(ERROR__OP_WITH_WRONG_DIM<MS1>); 01546 #else 01547 throw(); 01548 #endif 01549 01550 template <class M,class MS> friend M &_mmssectassign(M &m1,const MS &ms) 01551 #if(CXSC_INDEX_CHECK) 01552 throw(ERROR__OP_WITH_WRONG_DIM<M>); 01553 #else 01554 throw(); 01555 #endif 01556 template <class MS1,class MS2> friend MS1 &_msmssectassign(MS1 &ms1,const MS2 &ms2) 01557 #if(CXSC_INDEX_CHECK) 01558 throw(ERROR__OP_WITH_WRONG_DIM<MS1>); 01559 #else 01560 throw(); 01561 #endif 01562 01563 // matrix-scalar 01564 // cinterval -- matrix-vector 01565 01566 01567 /* friend TINLINE civector &_vsmscimultassign<civector_slice,cmatrix_slice,cinterval>(civector_slice &v,const cmatrix_slice &ms) 01568 #if(CXSC_INDEX_CHECK) 01569 throw(ERROR_CIMATRIX_OP_WITH_WRONG_DIM); 01570 #else 01571 throw(); 01572 #endif */ 01573 01574 #endif 01575 01576 //--------------- Konstruktoren ---------------------------------------- 01577 01579 explicit INLINE cmatrix_slice(cmatrix &a,const int &l1,const int &u1,const int &l2, const int &u2) throw():dat(a.dat),offset1(l1-a.lb1),offset2(l2-a.lb2),mxsize(a.xsize),mysize(a.ysize),start1(l1),end1(u1),start2(l2),end2(u2),sxsize(u2-l2+1),sysize(u1-l1+1) { } 01581 explicit INLINE cmatrix_slice(cmatrix_slice &a,const int &l1,const int &u1,const int &l2, const int &u2) throw():dat(a.dat),offset1(a.offset1+l1-a.start1),offset2(a.offset2+l2-a.start2),mxsize(a.mxsize),mysize(a.mysize),start1(l1),end1(u1),start2(l2),end2(u2),sxsize(u2-l2+1),sysize(u1-l1+1) { } 01582 public: 01584 INLINE cmatrix_slice(const cmatrix_slice &ms) throw():dat(ms.dat),offset1(ms.offset1),offset2(ms.offset2),mxsize(ms.mxsize),mysize(ms.mysize),start1(ms.start1),end1(ms.end1),start2(ms.start2),end2(ms.end2),sxsize(ms.sxsize),sysize(ms.sysize) { } 01585 public: 01586 01587 //---------------- Standardfunktionen ----------------------------------- 01588 01589 friend cvector::cvector(const cmatrix_slice &sl) 01590 #if(CXSC_INDEX_CHECK) 01591 throw(ERROR_CMATRIX_TYPE_CAST_OF_THICK_OBJ); 01592 #else 01593 throw(); 01594 #endif 01595 friend INLINE cmatrix::cmatrix(const cmatrix_slice &) throw(); 01597 INLINE cmatrix_slice &operator =(const cmatrix &m) 01598 #if(CXSC_INDEX_CHECK) 01599 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 01600 #else 01601 throw(); 01602 #endif 01603 01604 //Sparse 01606 INLINE cmatrix_slice &operator =(const scmatrix &ms); 01608 INLINE cmatrix_slice &operator =(const scmatrix_slice &ms); 01610 INLINE cmatrix_slice &operator =(const srmatrix &ms); 01612 INLINE cmatrix_slice &operator =(const srmatrix_slice &ms); 01613 01614 01616 INLINE cmatrix_slice &operator =(const cmatrix_slice &ms) 01617 #if(CXSC_INDEX_CHECK) 01618 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 01619 #else 01620 throw(); 01621 #endif 01622 01623 INLINE cmatrix_slice &operator =(const complex &r) throw(); 01625 INLINE cmatrix_slice &operator =(const cvector &v) 01626 #if(CXSC_INDEX_CHECK) 01627 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 01628 #else 01629 throw(); 01630 #endif 01631 01632 INLINE cmatrix_slice &operator =(const cvector_slice &v) 01633 #if(CXSC_INDEX_CHECK) 01634 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 01635 #else 01636 throw(); 01637 #endif 01638 01639 INLINE cmatrix_slice &operator =(const rmatrix &m) 01640 #if(CXSC_INDEX_CHECK) 01641 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 01642 #else 01643 throw(); 01644 #endif 01645 01646 INLINE cmatrix_slice &operator =(const rmatrix_slice &ms) 01647 #if(CXSC_INDEX_CHECK) 01648 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 01649 #else 01650 throw(); 01651 #endif 01652 01653 INLINE cmatrix_slice &operator =(const real &r) throw(); 01655 INLINE cmatrix_slice &operator =(const rvector &v) 01656 #if(CXSC_INDEX_CHECK) 01657 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 01658 #else 01659 throw(); 01660 #endif 01661 01662 INLINE cmatrix_slice &operator =(const rvector_slice &v) 01663 #if(CXSC_INDEX_CHECK) 01664 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 01665 #else 01666 throw(); 01667 #endif 01668 01669 INLINE cmatrix_subv operator [](const int &i) 01670 #if(CXSC_INDEX_CHECK) 01671 throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT); 01672 #else 01673 throw(); 01674 #endif 01675 01676 INLINE cmatrix_subv operator [](const cxscmatrix_column &i) 01677 #if(CXSC_INDEX_CHECK) 01678 throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT); 01679 #else 01680 throw(); 01681 #endif 01682 01684 INLINE cmatrix_subv operator [](const int &i) const 01685 #if(CXSC_INDEX_CHECK) 01686 throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT); 01687 #else 01688 throw(); 01689 #endif 01690 01691 INLINE cmatrix_subv operator [](const cxscmatrix_column &i) const 01692 #if(CXSC_INDEX_CHECK) 01693 throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT); 01694 #else 01695 throw(); 01696 #endif 01697 01698 INLINE cmatrix_slice &operator ()() throw() { return *this; } 01700 INLINE cmatrix_slice operator ()(const int &m, const int &n) 01701 #if(CXSC_INDEX_CHECK) 01702 throw(ERROR_CMATRIX_SUB_ARRAY_TOO_BIG); 01703 #else 01704 throw(); 01705 #endif 01706 01707 INLINE cmatrix_slice operator ()(const int &m1, const int &m2, const int &n1, const int &n2) 01708 #if(CXSC_INDEX_CHECK) 01709 throw(ERROR_CMATRIX_SUB_ARRAY_TOO_BIG); 01710 #else 01711 throw(); 01712 #endif 01713 01714 //Sparse 01716 INLINE cmatrix_slice &operator +=(const srmatrix &m); 01718 INLINE cmatrix_slice &operator +=(const srmatrix_slice &ms); 01720 INLINE cmatrix_slice &operator +=(const scmatrix &m); 01722 INLINE cmatrix_slice &operator +=(const scmatrix_slice &ms); 01724 INLINE cmatrix_slice &operator -=(const srmatrix &m); 01726 INLINE cmatrix_slice &operator -=(const srmatrix_slice &ms); 01728 INLINE cmatrix_slice &operator -=(const scmatrix &m); 01730 INLINE cmatrix_slice &operator -=(const scmatrix_slice &ms); 01732 INLINE cmatrix_slice &operator *=(const srmatrix &m); 01734 INLINE cmatrix_slice &operator *=(const srmatrix_slice &ms); 01736 INLINE cmatrix_slice &operator *=(const scmatrix &m); 01738 INLINE cmatrix_slice &operator *=(const scmatrix_slice &ms); 01739 01741 INLINE cmatrix_slice &operator *=(const cmatrix &m) 01742 #if(CXSC_INDEX_CHECK) 01743 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 01744 #else 01745 throw(); 01746 #endif 01747 01748 INLINE cmatrix_slice &operator *=(const rmatrix &m) 01749 #if(CXSC_INDEX_CHECK) 01750 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 01751 #else 01752 throw(); 01753 #endif 01754 01755 INLINE cmatrix_slice &operator *=(const cmatrix_slice &ms2) 01756 #if(CXSC_INDEX_CHECK) 01757 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 01758 #else 01759 throw(); 01760 #endif 01761 01762 INLINE cmatrix_slice &operator *=(const rmatrix_slice &ms2) 01763 #if(CXSC_INDEX_CHECK) 01764 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 01765 #else 01766 throw(); 01767 #endif 01768 01769 INLINE cmatrix_slice &operator +=(const cmatrix &m1) 01770 #if(CXSC_INDEX_CHECK) 01771 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 01772 #else 01773 throw(); 01774 #endif 01775 01776 INLINE cmatrix_slice &operator +=(const rmatrix &m1) 01777 #if(CXSC_INDEX_CHECK) 01778 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 01779 #else 01780 throw(); 01781 #endif 01782 01783 INLINE cmatrix_slice &operator +=(const cmatrix_slice &ms2) 01784 #if(CXSC_INDEX_CHECK) 01785 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 01786 #else 01787 throw(); 01788 #endif 01789 01790 INLINE cmatrix_slice &operator +=(const rmatrix_slice &ms2) 01791 #if(CXSC_INDEX_CHECK) 01792 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 01793 #else 01794 throw(); 01795 #endif 01796 01797 INLINE cmatrix_slice &operator -=(const cmatrix &m1) 01798 #if(CXSC_INDEX_CHECK) 01799 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 01800 #else 01801 throw(); 01802 #endif 01803 01804 INLINE cmatrix_slice &operator -=(const rmatrix &m1) 01805 #if(CXSC_INDEX_CHECK) 01806 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 01807 #else 01808 throw(); 01809 #endif 01810 01811 INLINE cmatrix_slice &operator -=(const cmatrix_slice &ms2) 01812 #if(CXSC_INDEX_CHECK) 01813 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 01814 #else 01815 throw(); 01816 #endif 01817 01818 INLINE cmatrix_slice &operator -=(const rmatrix_slice &ms2) 01819 #if(CXSC_INDEX_CHECK) 01820 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 01821 #else 01822 throw(); 01823 #endif 01824 01825 INLINE cmatrix_slice &operator |=(const cmatrix &m1) 01826 #if(CXSC_INDEX_CHECK) 01827 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 01828 #else 01829 throw(); 01830 #endif 01831 01832 INLINE cmatrix_slice &operator |=(const rmatrix &m1) 01833 #if(CXSC_INDEX_CHECK) 01834 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 01835 #else 01836 throw(); 01837 #endif 01838 01839 INLINE cmatrix_slice &operator |=(const cmatrix_slice &ms2) 01840 #if(CXSC_INDEX_CHECK) 01841 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 01842 #else 01843 throw(); 01844 #endif 01845 01846 INLINE cmatrix_slice &operator |=(const rmatrix_slice &ms2) 01847 #if(CXSC_INDEX_CHECK) 01848 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 01849 #else 01850 throw(); 01851 #endif 01852 01853 INLINE cmatrix_slice &operator *=(const complex &c) throw(); 01855 INLINE cmatrix_slice &operator *=(const real &c) throw(); 01857 INLINE cmatrix_slice &operator /=(const complex &c) throw(); 01859 INLINE cmatrix_slice &operator /=(const real &c) throw(); 01860 INLINE operator void*() throw(); 01861 //#else 01862 //#endif 01863 }; 01864 01865 //================================================================ 01866 //====================== Subvector Functions ===================== 01867 01868 //=======================Vector / Scalar ========================= 01869 01871 INLINE cvector operator /(const cmatrix_subv &rv, const complex &s) throw(); 01873 INLINE cvector operator *(const cmatrix_subv &rv, const complex &s) throw(); 01875 INLINE cvector operator *(const complex &s, const cmatrix_subv &rv) throw(); 01876 01877 //======================== Vector / Vector ======================== 01878 01880 INLINE rvector abs(const cmatrix_subv &mv) throw(); 01882 INLINE rvector Im(const cmatrix_subv &mv) throw(); 01884 INLINE rvector Re(const cmatrix_subv &mv) throw(); 01886 INLINE cmatrix_subv &SetIm(cmatrix_subv &mv,const rvector &rv) 01887 #if(CXSC_INDEX_CHECK) 01888 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 01889 #else 01890 throw(); 01891 #endif 01892 01893 INLINE cmatrix_subv &SetRe(cmatrix_subv &mv,const rvector &rv) 01894 #if(CXSC_INDEX_CHECK) 01895 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 01896 #else 01897 throw(); 01898 #endif 01899 01900 INLINE cmatrix_subv &SetRe(cmatrix_subv &iv,const real &r) throw(); 01902 INLINE cmatrix_subv &SetIm(cmatrix_subv &iv,const real &r) throw(); 01903 01904 01906 void accumulate(cdotprecision &dp, const cmatrix_subv & rv1, const cmatrix_subv &rv2) 01907 #if(CXSC_INDEX_CHECK) 01908 throw(OP_WITH_WRONG_DIM); 01909 #else 01910 throw(); 01911 #endif 01912 01914 void accumulate_approx(cdotprecision &dp, const cmatrix_subv & rv1, const cmatrix_subv &rv2); 01915 01917 void accumulate(cdotprecision &dp, const cvector & rv1, const cmatrix_subv &rv2) 01918 #if(CXSC_INDEX_CHECK) 01919 throw(OP_WITH_WRONG_DIM); 01920 #else 01921 throw(); 01922 #endif 01923 01925 void accumulate_approx(cdotprecision &dp, const cvector & rv1, const cmatrix_subv &rv2); 01926 01928 void accumulate(cdotprecision &dp, const cmatrix_subv & rv1, const cvector &rv2) 01929 #if(CXSC_INDEX_CHECK) 01930 throw(OP_WITH_WRONG_DIM); 01931 #else 01932 throw(); 01933 #endif 01934 01936 void accumulate_approx(cdotprecision &dp, const cmatrix_subv & rv1, const cvector &rv2); 01937 01939 void accumulate(cdotprecision &dp, const cvector_slice & sl1, const cmatrix_subv &rv2) 01940 #if(CXSC_INDEX_CHECK) 01941 throw(OP_WITH_WRONG_DIM); 01942 #else 01943 throw(); 01944 #endif 01945 01947 void accumulate_approx(cdotprecision &dp, const cvector_slice & sl1, const cmatrix_subv &rv2); 01948 01950 void accumulate(cdotprecision &dp, const cmatrix_subv & rv1, const cvector_slice &sl2) 01951 #if(CXSC_INDEX_CHECK) 01952 throw(OP_WITH_WRONG_DIM); 01953 #else 01954 throw(); 01955 #endif 01956 01958 void accumulate_approx(cdotprecision &dp, const cmatrix_subv & rv1, const cvector_slice &sl2); 01959 01960 01962 void accumulate(cidotprecision &dp, const cmatrix_subv & rv1, const cmatrix_subv &rv2) 01963 #if(CXSC_INDEX_CHECK) 01964 throw(OP_WITH_WRONG_DIM); 01965 #else 01966 throw(); 01967 #endif 01968 01969 void accumulate(cidotprecision &dp, const cvector & rv1, const cmatrix_subv &rv2) 01970 #if(CXSC_INDEX_CHECK) 01971 throw(OP_WITH_WRONG_DIM); 01972 #else 01973 throw(); 01974 #endif 01975 01976 void accumulate(cidotprecision &dp, const cmatrix_subv & rv1, const cvector &rv2) 01977 #if(CXSC_INDEX_CHECK) 01978 throw(OP_WITH_WRONG_DIM); 01979 #else 01980 throw(); 01981 #endif 01982 01983 void accumulate(cidotprecision &dp, const cvector_slice & sl1, const cmatrix_subv &rv2) 01984 #if(CXSC_INDEX_CHECK) 01985 throw(OP_WITH_WRONG_DIM); 01986 #else 01987 throw(); 01988 #endif 01989 01990 void accumulate(cidotprecision &dp, const cmatrix_subv & rv1, const cvector_slice &sl2) 01991 #if(CXSC_INDEX_CHECK) 01992 throw(OP_WITH_WRONG_DIM); 01993 #else 01994 throw(); 01995 #endif 01996 01998 INLINE complex operator *(const cmatrix_subv & rv1, const cmatrix_subv &rv2) 01999 #if(CXSC_INDEX_CHECK) 02000 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM); 02001 #else 02002 throw(); 02003 #endif 02004 02005 INLINE complex operator *(const cvector & rv1, const cmatrix_subv &rv2) 02006 #if(CXSC_INDEX_CHECK) 02007 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM); 02008 #else 02009 throw(); 02010 #endif 02011 02012 INLINE complex operator *(const cmatrix_subv &rv1,const cvector &rv2) 02013 #if(CXSC_INDEX_CHECK) 02014 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM); 02015 #else 02016 throw(); 02017 #endif 02018 02019 INLINE complex operator *(const cvector_slice &sl,const cmatrix_subv &sv) 02020 #if(CXSC_INDEX_CHECK) 02021 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM); 02022 #else 02023 throw(); 02024 #endif 02025 02026 INLINE complex operator *(const cmatrix_subv &mv,const cvector_slice &vs) 02027 #if(CXSC_INDEX_CHECK) 02028 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM); 02029 #else 02030 throw(); 02031 #endif 02032 02034 INLINE cvector operator +(const cmatrix_subv & rv1, const cmatrix_subv &rv2) 02035 #if(CXSC_INDEX_CHECK) 02036 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM); 02037 #else 02038 throw(); 02039 #endif 02040 02041 INLINE cvector operator +(const cmatrix_subv &rv1,const cvector &rv2) 02042 #if(CXSC_INDEX_CHECK) 02043 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM); 02044 #else 02045 throw(); 02046 #endif 02047 02048 INLINE cvector operator +(const cvector & rv1, const cmatrix_subv &rv2) 02049 #if(CXSC_INDEX_CHECK) 02050 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM); 02051 #else 02052 throw(); 02053 #endif 02054 02055 INLINE cvector operator +(const cvector_slice &sl,const cmatrix_subv &mv) 02056 #if(CXSC_INDEX_CHECK) 02057 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM); 02058 #else 02059 throw(); 02060 #endif 02061 02062 INLINE cvector operator +(const cmatrix_subv &mv,const cvector_slice &sl) 02063 #if(CXSC_INDEX_CHECK) 02064 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM); 02065 #else 02066 throw(); 02067 #endif 02068 02070 INLINE cvector operator -(const cmatrix_subv & rv1, const cmatrix_subv &rv2) 02071 #if(CXSC_INDEX_CHECK) 02072 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM); 02073 #else 02074 throw(); 02075 #endif 02076 02077 INLINE cvector operator -(const cvector & rv1, const cmatrix_subv &rv2) 02078 #if(CXSC_INDEX_CHECK) 02079 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM); 02080 #else 02081 throw(); 02082 #endif 02083 02084 INLINE cvector operator -(const cmatrix_subv &rv1,const cvector &rv2) 02085 #if(CXSC_INDEX_CHECK) 02086 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM); 02087 #else 02088 throw(); 02089 #endif 02090 02091 INLINE cvector operator -(const cvector_slice &sl,const cmatrix_subv &mv) 02092 #if(CXSC_INDEX_CHECK) 02093 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM); 02094 #else 02095 throw(); 02096 #endif 02097 02098 INLINE cvector operator -(const cmatrix_subv &mv,const cvector_slice &sl) 02099 #if(CXSC_INDEX_CHECK) 02100 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM); 02101 #else 02102 throw(); 02103 #endif 02104 02105 //==================================================================== 02106 //===================== Matrix Functions ============================= 02107 02109 INLINE cmatrix _cmatrix(const cmatrix &rm) throw(); 02111 INLINE cmatrix _cmatrix(const cvector &v) throw(); 02113 INLINE cmatrix _cmatrix(const cvector_slice &v) throw(); 02115 INLINE cmatrix _cmatrix(const complex &r) throw(); 02116 02118 INLINE int Lb(const cmatrix &rm, const int &i) 02119 #if(CXSC_INDEX_CHECK) 02120 throw(ERROR_CMATRIX_WRONG_ROW_OR_COL); 02121 #else 02122 throw(); 02123 #endif 02124 02125 INLINE int Ub(const cmatrix &rm, const int &i) 02126 #if(CXSC_INDEX_CHECK) 02127 throw(ERROR_CMATRIX_WRONG_ROW_OR_COL); 02128 #else 02129 throw(); 02130 #endif 02131 02132 INLINE int Lb(const cmatrix_slice &rm, const int &i) 02133 #if(CXSC_INDEX_CHECK) 02134 throw(ERROR_CMATRIX_WRONG_ROW_OR_COL); 02135 #else 02136 throw(); 02137 #endif 02138 02139 INLINE int Ub(const cmatrix_slice &rm, const int &i) 02140 #if(CXSC_INDEX_CHECK) 02141 throw(ERROR_CMATRIX_WRONG_ROW_OR_COL); 02142 #else 02143 throw(); 02144 #endif 02145 02146 INLINE cmatrix &SetLb(cmatrix &m, const int &i,const int &j) 02147 #if(CXSC_INDEX_CHECK) 02148 throw(ERROR_CMATRIX_WRONG_ROW_OR_COL); 02149 #else 02150 throw(); 02151 #endif 02152 02153 INLINE cmatrix &SetUb(cmatrix &m, const int &i,const int &j) 02154 #if(CXSC_INDEX_CHECK) 02155 throw(ERROR_CMATRIX_WRONG_ROW_OR_COL); 02156 #else 02157 throw(); 02158 #endif 02159 02160 INLINE void Resize(cmatrix &A) throw(); 02162 INLINE void Resize(cmatrix &A,const int &m, const int &n) 02163 #if(CXSC_INDEX_CHECK) 02164 throw(ERROR_CMATRIX_WRONG_BOUNDARIES); 02165 #else 02166 throw(); 02167 #endif 02168 02169 INLINE void Resize(cmatrix &A,const int &m1, const int &m2,const int &n1,const int &n2) 02170 #if(CXSC_INDEX_CHECK) 02171 throw(ERROR_CMATRIX_WRONG_BOUNDARIES); 02172 #else 02173 throw(); 02174 #endif 02175 02177 INLINE rmatrix abs(const cmatrix &m) throw(); 02179 INLINE rmatrix abs(const cmatrix_slice &ms) throw(); 02181 INLINE rmatrix Im(const cmatrix &m) throw(); 02183 INLINE rmatrix Re(const cmatrix &m) throw(); 02185 INLINE rmatrix Im(const cmatrix_slice &m) throw(); 02187 INLINE rmatrix Re(const cmatrix_slice &m) throw(); 02189 INLINE cmatrix &SetIm(cmatrix &cm,const rmatrix &rm) 02190 #if(CXSC_INDEX_CHECK) 02191 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02192 #else 02193 throw(); 02194 #endif 02195 02196 INLINE cmatrix_slice &SetIm(cmatrix_slice &cm,const rmatrix &rm) 02197 #if(CXSC_INDEX_CHECK) 02198 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02199 #else 02200 throw(); 02201 #endif 02202 02203 INLINE cmatrix &SetIm(cmatrix &cm,const rmatrix_slice &rm) 02204 #if(CXSC_INDEX_CHECK) 02205 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02206 #else 02207 throw(); 02208 #endif 02209 02210 INLINE cmatrix_slice &SetIm(cmatrix_slice &cm,const rmatrix_slice &rm) 02211 #if(CXSC_INDEX_CHECK) 02212 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02213 #else 02214 throw(); 02215 #endif 02216 02217 INLINE cmatrix &SetRe(cmatrix &cm,const rmatrix &rm) 02218 #if(CXSC_INDEX_CHECK) 02219 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02220 #else 02221 throw(); 02222 #endif 02223 02224 INLINE cmatrix_slice &SetRe(cmatrix_slice &cm,const rmatrix &rm) 02225 #if(CXSC_INDEX_CHECK) 02226 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02227 #else 02228 throw(); 02229 #endif 02230 02231 INLINE cmatrix &SetRe(cmatrix &cm,const rmatrix_slice &rm) 02232 #if(CXSC_INDEX_CHECK) 02233 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02234 #else 02235 throw(); 02236 #endif 02237 02238 INLINE cmatrix_slice &SetRe(cmatrix_slice &cm,const rmatrix_slice &rm) 02239 #if(CXSC_INDEX_CHECK) 02240 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02241 #else 02242 throw(); 02243 #endif 02244 02245 //===================== Matrix / Scalar =============================== 02246 02248 INLINE cmatrix operator *(const complex &c, const cmatrix &m) throw(); 02250 INLINE cmatrix operator *(const complex &c, const cmatrix_slice &ms) throw(); 02252 INLINE cmatrix operator *(const cmatrix &m,const complex &c) throw(); 02254 INLINE cmatrix operator *(const cmatrix_slice &ms,const complex &c) throw(); 02256 INLINE cmatrix &operator *=(cmatrix &m,const complex &c) throw(); 02258 INLINE cmatrix operator /(const cmatrix &m,const complex &c) throw(); 02260 INLINE cmatrix operator /(const cmatrix_slice &ms, const complex &c) throw(); 02262 INLINE cmatrix &operator /=(cmatrix &m,const complex &c) throw(); 02263 02264 //------------ real - cmatrix ----------------------------------------------- 02265 02267 INLINE cmatrix operator *(const real &c, const cmatrix &m) throw(); 02269 INLINE cmatrix operator *(const real &c, const cmatrix_slice &ms) throw(); 02271 INLINE cmatrix operator *(const cmatrix &m,const real &c) throw(); 02273 INLINE cmatrix operator *(const cmatrix_slice &ms,const real &c) throw(); 02275 INLINE cmatrix &operator *=(cmatrix &m,const real &c) throw(); 02277 INLINE cmatrix operator /(const cmatrix &m,const real &c) throw(); 02279 INLINE cmatrix operator /(const cmatrix_slice &ms, const real &c) throw(); 02281 INLINE cmatrix &operator /=(cmatrix &m,const real &c) throw(); 02282 //----------------- rmatrix - complex ---------------- 02283 02285 INLINE cmatrix operator *(const complex &c, const rmatrix &m) throw(); 02287 INLINE cmatrix operator *(const complex &c, const rmatrix_slice &ms) throw(); 02289 INLINE cmatrix operator *(const rmatrix &m,const complex &c) throw(); 02291 INLINE cmatrix operator *(const rmatrix_slice &ms,const complex &c) throw(); 02293 INLINE cmatrix operator /(const rmatrix &m,const complex &c) throw(); 02295 INLINE cmatrix operator /(const rmatrix_slice &ms, const complex &c) throw(); 02296 02297 02298 //============================ Matrix / Vector =================================== 02299 02300 02302 INLINE cvector operator *(const cmatrix &m,const cvector &v) 02303 #if(CXSC_INDEX_CHECK) 02304 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02305 #else 02306 throw(); 02307 #endif 02308 02309 INLINE cvector operator *(const cmatrix_slice &ms,const cvector &v) 02310 #if(CXSC_INDEX_CHECK) 02311 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02312 #else 02313 throw(); 02314 #endif 02315 02316 INLINE cvector operator *(const cvector &v,const cmatrix &m) 02317 #if(CXSC_INDEX_CHECK) 02318 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02319 #else 02320 throw(); 02321 #endif 02322 02323 INLINE cvector operator *(const cvector &v,const cmatrix_slice &ms) 02324 #if(CXSC_INDEX_CHECK) 02325 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02326 #else 02327 throw(); 02328 #endif 02329 02330 INLINE cvector &operator *=(cvector &v,const cmatrix &m) 02331 #if(CXSC_INDEX_CHECK) 02332 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02333 #else 02334 throw(); 02335 #endif 02336 02337 INLINE cvector &operator *=(cvector &v,const cmatrix_slice &ms) 02338 #if(CXSC_INDEX_CHECK) 02339 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02340 #else 02341 throw(); 02342 #endif 02343 02345 INLINE cvector operator *(const cvector_slice &v,const cmatrix &m) 02346 #if(CXSC_INDEX_CHECK) 02347 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02348 #else 02349 throw(); 02350 #endif 02351 02352 INLINE cvector operator *(const cvector_slice &v,const cmatrix_slice &m) 02353 #if(CXSC_INDEX_CHECK) 02354 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02355 #else 02356 throw(); 02357 #endif 02358 02359 //----------------- real ------------------------------------- 02360 02362 INLINE cvector operator *(const rvector &v,const cmatrix &m) 02363 #if(CXSC_INDEX_CHECK) 02364 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02365 #else 02366 throw(); 02367 #endif 02368 02369 INLINE cvector operator *(const rvector &v,const cmatrix_slice &ms) 02370 #if(CXSC_INDEX_CHECK) 02371 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02372 #else 02373 throw(); 02374 #endif 02375 02376 INLINE cvector operator *(const rvector_slice &v,const cmatrix &m) 02377 #if(CXSC_INDEX_CHECK) 02378 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02379 #else 02380 throw(); 02381 #endif 02382 02384 INLINE cvector operator *(const cmatrix &m,const rvector &v) 02385 #if(CXSC_INDEX_CHECK) 02386 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02387 #else 02388 throw(); 02389 #endif 02390 02391 INLINE cvector operator *(const cmatrix_slice &ms,const rvector &v) 02392 #if(CXSC_INDEX_CHECK) 02393 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02394 #else 02395 throw(); 02396 #endif 02397 02398 02399 //================ Matrix / Matrix ============================ 02400 02402 INLINE const cmatrix &operator +(const cmatrix &m1) throw(); 02404 INLINE cmatrix operator +(const cmatrix_slice &ms) throw(); 02406 INLINE cmatrix operator +(const cmatrix &m1,const cmatrix &m2) 02407 #if(CXSC_INDEX_CHECK) 02408 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02409 #else 02410 throw(); 02411 #endif 02412 02413 INLINE cmatrix operator +(const cmatrix &m,const cmatrix_slice &ms) 02414 #if(CXSC_INDEX_CHECK) 02415 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02416 #else 02417 throw(); 02418 #endif 02419 02420 INLINE cmatrix operator +(const cmatrix_slice &ms,const cmatrix &m) 02421 #if(CXSC_INDEX_CHECK) 02422 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02423 #else 02424 throw(); 02425 #endif 02426 02427 INLINE cmatrix operator +(const cmatrix_slice &m1,const cmatrix_slice &m2) 02428 #if(CXSC_INDEX_CHECK) 02429 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02430 #else 02431 throw(); 02432 #endif 02433 02434 INLINE cmatrix &operator +=(cmatrix &m1,const cmatrix &m2) 02435 #if(CXSC_INDEX_CHECK) 02436 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02437 #else 02438 throw(); 02439 #endif 02440 02441 INLINE cmatrix &operator +=(cmatrix &m1,const cmatrix_slice &ms) 02442 #if(CXSC_INDEX_CHECK) 02443 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02444 #else 02445 throw(); 02446 #endif 02447 02449 INLINE cmatrix operator -(const cmatrix &m) throw(); 02451 INLINE cmatrix operator -(const cmatrix_slice &ms) throw(); 02453 INLINE cmatrix operator -(const cmatrix &m1,const cmatrix &m2) 02454 #if(CXSC_INDEX_CHECK) 02455 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02456 #else 02457 throw(); 02458 #endif 02459 02460 INLINE cmatrix operator -(const cmatrix &m,const cmatrix_slice &ms) 02461 #if(CXSC_INDEX_CHECK) 02462 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02463 #else 02464 throw(); 02465 #endif 02466 02467 INLINE cmatrix operator -(const cmatrix_slice &ms,const cmatrix &m) 02468 #if(CXSC_INDEX_CHECK) 02469 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02470 #else 02471 throw(); 02472 #endif 02473 02474 INLINE cmatrix operator -(const cmatrix_slice &ms1,const cmatrix_slice &ms2) 02475 #if(CXSC_INDEX_CHECK) 02476 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02477 #else 02478 throw(); 02479 #endif 02480 02481 INLINE cmatrix &operator -=(cmatrix &m1,const cmatrix &m2) 02482 #if(CXSC_INDEX_CHECK) 02483 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02484 #else 02485 throw(); 02486 #endif 02487 02488 INLINE cmatrix &operator -=(cmatrix &m1,const cmatrix_slice &ms) 02489 #if(CXSC_INDEX_CHECK) 02490 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02491 #else 02492 throw(); 02493 #endif 02494 02496 INLINE cmatrix operator *(const cmatrix &m1, const cmatrix &m2) 02497 #if(CXSC_INDEX_CHECK) 02498 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02499 #else 02500 throw(); 02501 #endif 02502 02503 INLINE cmatrix operator *(const cmatrix &m1, const cmatrix_slice &ms) 02504 #if(CXSC_INDEX_CHECK) 02505 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02506 #else 02507 throw(); 02508 #endif 02509 02510 INLINE cmatrix operator *(const cmatrix_slice &ms, const cmatrix &m1) 02511 #if(CXSC_INDEX_CHECK) 02512 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02513 #else 02514 throw(); 02515 #endif 02516 02517 INLINE cmatrix operator *(const cmatrix_slice &ms1, const cmatrix_slice &ms2) 02518 #if(CXSC_INDEX_CHECK) 02519 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02520 #else 02521 throw(); 02522 #endif 02523 02524 INLINE cmatrix &operator *=(cmatrix &m1,const cmatrix &m2) 02525 #if(CXSC_INDEX_CHECK) 02526 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02527 #else 02528 throw(); 02529 #endif 02530 02531 INLINE cmatrix &operator *=(cmatrix &m1,const cmatrix_slice &ms) 02532 #if(CXSC_INDEX_CHECK) 02533 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02534 #else 02535 throw(); 02536 #endif 02537 02538 02539 //---------- rmatrix-cmatrix ------------------ 02541 INLINE cmatrix operator +(const rmatrix &m1,const cmatrix &m2) 02542 #if(CXSC_INDEX_CHECK) 02543 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02544 #else 02545 throw(); 02546 #endif 02547 02548 INLINE cmatrix operator +(const cmatrix &m1,const rmatrix &m2) 02549 #if(CXSC_INDEX_CHECK) 02550 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02551 #else 02552 throw(); 02553 #endif 02554 02555 INLINE cmatrix operator +(const rmatrix &m,const cmatrix_slice &ms) 02556 #if(CXSC_INDEX_CHECK) 02557 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02558 #else 02559 throw(); 02560 #endif 02561 02562 INLINE cmatrix operator +(const cmatrix &m,const rmatrix_slice &ms) 02563 #if(CXSC_INDEX_CHECK) 02564 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02565 #else 02566 throw(); 02567 #endif 02568 02569 INLINE cmatrix operator +(const rmatrix_slice &ms,const cmatrix &m) 02570 #if(CXSC_INDEX_CHECK) 02571 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02572 #else 02573 throw(); 02574 #endif 02575 02576 INLINE cmatrix operator +(const cmatrix_slice &ms,const rmatrix &m) 02577 #if(CXSC_INDEX_CHECK) 02578 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02579 #else 02580 throw(); 02581 #endif 02582 02583 INLINE cmatrix operator +(const rmatrix_slice &m1,const cmatrix_slice &m2) 02584 #if(CXSC_INDEX_CHECK) 02585 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02586 #else 02587 throw(); 02588 #endif 02589 02590 INLINE cmatrix operator +(const cmatrix_slice &m1,const rmatrix_slice &m2) 02591 #if(CXSC_INDEX_CHECK) 02592 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02593 #else 02594 throw(); 02595 #endif 02596 02597 INLINE cmatrix &operator +=(cmatrix &m1,const rmatrix &m2) 02598 #if(CXSC_INDEX_CHECK) 02599 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02600 #else 02601 throw(); 02602 #endif 02603 02604 INLINE cmatrix &operator +=(cmatrix &m1,const rmatrix_slice &ms) 02605 #if(CXSC_INDEX_CHECK) 02606 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02607 #else 02608 throw(); 02609 #endif 02610 02612 INLINE cmatrix operator -(const rmatrix &m1,const cmatrix &m2) 02613 #if(CXSC_INDEX_CHECK) 02614 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02615 #else 02616 throw(); 02617 #endif 02618 02619 INLINE cmatrix operator -(const cmatrix &m1,const rmatrix &m2) 02620 #if(CXSC_INDEX_CHECK) 02621 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02622 #else 02623 throw(); 02624 #endif 02625 02626 INLINE cmatrix operator -(const rmatrix &m,const cmatrix_slice &ms) 02627 #if(CXSC_INDEX_CHECK) 02628 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02629 #else 02630 throw(); 02631 #endif 02632 02633 INLINE cmatrix operator -(const cmatrix &m,const rmatrix_slice &ms) 02634 #if(CXSC_INDEX_CHECK) 02635 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02636 #else 02637 throw(); 02638 #endif 02639 02640 INLINE cmatrix operator -(const rmatrix_slice &ms,const cmatrix &m) 02641 #if(CXSC_INDEX_CHECK) 02642 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02643 #else 02644 throw(); 02645 #endif 02646 02647 INLINE cmatrix operator -(const cmatrix_slice &ms,const rmatrix &m) 02648 #if(CXSC_INDEX_CHECK) 02649 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02650 #else 02651 throw(); 02652 #endif 02653 02654 INLINE cmatrix operator -(const rmatrix_slice &ms1,const cmatrix_slice &ms2) 02655 #if(CXSC_INDEX_CHECK) 02656 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02657 #else 02658 throw(); 02659 #endif 02660 02661 INLINE cmatrix operator -(const cmatrix_slice &ms1,const rmatrix_slice &ms2) 02662 #if(CXSC_INDEX_CHECK) 02663 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02664 #else 02665 throw(); 02666 #endif 02667 02668 INLINE cmatrix &operator -=(cmatrix &m1,const rmatrix &m2) 02669 #if(CXSC_INDEX_CHECK) 02670 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02671 #else 02672 throw(); 02673 #endif 02674 02675 INLINE cmatrix &operator -=(cmatrix &m1,const rmatrix_slice &ms) 02676 #if(CXSC_INDEX_CHECK) 02677 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02678 #else 02679 throw(); 02680 #endif 02681 02683 INLINE cmatrix operator *(const rmatrix &m1, const cmatrix &m2) 02684 #if(CXSC_INDEX_CHECK) 02685 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02686 #else 02687 throw(); 02688 #endif 02689 02690 INLINE cmatrix operator *(const cmatrix &m1, const rmatrix &m2) 02691 #if(CXSC_INDEX_CHECK) 02692 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02693 #else 02694 throw(); 02695 #endif 02696 02697 INLINE cmatrix operator *(const rmatrix &m1, const cmatrix_slice &ms) 02698 #if(CXSC_INDEX_CHECK) 02699 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02700 #else 02701 throw(); 02702 #endif 02703 02704 INLINE cmatrix operator *(const cmatrix &m1, const rmatrix_slice &ms) 02705 #if(CXSC_INDEX_CHECK) 02706 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02707 #else 02708 throw(); 02709 #endif 02710 02711 INLINE cmatrix operator *(const rmatrix_slice &ms, const cmatrix &m1) 02712 #if(CXSC_INDEX_CHECK) 02713 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02714 #else 02715 throw(); 02716 #endif 02717 02718 INLINE cmatrix operator *(const cmatrix_slice &ms, const rmatrix &m1) 02719 #if(CXSC_INDEX_CHECK) 02720 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02721 #else 02722 throw(); 02723 #endif 02724 02725 INLINE cmatrix operator *(const rmatrix_slice &ms1, const cmatrix_slice &ms2) 02726 #if(CXSC_INDEX_CHECK) 02727 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02728 #else 02729 throw(); 02730 #endif 02731 02732 INLINE cmatrix operator *(const cmatrix_slice &ms1, const rmatrix_slice &ms2) 02733 #if(CXSC_INDEX_CHECK) 02734 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02735 #else 02736 throw(); 02737 #endif 02738 02739 INLINE cmatrix &operator *=(cmatrix &m1,const rmatrix &m2) 02740 #if(CXSC_INDEX_CHECK) 02741 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02742 #else 02743 throw(); 02744 #endif 02745 02746 INLINE cmatrix &operator *=(cmatrix &m1,const rmatrix_slice &ms) 02747 #if(CXSC_INDEX_CHECK) 02748 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM); 02749 #else 02750 throw(); 02751 #endif 02752 02753 02754 //============== Compare Operator ========================== 02755 02756 //-------------- Matrix - Matrix ------------------------- 02757 02759 INLINE bool operator ==(const cmatrix &m1,const cmatrix &m2) throw(); 02761 INLINE bool operator !=(const cmatrix &m1,const cmatrix &m2) throw(); 02762 /* INLINE bool operator <(const cmatrix &m1,const cmatrix &m2) throw(); 02763 INLINE bool operator <=(const cmatrix &m1,const cmatrix &m2) throw(); 02764 INLINE bool operator >(const cmatrix &m1,const cmatrix &m2) throw(); 02765 INLINE bool operator >=(const cmatrix &m1,const cmatrix &m2) throw();*/ 02767 INLINE bool operator ==(const cmatrix &m1,const cmatrix_slice &ms) throw(); 02769 INLINE bool operator !=(const cmatrix &m1,const cmatrix_slice &ms) throw(); 02770 /* INLINE bool operator <(const cmatrix &m1,const cmatrix_slice &ms) throw(); 02771 INLINE bool operator <=(const cmatrix &m1,const cmatrix_slice &ms) throw(); 02772 INLINE bool operator >(const cmatrix &m1,const cmatrix_slice &ms) throw(); 02773 INLINE bool operator >=(const cmatrix &m1,const cmatrix_slice &ms) throw(); 02774 */ 02775 //---------------- Matrix - Matrix_slice ---------------------- 02776 02778 INLINE bool operator ==(const cmatrix_slice &m1,const cmatrix_slice &m2) throw(); 02780 INLINE bool operator !=(const cmatrix_slice &m1,const cmatrix_slice &m2) throw(); 02781 /* INLINE bool operator <(const cmatrix_slice &m1,const cmatrix_slice &m2) throw(); 02782 INLINE bool operator <=(const cmatrix_slice &m1,const cmatrix_slice &m2) throw(); 02783 INLINE bool operator >(const cmatrix_slice &m1,const cmatrix_slice &m2) throw(); 02784 INLINE bool operator >=(const cmatrix_slice &m1,const cmatrix_slice &m2) throw(); 02785 */ 02786 //=================== Not Operator ============================= 02787 02789 INLINE bool operator !(const cmatrix &ms) throw(); 02791 INLINE bool operator !(const cmatrix_slice &ms) throw(); 02792 02793 //======================== Input / Output ======================== 02794 02796 INLINE std::ostream &operator <<(std::ostream &s,const cmatrix &r) throw(); 02798 INLINE std::ostream &operator <<(std::ostream &s,const cmatrix_slice &r) throw(); 02800 INLINE std::istream &operator >>(std::istream &s,cmatrix &r) throw(); 02802 INLINE std::istream &operator >>(std::istream &s,cmatrix_slice &r) throw(); 02803 02805 INLINE int RowLen ( const cmatrix& ); 02807 INLINE int ColLen ( const cmatrix& ); 02809 INLINE int RowLen ( const cmatrix_slice& ); 02811 INLINE int ColLen ( const cmatrix_slice& ); 02813 rmatrix CompMat ( const cmatrix& ); 02815 cmatrix Id ( cmatrix& ); 02817 cmatrix transp ( const cmatrix& ); 02819 void DoubleSize ( cmatrix& ); 02820 02821 } // namespace cxsc 02822 02823 02824 #ifdef _CXSC_INCL_INL 02825 #include "matrix.inl" 02826 #include "cmatrix.inl" 02827 #endif 02828 02829 #ifdef _CXSC_CIVECTOR_HPP_INCLUDED 02830 # ifdef _CXSC_INCL_INL 02831 # include "civeccmat.inl" 02832 # else 02833 # include "civeccmat.hpp" 02834 # endif 02835 #endif 02836 02837 #ifdef _CXSC_IVECTOR_HPP_INCLUDED 02838 # ifdef _CXSC_INCL_INL 02839 # include "iveccmat.inl" 02840 # else 02841 # include "iveccmat.hpp" 02842 # endif 02843 #endif 02844 02845 #ifdef _CXSC_IMATRIX_HPP_INCLUDED 02846 # ifdef _CXSC_INCL_INL 02847 # include "cmatimat.inl" 02848 # else 02849 # include "cmatimat.hpp" 02850 # endif 02851 #endif 02852 02853 02854 #ifdef CXSC_USE_BLAS 02855 #define _CXSC_BLAS_CMATRIX 02856 #include "cxsc_blas.inl" 02857 #endif 02858 02859 #endif