C-XSC - A C++ Class Library for Extended Scientific Computing  2.5.4
cmatrix.inl
1 /*
2 ** CXSC is a C++ library for eXtended Scientific Computing (V 2.5.4)
3 **
4 ** Copyright (C) 1990-2000 Institut fuer Angewandte Mathematik,
5 ** Universitaet Karlsruhe, Germany
6 ** (C) 2000-2014 Wiss. Rechnen/Softwaretechnologie
7 ** Universitaet Wuppertal, Germany
8 **
9 ** This library is free software; you can redistribute it and/or
10 ** modify it under the terms of the GNU Library General Public
11 ** License as published by the Free Software Foundation; either
12 ** version 2 of the License, or (at your option) any later version.
13 **
14 ** This library is distributed in the hope that it will be useful,
15 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 ** Library General Public License for more details.
18 **
19 ** You should have received a copy of the GNU Library General Public
20 ** License along with this library; if not, write to the Free
21 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */
23 
24 /* CVS $Id: cmatrix.inl,v 1.28 2014/01/30 17:23:44 cxsc Exp $ */
25 
26 #ifndef _CXSC_CMATRIX_INL_INCLUDED
27 #define _CXSC_CMATRIX_INL_INCLUDED
28 
29 namespace cxsc {
30 
31 INLINE cmatrix::cmatrix() throw():dat(NULL),lb1(1),ub1(0),lb2(1),ub2(0),xsize(0),ysize(0)
32 {
33 }
34 
35 INLINE cmatrix::cmatrix(const complex &r) throw():lb1(1),ub1(1),lb2(1),ub2(1),xsize(1),ysize(1)
36 {
37  dat=new complex[1];
38  *dat=r;
39 }
40 
41 INLINE cmatrix::cmatrix(const real &r) throw():lb1(1),ub1(1),lb2(1),ub2(1),xsize(1),ysize(1)
42 {
43  dat=new complex[1];
44  *dat=r;
45 }
46 
47 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)
48 {
49  dat=new complex[xsize*ysize];
50  for(int i=0;i<xsize*ysize;i++)
51  dat[i]=rm.dat[i];
52 }
53 
54 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)
55 {
56  dat=new complex[xsize*ysize];
57  for(int i=0;i<xsize*ysize;i++)
58  dat[i]=rm.dat[i];
59 }
60 
61 INLINE cmatrix::cmatrix(const int &m, const int &n)
62 #if(CXSC_INDEX_CHECK)
63  throw(ERROR_CMATRIX_WRONG_BOUNDARIES):lb1(1),ub1(m),lb2(1),ub2(n),xsize(n),ysize(m)
64 #else
65  throw():lb1(1),ub1(m),lb2(1),ub2(n),xsize(n),ysize(m)
66 #endif
67 {
68 #if(CXSC_INDEX_CHECK)
69  if((n<0)||(m<0)) cxscthrow(ERROR_CMATRIX_WRONG_BOUNDARIES("cmatrix::cmatrix(const int &m, const int &n)"));
70 #endif
71  dat=new complex[m*n];
72 }
73 
74 INLINE cmatrix::cmatrix(const int &m1, const int &m2, const int &n1, const int &n2)
75 #if(CXSC_INDEX_CHECK)
76  throw(ERROR_CMATRIX_WRONG_BOUNDARIES):lb1(m1),ub1(m2),lb2(n1),ub2(n2),xsize(n2-n1+1),ysize(m2-m1+1)
77 #else
78  throw():lb1(m1),ub1(m2),lb2(n1),ub2(n2),xsize(n2-n1+1),ysize(m2-m1+1)
79 #endif
80 {
81 #if(CXSC_INDEX_CHECK)
82  if((m2<m1)||(n2<n1)) cxscthrow(ERROR_CMATRIX_WRONG_BOUNDARIES("cmatrix::cmatrix(const int &m1, const int &n1, const int &m2, const int &n2)"));
83 #endif
84  dat=new complex[xsize*ysize];
85 }
86 
87 INLINE cvector::cvector(const cmatrix_subv &v) throw():l(v.lb),u(v.ub),size(v.size)
88 {
89  dat=new complex[size];
90  for (int i=0, j=v.start;i<v.size;i++,j+=v.offset)
91  dat[i]=v.dat[j];
92 }
93 
94 INLINE cmatrix::cmatrix(const cvector &v) throw():lb1(v.l),ub1(v.u),lb2(1),ub2(1),xsize(1),ysize(v.size)
95 {
96  dat=new complex[v.size];
97  for(int i=0;i<v.size;i++)
98  dat[i]=v.dat[i];
99 }
100 
101 INLINE cmatrix::cmatrix(const rvector &v) throw():lb1(v.l),ub1(v.u),lb2(1),ub2(1),xsize(1),ysize(v.size)
102 {
103  dat=new complex[v.size];
104  for(int i=0;i<v.size;i++)
105  dat[i]=v.dat[i];
106 }
107 
108 INLINE cmatrix::cmatrix(const cvector_slice &v) throw():lb1(v.start),ub1(v.end),lb2(1),ub2(1),xsize(1),ysize(v.size)
109 {
110  dat=new complex[v.size];
111  for(int i=0,j=v.start-v.l;i<v.size;i++,j++)
112  dat[i]=v.dat[j];
113 }
114 
115 INLINE cmatrix::cmatrix(const rvector_slice &v) throw():lb1(v.start),ub1(v.end),lb2(1),ub2(1),xsize(1),ysize(v.size)
116 {
117  dat=new complex[v.size];
118  for(int i=0,j=v.start-v.l;i<v.size;i++,j++)
119  dat[i]=v.dat[j];
120 }
121 
122 
123  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)
124  {
125  int i,j;
126 
127  dat=new complex[xsize*ysize];
128  for (i=0;i<ysize;i++)
129  {
130  for(j=0;j<xsize;j++)
131  {
132  dat[i*xsize+j]=sl.dat[(sl.offset1+i)*sl.mxsize+sl.offset2+j];
133  }
134  }
135  }
136 
137  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)
138  {
139  int i,j;
140 
141  dat=new complex[xsize*ysize];
142  for (i=0;i<ysize;i++)
143  {
144  for(j=0;j<xsize;j++)
145  {
146  dat[i*xsize+j]=sl.dat[(sl.offset1+i)*sl.mxsize+sl.offset2+j];
147  }
148  }
149  }
150 
151  INLINE cmatrix_subv Row(cmatrix &m,const int &i)
152 #if(CXSC_INDEX_CHECK)
153  throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT)
154 #else
155  throw()
156 #endif
157 
158  {
159  return m[i];
160  }
161 
162  INLINE cmatrix_subv Col(cmatrix &m,const int &i)
163 #if(CXSC_INDEX_CHECK)
164  throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT)
165 #else
166  throw()
167 #endif
168 
169  {
170  return m[Col(i)];
171  }
172 
173  INLINE cmatrix_subv Row(const cmatrix &m,const int &i)
174 #if(CXSC_INDEX_CHECK)
175  throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT)
176 #else
177  throw()
178 #endif
179 
180  {
181  return m[i];
182  }
183 
184  INLINE cmatrix_subv Col(const cmatrix &m,const int &i)
185 #if(CXSC_INDEX_CHECK)
186  throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT)
187 #else
188  throw()
189 #endif
190 
191  {
192  return m[Col(i)];
193  }
194 
195  INLINE complex& cmatrix_subv::operator [](const int &i) const
196 #if(CXSC_INDEX_CHECK)
197  throw(ERROR_CVECTOR_ELEMENT_NOT_IN_VEC)
198 #else
199  throw()
200 #endif
201  {
202 #if(CXSC_INDEX_CHECK)
203  if((i<lb)||(i>ub)) cxscthrow(ERROR_CVECTOR_ELEMENT_NOT_IN_VEC("complex &cmatrix_subv::operator [](const int &i) const"));
204 #endif
205  return dat[start+((i-lb)*offset)];
206  }
207 
208  INLINE complex& cmatrix_subv::operator [](const int &i)
209 #if(CXSC_INDEX_CHECK)
210  throw(ERROR_CVECTOR_ELEMENT_NOT_IN_VEC)
211 #else
212  throw()
213 #endif
214  {
215 #if(CXSC_INDEX_CHECK)
216  if((i<lb)||(i>ub)) cxscthrow(ERROR_CVECTOR_ELEMENT_NOT_IN_VEC("complex &cmatrix_subv::operator [](const int &i)"));
217 #endif
218  return dat[start+((i-lb)*offset)];
219  }
220 
221 
222  INLINE cmatrix_subv cmatrix::operator [](const int &i) const
223 #if(CXSC_INDEX_CHECK)
224  throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT)
225 #else
226  throw()
227 #endif
228  {
229 #if(CXSC_INDEX_CHECK)
230  if((i<lb1)||(i>ub1)) cxscthrow(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT("cmatrix_subv cmatrix::operator [](const int &i)"));
231 #endif
232  return cmatrix_subv(dat, lb2, ub2, xsize, xsize*(i-lb1),1);
233  }
234 
235  INLINE cmatrix_subv cmatrix::operator [](const cxscmatrix_column &i) const
236 #if(CXSC_INDEX_CHECK)
237  throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT)
238 #else
239  throw()
240 #endif
241  {
242 #if(CXSC_INDEX_CHECK)
243  if((i.col()<lb2)||(i.col()>ub2)) cxscthrow(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT("cmatrix_subv cmatrix::operator [](const cxscmatrix_column &i)"));
244 #endif
245  return cmatrix_subv(dat, lb1, ub1, ysize, i.col()-lb2, xsize);
246  }
247 
248  INLINE cmatrix_subv cmatrix::operator [](const int &i)
249 #if(CXSC_INDEX_CHECK)
250  throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT)
251 #else
252  throw()
253 #endif
254  {
255 #if(CXSC_INDEX_CHECK)
256  if((i<lb1)||(i>ub1)) cxscthrow(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT("cmatrix_subv cmatrix::operator [](const int &i)"));
257 #endif
258  return cmatrix_subv(dat, lb2, ub2, xsize, xsize*(i-lb1),1);
259  }
260 
261  INLINE cmatrix_subv cmatrix::operator [](const cxscmatrix_column &i)
262 #if(CXSC_INDEX_CHECK)
263  throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT)
264 #else
265  throw()
266 #endif
267  {
268 #if(CXSC_INDEX_CHECK)
269  if((i.col()<lb2)||(i.col()>ub2)) cxscthrow(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT("cmatrix_subv cmatrix::operator [](const cxscmatrix_column &i)"));
270 #endif
271  return cmatrix_subv(dat, lb1, ub1, ysize, i.col()-lb2, xsize);
272  }
273 
274  INLINE cmatrix_slice cmatrix::operator ()(const int &m, const int &n)
275 #if(CXSC_INDEX_CHECK)
276  throw(ERROR_CMATRIX_SUB_ARRAY_TOO_BIG)
277 #else
278  throw()
279 #endif
280  {
281 #if(CXSC_INDEX_CHECK)
282  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)"));
283 #endif
284  return cmatrix_slice(*this,1,m,1,n);
285  }
286 
287  INLINE cmatrix_slice cmatrix::operator ()(const int &m1, const int &m2, const int &n1, const int &n2)
288 #if(CXSC_INDEX_CHECK)
289  throw(ERROR_CMATRIX_SUB_ARRAY_TOO_BIG)
290 #else
291  throw()
292 #endif
293  {
294 #if(CXSC_INDEX_CHECK)
295  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)"));
296 #endif
297  return cmatrix_slice(*this,m1,m2,n1,n2);
298  }
299 
301 #if(CXSC_INDEX_CHECK)
302  throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT)
303 #else
304  throw()
305 #endif
306  {
307 #if(CXSC_INDEX_CHECK)
308  if((i<start1)||(i>end1)) cxscthrow(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT("cmatrix_subv cmatrix_slice::operator [](const int &i)"));
309 #endif
310  return cmatrix_subv(dat, start2, end2, sxsize, mxsize*(i-start1+offset1)+offset2,1);
311  }
312 
313  INLINE cmatrix_subv cmatrix_slice::operator [](const cxscmatrix_column &i)
314 #if(CXSC_INDEX_CHECK)
315  throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT)
316 #else
317  throw()
318 #endif
319  {
320 #if(CXSC_INDEX_CHECK)
321  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)"));
322 #endif
323  return cmatrix_subv(dat, start1, end1, sysize, offset1*mxsize+i.col()-start2+offset2, mxsize);
324  }
325 
326  INLINE cmatrix_subv cmatrix_slice::operator [](const int &i) const
327 #if(CXSC_INDEX_CHECK)
328  throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT)
329 #else
330  throw()
331 #endif
332  {
333 #if(CXSC_INDEX_CHECK)
334  if((i<start1)||(i>end1)) cxscthrow(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT("cmatrix_subv cmatrix_slice::operator [](const int &i)"));
335 #endif
336  return cmatrix_subv(dat, start2, end2, sxsize, mxsize*(i-start1+offset1)+offset2,1);
337  }
338 
339  INLINE cmatrix_subv cmatrix_slice::operator [](const cxscmatrix_column &i) const
340 #if(CXSC_INDEX_CHECK)
341  throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT)
342 #else
343  throw()
344 #endif
345  {
346 #if(CXSC_INDEX_CHECK)
347  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)"));
348 #endif
349  return cmatrix_subv(dat, start1, end1, sysize, offset1*mxsize+i.col()-start2+offset2, mxsize);
350  }
351 
352  INLINE cmatrix_slice cmatrix_slice::operator ()(const int &m, const int &n)
353 #if(CXSC_INDEX_CHECK)
354  throw(ERROR_CMATRIX_SUB_ARRAY_TOO_BIG)
355 #else
356  throw()
357 #endif
358  {
359 #if(CXSC_INDEX_CHECK)
360  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)"));
361 #endif
362  return cmatrix_slice(*this,1,m,1,n);
363  }
364 
365  INLINE cmatrix_slice cmatrix_slice::operator ()(const int &m1, const int &m2, const int &n1, const int &n2)
366 #if(CXSC_INDEX_CHECK)
367  throw(ERROR_CMATRIX_SUB_ARRAY_TOO_BIG)
368 #else
369  throw()
370 #endif
371  {
372 #if(CXSC_INDEX_CHECK)
373  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)"));
374 #endif
375  return cmatrix_slice(*this,m1,m2,n1,n2);
376  }
377 
379 #if(CXSC_INDEX_CHECK)
380  throw(ERROR_CVECTOR_SUB_ARRAY_TOO_BIG)
381 #else
382  throw()
383 #endif
384 {
385 #if(CXSC_INDEX_CHECK)
386  if(1<lb||i>ub) cxscthrow(ERROR_CVECTOR_SUB_ARRAY_TOO_BIG("cmatrix_subv cmatrix_subv::operator ()(const int &i)"));
387 #endif
388  return cmatrix_subv(dat,1,i,i,start+(1-lb)*offset,offset);
389 }
390 
391 INLINE cmatrix_subv cmatrix_subv::operator ()(const int &i1,const int &i2)
392 #if(CXSC_INDEX_CHECK)
393  throw(ERROR_CVECTOR_SUB_ARRAY_TOO_BIG)
394 #else
395  throw()
396 #endif
397 {
398 #if(CXSC_INDEX_CHECK)
399  if(i1<lb||i2>ub) cxscthrow(ERROR_CVECTOR_SUB_ARRAY_TOO_BIG("cmatrix_subv cmatrix_subv::operator ()(const int &i1,const int &i2)"));
400 #endif
401  return cmatrix_subv(dat,i1,i2,i2-i1+1,start+(i1-lb)*offset,offset);
402 }
403 
404 
405 
406  INLINE cmatrix_subv &cmatrix_subv::operator =(const cmatrix_subv &rv) throw() { return _mvmvassign(*this,rv); }
407  INLINE cmatrix_subv &cmatrix_subv::operator =(const complex &r) throw() { return _mvsassign(*this,r); }
409 #if(CXSC_INDEX_CHECK)
410  throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
411 #else
412  throw()
413 #endif
414  { return _mvvassign(*this,v); }
416 #if(CXSC_INDEX_CHECK)
417  throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
418 #else
419  throw()
420 #endif
421  { return _mvvassign(*this,cvector(v)); }
422  INLINE cmatrix_subv &cmatrix_subv::operator =(const rmatrix_subv &rv) throw() { return _mvvassign(*this,rvector(rv)); }
423  INLINE cmatrix_subv &cmatrix_subv::operator =(const real &r) throw() { return _mvsassign(*this,r); }
425 #if(CXSC_INDEX_CHECK)
426  throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
427 #else
428  throw()
429 #endif
430  { return _mvvassign(*this,v); }
432 #if(CXSC_INDEX_CHECK)
433  throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
434 #else
435  throw()
436 #endif
437  { return _mvvassign(*this,cvector(v)); }
438  INLINE cmatrix &cmatrix::operator =(const complex &r) throw() { return _msassign(*this,r); }
439  INLINE cmatrix &cmatrix::operator =(const cmatrix &m) throw() { return _mmassign<cmatrix,cmatrix,complex>(*this,m, complex(0,0)); }
440  INLINE cmatrix &cmatrix::operator =(const cmatrix_slice &ms) throw() { return _mmsassign<cmatrix,cmatrix_slice,complex>(*this,ms); }
441  INLINE cmatrix &cmatrix::operator =(const cvector &v) throw() { return _mvassign<cmatrix,cvector,complex>(*this,v); }
442  INLINE cmatrix &cmatrix::operator =(const cvector_slice &v) throw() { return _mvassign<cmatrix,cvector,complex>(*this,cvector(v)); }
443  INLINE cmatrix &cmatrix::operator =(const real &r) throw() { return _msassign(*this,complex(r)); }
444  INLINE cmatrix &cmatrix::operator =(const rmatrix &m) throw() { return _mmassign<cmatrix,rmatrix,complex>(*this,m,complex(0,0)); }
445  INLINE cmatrix &cmatrix::operator =(const rmatrix_slice &ms) throw() { return _mmsassign<cmatrix,rmatrix_slice,complex>(*this,ms); }
446  INLINE cmatrix &cmatrix::operator =(const rvector &v) throw() { return _mvassign<cmatrix,rvector,complex>(*this,v); }
447  INLINE cmatrix &cmatrix::operator =(const rvector_slice &v) throw() { return _mvassign<cmatrix,rvector,complex>(*this,rvector(v)); }
448 
449  INLINE cmatrix::operator void*() throw() { return _mvoid(*this); }
451 #if(CXSC_INDEX_CHECK)
452  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
453 #else
454  throw()
455 #endif
456  { return _msmassign(*this,m); }
458 #if(CXSC_INDEX_CHECK)
459  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
460 #else
461  throw()
462 #endif
463  { return _msmsassign(*this,ms); }
464  INLINE cmatrix_slice &cmatrix_slice::operator =(const complex &r) throw() { return _mssassign(*this,r); }
466 #if(CXSC_INDEX_CHECK)
467  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
468 #else
469  throw()
470 #endif
471  { return _msmassign(*this,cmatrix(v)); }
473 #if(CXSC_INDEX_CHECK)
474  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
475 #else
476  throw()
477 #endif
478  { return _msmassign(*this,cmatrix(cvector(v))); }
480 #if(CXSC_INDEX_CHECK)
481  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
482 #else
483  throw()
484 #endif
485  { return _msmassign(*this,m); }
487 #if(CXSC_INDEX_CHECK)
488  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
489 #else
490  throw()
491 #endif
492  { return _msmsassign(*this,ms); }
493  INLINE cmatrix_slice &cmatrix_slice::operator =(const real &r) throw() { return _mssassign(*this,r); }
495 #if(CXSC_INDEX_CHECK)
496  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
497 #else
498  throw()
499 #endif
500  { return _msmassign(*this,rmatrix(v)); }
502 #if(CXSC_INDEX_CHECK)
503  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
504 #else
505  throw()
506 #endif
507  { return _msmassign(*this,rmatrix(rvector(v))); }
508  INLINE cmatrix_slice::operator void*() throw() { return _msvoid(*this); }
509  INLINE cvector operator /(const cmatrix_subv &rv, const complex &s) throw() { return _mvsdiv<cmatrix_subv,complex,cvector>(rv,s); }
510  INLINE cvector operator *(const cmatrix_subv &rv, const complex &s) throw() { return _mvsmult<cmatrix_subv,complex,cvector>(rv,s); }
511  INLINE cvector operator *(const complex &s, const cmatrix_subv &rv) throw() { return _mvsmult<cmatrix_subv,complex,cvector>(rv,s); }
512  INLINE cmatrix_subv &cmatrix_subv::operator *=(const complex &c) throw() { return _mvsmultassign(*this,c); }
513  INLINE cmatrix_subv &cmatrix_subv::operator +=(const complex &c) throw() { return _mvsplusassign(*this,c); }
514  INLINE cmatrix_subv &cmatrix_subv::operator -=(const complex &c) throw() { return _mvsminusassign(*this,c); }
515  INLINE cmatrix_subv &cmatrix_subv::operator /=(const complex &c) throw() { return _mvsdivassign(*this,c); }
516  INLINE rvector abs(const cmatrix_subv &mv) throw() { return _mvabs<cmatrix_subv,rvector>(mv); }
517  INLINE rvector Im(const cmatrix_subv &mv) throw() { return _mvim<cmatrix_subv,rvector>(mv); }
518  INLINE rvector Re(const cmatrix_subv &mv) throw() { return _mvre<cmatrix_subv,rvector>(mv); }
519  INLINE cmatrix_subv &SetIm(cmatrix_subv &mv,const rvector &rv)
520 #if(CXSC_INDEX_CHECK)
521  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
522 #else
523  throw()
524 #endif
525  { return _mvvsetim(mv,rv); }
526  INLINE cmatrix_subv &SetRe(cmatrix_subv &mv,const rvector &rv)
527 #if(CXSC_INDEX_CHECK)
528  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
529 #else
530  throw()
531 #endif
532  { return _mvvsetre(mv,rv); }
533  INLINE cmatrix_subv &SetRe(cmatrix_subv &iv,const real &r) throw() { return _mvssetre(iv,r); }
534  INLINE cmatrix_subv &SetIm(cmatrix_subv &iv,const real &r) throw() { return _mvssetim(iv,r); }
535  INLINE cvector &cvector::operator =(const cmatrix_subv &mv) throw() { return _vmvassign<cvector,cmatrix_subv,complex>(*this,mv); }
536  INLINE cvector_slice &cvector_slice::operator =(const cmatrix_subv &mv) throw() { return _vsvassign(*this,cvector(mv)); }
537 
538  INLINE complex operator *(const cmatrix_subv & rv1, const cmatrix_subv &rv2)
539 #if(CXSC_INDEX_CHECK)
540  throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
541 #else
542  throw()
543 #endif
544  { return _mvmvcmult<cmatrix_subv,cmatrix_subv,complex>(rv1,rv2); }
545  INLINE complex operator *(const cvector & rv1, const cmatrix_subv &rv2)
546 #if(CXSC_INDEX_CHECK)
547  throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
548 #else
549  throw()
550 #endif
551  { return _vmvcmult<cvector,cmatrix_subv,complex>(rv1,rv2); }
552  INLINE complex operator *(const cmatrix_subv &rv1,const cvector &rv2)
553 #if(CXSC_INDEX_CHECK)
554  throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
555 #else
556  throw()
557 #endif
558  { return _vmvcmult<cvector,cmatrix_subv,complex>(rv2,rv1); }
559  INLINE complex operator *(const cvector_slice &sl,const cmatrix_subv &sv)
560 #if(CXSC_INDEX_CHECK)
561  throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
562 #else
563  throw()
564 #endif
565  { return _vmvcmult<cvector,cmatrix_subv,complex>(cvector(sl),sv); }
566  INLINE complex operator *(const cmatrix_subv &mv,const cvector_slice &vs)
567 #if(CXSC_INDEX_CHECK)
568  throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
569 #else
570  throw()
571 #endif
572  { return _vmvcmult<cvector,cmatrix_subv,complex>(cvector(vs),mv); }
573  INLINE cvector operator +(const cmatrix_subv & rv1, const cmatrix_subv &rv2)
574 #if(CXSC_INDEX_CHECK)
575  throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
576 #else
577  throw()
578 #endif
579  { return _mvmvplus<cmatrix_subv,cmatrix_subv,cvector>(rv1,rv2); }
580  INLINE cvector operator +(const cmatrix_subv &rv1,const cvector &rv2)
581 #if(CXSC_INDEX_CHECK)
582  throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
583 #else
584  throw()
585 #endif
586  { return _mvvplus<cmatrix_subv,cvector,cvector>(rv1,rv2); }
587  INLINE cvector operator +(const cvector & rv1, const cmatrix_subv &rv2)
588 #if(CXSC_INDEX_CHECK)
589  throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
590 #else
591  throw()
592 #endif
593  { return _mvvplus<cmatrix_subv,cvector,cvector>(rv2,rv1); }
594  INLINE cvector operator +(const cvector_slice &sl,const cmatrix_subv &mv)
595 #if(CXSC_INDEX_CHECK)
596  throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
597 #else
598  throw()
599 #endif
600  { return _mvvplus<cmatrix_subv,cvector,cvector>(mv,cvector(sl)); }
601  INLINE cvector operator +(const cmatrix_subv &mv,const cvector_slice &sl)
602 #if(CXSC_INDEX_CHECK)
603  throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
604 #else
605  throw()
606 #endif
607  { return _mvvplus<cmatrix_subv,cvector,cvector>(mv,cvector(sl)); }
609 #if(CXSC_INDEX_CHECK)
610  throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
611 #else
612  throw()
613 #endif
614  { return _mvvplusassign(*this,rv); }
616 #if(CXSC_INDEX_CHECK)
617  throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
618 #else
619  throw()
620 #endif
621  { return _mvvplusassign(*this,cvector(rv)); }
622  INLINE cvector operator -(const cmatrix_subv & rv1, const cmatrix_subv &rv2)
623 #if(CXSC_INDEX_CHECK)
624  throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
625 #else
626  throw()
627 #endif
628  { return _mvmvminus<cmatrix_subv,cmatrix_subv,cvector>(rv1,rv2); }
629  INLINE cvector operator -(const cvector & rv1, const cmatrix_subv &rv2)
630 #if(CXSC_INDEX_CHECK)
631  throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
632 #else
633  throw()
634 #endif
635  { return _vmvminus<cvector,cmatrix_subv,cvector>(rv1,rv2); }
636  INLINE cvector operator -(const cmatrix_subv &rv1,const cvector &rv2)
637 #if(CXSC_INDEX_CHECK)
638  throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
639 #else
640  throw()
641 #endif
642  { return _mvvminus<cmatrix_subv,cvector,cvector>(rv1,rv2); }
643  INLINE cvector operator -(const cvector_slice &sl,const cmatrix_subv &mv)
644 #if(CXSC_INDEX_CHECK)
645  throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
646 #else
647  throw()
648 #endif
649  { return _vmvminus<cvector,cmatrix_subv,cvector>(cvector(sl),mv); }
650  INLINE cvector operator -(const cmatrix_subv &mv,const cvector_slice &sl)
651 #if(CXSC_INDEX_CHECK)
652  throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
653 #else
654  throw()
655 #endif
656  { return _mvvminus<cmatrix_subv,cvector,cvector>(mv,cvector(sl)); }
658 #if(CXSC_INDEX_CHECK)
659  throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
660 #else
661  throw()
662 #endif
663  { return _mvvminusassign(*this,rv); }
665 #if(CXSC_INDEX_CHECK)
666  throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
667 #else
668  throw()
669 #endif
670  { return _mvvminusassign(*this,cvector(rv)); }
671 // real
672 
674 #if(CXSC_INDEX_CHECK)
675  throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
676 #else
677  throw()
678 #endif
679  { return _mvvplusassign(*this,rv); }
681 #if(CXSC_INDEX_CHECK)
682  throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
683 #else
684  throw()
685 #endif
686  { return _mvvplusassign(*this,cvector(rv)); }
688 #if(CXSC_INDEX_CHECK)
689  throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
690 #else
691  throw()
692 #endif
693  { return _mvvminusassign(*this,rv); }
695 #if(CXSC_INDEX_CHECK)
696  throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM)
697 #else
698  throw()
699 #endif
700  { return _mvvminusassign(*this,rvector(rv)); }
701 
702 // matrix x matrix
708  INLINE cmatrix _cmatrix(const cmatrix &rm) throw() { return rm; }
714  INLINE cmatrix _cmatrix(const cvector &v) throw() { return cmatrix(v); }
720  INLINE cmatrix _cmatrix(const cvector_slice &v) throw() { return cmatrix(v); }
726  INLINE cmatrix _cmatrix(const complex &r) throw() { return cmatrix(r); }
727  INLINE int Lb(const cmatrix &rm, const int &i)
728 #if(CXSC_INDEX_CHECK)
729  throw(ERROR_CMATRIX_WRONG_ROW_OR_COL)
730 #else
731  throw()
732 #endif
733  { return _mlb(rm,i); }
734  INLINE int Ub(const cmatrix &rm, const int &i)
735 #if(CXSC_INDEX_CHECK)
736  throw(ERROR_CMATRIX_WRONG_ROW_OR_COL)
737 #else
738  throw()
739 #endif
740  { return _mub(rm,i); }
741  INLINE int Lb(const cmatrix_slice &rm, const int &i)
742 #if(CXSC_INDEX_CHECK)
743  throw(ERROR_CMATRIX_WRONG_ROW_OR_COL)
744 #else
745  throw()
746 #endif
747  { return _mslb(rm,i); }
748  INLINE int Ub(const cmatrix_slice &rm, const int &i)
749 #if(CXSC_INDEX_CHECK)
750  throw(ERROR_CMATRIX_WRONG_ROW_OR_COL)
751 #else
752  throw()
753 #endif
754  { return _msub(rm,i); }
755  INLINE cmatrix &SetLb(cmatrix &m, const int &i,const int &j)
756 #if(CXSC_INDEX_CHECK)
757  throw(ERROR_CMATRIX_WRONG_ROW_OR_COL)
758 #else
759  throw()
760 #endif
761  { return _msetlb(m,i,j); }
762  INLINE cmatrix &SetUb(cmatrix &m, const int &i,const int &j)
763 #if(CXSC_INDEX_CHECK)
764  throw(ERROR_CMATRIX_WRONG_ROW_OR_COL)
765 #else
766  throw()
767 #endif
768  { return _msetub(m,i,j); }
769 
770  INLINE int RowLen ( const cmatrix& A ) // Length of the rows of a complex matrix
771  { return Ub(A,2)-Lb(A,2)+1; } //---------------------------------------
772 
773  INLINE int ColLen ( const cmatrix& A ) // Length of the columns of a complex matrix
774  { return Ub(A,1)-Lb(A,1)+1; } //------------------------------------------
775 
776  INLINE int RowLen ( const cmatrix_slice& A ) // Length of the rows of a complex matrix
777  { return Ub(A,2)-Lb(A,2)+1; } //---------------------------------------
778 
779  INLINE int ColLen ( const cmatrix_slice& A ) // Length of the columns of a complex matrix
780  { return Ub(A,1)-Lb(A,1)+1; } //------------------------------------------
781 
782  INLINE void Resize(cmatrix &A) throw() { _mresize(A);}
783  INLINE void Resize(cmatrix &A,const int &m, const int &n)
784 #if(CXSC_INDEX_CHECK)
785  throw(ERROR_CMATRIX_WRONG_BOUNDARIES)
786 #else
787  throw()
788 #endif
789  { _mresize<cmatrix,complex>(A,m,n); }
790  INLINE void Resize(cmatrix &A,const int &m1, const int &m2,const int &n1,const int &n2)
791 #if(CXSC_INDEX_CHECK)
792  throw(ERROR_CMATRIX_WRONG_BOUNDARIES)
793 #else
794  throw()
795 #endif
796  { _mresize<cmatrix,complex>(A,m1,m2,n1,n2); }
797  INLINE rmatrix abs(const cmatrix &m) throw() { return _mabs<cmatrix,rmatrix>(m); }
798  INLINE rmatrix abs(const cmatrix_slice &ms) throw() { return _msabs<cmatrix_slice,rmatrix>(ms); }
799  INLINE rmatrix Im(const cmatrix &m) throw() { return _mim<cmatrix,rmatrix>(m); }
800  INLINE rmatrix Re(const cmatrix &m) throw() { return _mre<cmatrix,rmatrix>(m); }
801  INLINE rmatrix Im(const cmatrix_slice &m) throw() { return _msim<cmatrix_slice,rmatrix>(m); }
802  INLINE rmatrix Re(const cmatrix_slice &m) throw() { return _msre<cmatrix_slice,rmatrix>(m); }
803  INLINE cmatrix &SetIm(cmatrix &cm,const rmatrix &rm)
804 #if(CXSC_INDEX_CHECK)
805  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
806 #else
807  throw()
808 #endif
809  { return _mmsetim<cmatrix,rmatrix>(cm,rm); }
810  INLINE cmatrix_slice &SetIm(cmatrix_slice &cm,const rmatrix &rm)
811 #if(CXSC_INDEX_CHECK)
812  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
813 #else
814  throw()
815 #endif
816  { return _msmsetim<cmatrix_slice,rmatrix>(cm,rm); }
817  INLINE cmatrix &SetIm(cmatrix &cm,const rmatrix_slice &rm)
818 #if(CXSC_INDEX_CHECK)
819  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
820 #else
821  throw()
822 #endif
823  { return _mmssetim<cmatrix,rmatrix_slice>(cm,rm); }
824  INLINE cmatrix_slice &SetIm(cmatrix_slice &cm,const rmatrix_slice &rm)
825 #if(CXSC_INDEX_CHECK)
826  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
827 #else
828  throw()
829 #endif
830  { return _msmssetim<cmatrix_slice,rmatrix_slice>(cm,rm); }
831  INLINE cmatrix &SetRe(cmatrix &cm,const rmatrix &rm)
832 #if(CXSC_INDEX_CHECK)
833  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
834 #else
835  throw()
836 #endif
837  { return _mmsetre<cmatrix,rmatrix>(cm,rm); }
838  INLINE cmatrix_slice &SetRe(cmatrix_slice &cm,const rmatrix &rm)
839 #if(CXSC_INDEX_CHECK)
840  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
841 #else
842  throw()
843 #endif
844  { return _msmsetre<cmatrix_slice,rmatrix>(cm,rm); }
845  INLINE cmatrix &SetRe(cmatrix &cm,const rmatrix_slice &rm)
846 #if(CXSC_INDEX_CHECK)
847  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
848 #else
849  throw()
850 #endif
851  { return _mmssetre<cmatrix,rmatrix_slice>(cm,rm); }
852  INLINE cmatrix_slice &SetRe(cmatrix_slice &cm,const rmatrix_slice &rm)
853 #if(CXSC_INDEX_CHECK)
854  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
855 #else
856  throw()
857 #endif
858  { return _msmssetre<cmatrix_slice,rmatrix_slice>(cm,rm); }
859  INLINE complex::complex(const cmatrix &m)
860 #if(CXSC_INDEX_CHECK)
861  throw(ERROR_CMATRIX_TYPE_CAST_OF_THICK_OBJ,ERROR_CMATRIX_USE_OF_UNINITIALIZED_OBJ)
862 #else
863  throw()
864 #endif
865  { _smconstr(*this,m); }
866 // INLINE complex complex::_complex(const cmatrix &m) throw(ERROR_CMATRIX_TYPE_CAST_OF_THICK_OBJ,ERROR_CMATRIX_USE_OF_UNINITIALIZED_OBJ) { _smconstr(*this,m); return *this; }
867  INLINE cmatrix operator *(const complex &c, const cmatrix &m) throw() { return _smmult<complex,cmatrix,cmatrix>(c,m); }
868  INLINE cmatrix operator *(const complex &c, const cmatrix_slice &ms) throw() { return _smsmult<complex,cmatrix_slice,cmatrix>(c,ms); }
869  INLINE cmatrix operator *(const cmatrix &m,const complex &c) throw() { return _smmult<complex,cmatrix,cmatrix>(c,m); }
870  INLINE cmatrix operator *(const cmatrix_slice &ms,const complex &c) throw() { return _smsmult<complex,cmatrix_slice,cmatrix>(c,ms); }
871  INLINE cmatrix &operator *=(cmatrix &m,const complex &c) throw() { return _msmultassign(m,c); }
873 #if(CXSC_INDEX_CHECK)
874  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
875 #else
876  throw()
877 #endif
878  { return (*this=*this*m); }
880 #if(CXSC_INDEX_CHECK)
881  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
882 #else
883  throw()
884 #endif
885  { return (*this=*this*m); }
886  INLINE cmatrix_slice &cmatrix_slice::operator *=(const complex &c) throw() { return _mssmultassign(*this,c); }
887  INLINE cmatrix operator /(const cmatrix &m,const complex &c) throw() { return _msdiv<cmatrix,complex,cmatrix>(m,c); }
888  INLINE cmatrix operator /(const cmatrix_slice &ms, const complex &c) throw() { return _mssdiv<cmatrix_slice,complex,cmatrix>(ms,c); }
889  INLINE cmatrix &operator /=(cmatrix &m,const complex &c) throw() { return _msdivassign(m,c); }
890  INLINE cmatrix_slice &cmatrix_slice::operator /=(const complex &c) throw() { return _mssdivassign(*this,c); }
891  INLINE cmatrix operator *(const real &c, const cmatrix &m) throw() { return _smmult<real,cmatrix,cmatrix>(c,m); }
892  INLINE cmatrix operator *(const real &c, const cmatrix_slice &ms) throw() { return _smsmult<real,cmatrix_slice,cmatrix>(c,ms); }
893  INLINE cmatrix operator *(const cmatrix &m,const real &c) throw() { return _smmult<real,cmatrix,cmatrix>(c,m); }
894  INLINE cmatrix operator *(const cmatrix_slice &ms,const real &c) throw() { return _smsmult<real,cmatrix_slice,cmatrix>(c,ms); }
895  INLINE cmatrix &operator *=(cmatrix &m,const real &c) throw() { return _msmultassign(m,c); }
897 #if(CXSC_INDEX_CHECK)
898  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
899 #else
900  throw()
901 #endif
902  { return (*this=*this*m); }
904 #if(CXSC_INDEX_CHECK)
905  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
906 #else
907  throw()
908 #endif
909  { return (*this=*this*m); }
910  INLINE cmatrix_slice &cmatrix_slice::operator *=(const real &c) throw() { return _mssmultassign(*this,c); }
911  INLINE cmatrix operator /(const cmatrix &m,const real &c) throw() { return _msdiv<cmatrix,real,cmatrix>(m,c); }
912  INLINE cmatrix operator /(const cmatrix_slice &ms, const real &c) throw() { return _mssdiv<cmatrix_slice,real,cmatrix>(ms,c); }
913  INLINE cmatrix &operator /=(cmatrix &m,const real &c) throw() { return _msdivassign(m,c); }
914  INLINE cmatrix_slice &cmatrix_slice::operator /=(const real &c) throw() { return _mssdivassign(*this,c); }
915 // INLINE complex::complex(const rmatrix &m) throw(ERROR_CMATRIX_TYPE_CAST_OF_THICK_OBJ,ERROR_CMATRIX_USE_OF_UNINITIALIZED_OBJ) { _smconstr(*this,m); }
916 // INLINE complex complex::_complex(const cmatrix &m) throw(ERROR_CMATRIX_TYPE_CAST_OF_THICK_OBJ,ERROR_CMATRIX_USE_OF_UNINITIALIZED_OBJ) { _smconstr(*this,m); return *this; }
917  INLINE cmatrix operator *(const complex &c, const rmatrix &m) throw() { return _smmult<complex,rmatrix,cmatrix>(c,m); }
918  INLINE cmatrix operator *(const complex &c, const rmatrix_slice &ms) throw() { return _smsmult<complex,rmatrix_slice,cmatrix>(c,ms); }
919  INLINE cmatrix operator *(const rmatrix &m,const complex &c) throw() { return _smmult<complex,rmatrix,cmatrix>(c,m); }
920  INLINE cmatrix operator *(const rmatrix_slice &ms,const complex &c) throw() { return _smsmult<complex,rmatrix_slice,cmatrix>(c,ms); }
921  INLINE cmatrix operator /(const rmatrix &m,const complex &c) throw() { return _msdiv<rmatrix,complex,cmatrix>(m,c); }
922  INLINE cmatrix operator /(const rmatrix_slice &ms, const complex &c) throw() { return _mssdiv<rmatrix_slice,complex,cmatrix>(ms,c); }
923  INLINE cvector::cvector(const cmatrix &sl)
924 #if(CXSC_INDEX_CHECK)
925  throw(ERROR_CMATRIX_TYPE_CAST_OF_THICK_OBJ)
926 #else
927  throw()
928 #endif
929  { _vmconstr<cvector,cmatrix,complex>(*this,sl); }
930  INLINE cvector::cvector(const cmatrix_slice &sl)
931 #if(CXSC_INDEX_CHECK)
932  throw(ERROR_CMATRIX_TYPE_CAST_OF_THICK_OBJ)
933 #else
934  throw()
935 #endif
936  { _vmsconstr<cvector,cmatrix_slice,complex>(*this,sl); }
938 #if(CXSC_INDEX_CHECK)
939  throw(ERROR_CMATRIX_TYPE_CAST_OF_THICK_OBJ)
940 #else
941  throw()
942 #endif
943  { return _vmassign<cvector,cmatrix,complex>(*this,m); }
945 #if(CXSC_INDEX_CHECK)
946  throw(ERROR_CMATRIX_TYPE_CAST_OF_THICK_OBJ)
947 #else
948  throw()
949 #endif
950  { return _vmassign<cvector,cmatrix,complex>(*this,cmatrix(m)); }
952 #if(CXSC_INDEX_CHECK)
953  throw(ERROR__OP_WITH_WRONG_DIM<cvector>,ERROR_CMATRIX_TYPE_CAST_OF_THICK_OBJ)
954 #else
955  throw()
956 #endif
957  { return _vsvassign(*this,cvector(cmatrix(m))); }
959 #if(CXSC_INDEX_CHECK)
960  throw(ERROR_CMATRIX_TYPE_CAST_OF_THICK_OBJ)
961 #else
962  throw()
963 #endif
964  { return _mvvassign(*this,cvector(m)); }
966 #if(CXSC_INDEX_CHECK)
967  throw(ERROR_CMATRIX_TYPE_CAST_OF_THICK_OBJ)
968 #else
969  throw()
970 #endif
971  { return _mvvassign(*this,cvector(cmatrix(m))); }
972  INLINE cvector operator *(const cmatrix &m,const cvector &v)
973 #if(CXSC_INDEX_CHECK)
974  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
975 #else
976  throw()
977 #endif
978  { return _mvcmult<cmatrix,cvector,cvector>(m,v); }
979  INLINE cvector operator *(const cmatrix_slice &ms,const cvector &v)
980 #if(CXSC_INDEX_CHECK)
981  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
982 #else
983  throw()
984 #endif
985  { return _msvcmult<cmatrix_slice,cvector,cvector>(ms,v); }
986  INLINE cvector operator *(const cvector &v,const cmatrix &m)
987 #if(CXSC_INDEX_CHECK)
988  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
989 #else
990  throw()
991 #endif
992  { return _vmcmult<cvector,cmatrix,cvector>(v,m); }
993  INLINE cvector operator *(const cvector &v,const cmatrix_slice &ms)
994 #if(CXSC_INDEX_CHECK)
995  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
996 #else
997  throw()
998 #endif
999  { return _vmscmult<cvector,cmatrix_slice,cvector>(v,ms); }
1000  INLINE cvector &operator *=(cvector &v,const cmatrix &m)
1001 #if(CXSC_INDEX_CHECK)
1002  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1003 #else
1004  throw()
1005 #endif
1006  { return _vmcmultassign<cvector,cmatrix,complex>(v,m); }
1008 #if(CXSC_INDEX_CHECK)
1009  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1010 #else
1011  throw()
1012 #endif
1013  { return _vmscmultassign<cvector,cmatrix_slice,complex>(v,ms); }
1015 #if(CXSC_INDEX_CHECK)
1016  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1017 #else
1018  throw()
1019 #endif
1020  { return _vsmcmultassign<cvector_slice,cmatrix,complex>(*this,m); }
1021  INLINE cvector operator *(const cvector_slice &v,const cmatrix &m)
1022 #if(CXSC_INDEX_CHECK)
1023  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1024 #else
1025  throw()
1026 #endif
1027  { return _vmcmult<cvector,cmatrix,cvector>(cvector(v),m); }
1028  INLINE cvector operator *(const cvector_slice &v,const cmatrix_slice &m)
1029 #if(CXSC_INDEX_CHECK)
1030  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1031 #else
1032  throw()
1033 #endif
1034  { return _vmscmult<cvector,cmatrix_slice,cvector>(cvector(v),m); }
1036 #if(CXSC_INDEX_CHECK)
1037  throw(ERROR_CMATRIX_TYPE_CAST_OF_THICK_OBJ)
1038 #else
1039  throw()
1040 #endif
1041  { return _mvvassign(*this,rvector(m)); }
1043 #if(CXSC_INDEX_CHECK)
1044  throw(ERROR_CMATRIX_TYPE_CAST_OF_THICK_OBJ)
1045 #else
1046  throw()
1047 #endif
1048  { return _mvvassign(*this,rvector(rmatrix(m))); }
1049  INLINE cvector operator *(const rvector &v,const cmatrix &m)
1050 #if(CXSC_INDEX_CHECK)
1051  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1052 #else
1053  throw()
1054 #endif
1055  { return _vmcmult<rvector,cmatrix,cvector>(v,m); }
1056  INLINE cvector operator *(const rvector &v,const cmatrix_slice &ms)
1057 #if(CXSC_INDEX_CHECK)
1058  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1059 #else
1060  throw()
1061 #endif
1062  { return _vmscmult<rvector,cmatrix_slice,cvector>(v,ms); }
1063  INLINE cvector operator *(const rvector_slice &v,const cmatrix &m)
1064 #if(CXSC_INDEX_CHECK)
1065  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1066 #else
1067  throw()
1068 #endif
1069  { return _vmcmult<cvector,cmatrix,cvector>(cvector(v),m); }
1070  INLINE cvector operator *(const cmatrix &m,const rvector &v)
1071 #if(CXSC_INDEX_CHECK)
1072  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1073 #else
1074  throw()
1075 #endif
1076  { return _mvcmult<cmatrix,rvector,cvector>(m,v); }
1077  INLINE cvector operator *(const cmatrix_slice &ms,const rvector &v)
1078 #if(CXSC_INDEX_CHECK)
1079  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1080 #else
1081  throw()
1082 #endif
1083  { return _msvcmult<cmatrix_slice,rvector,cvector>(ms,v); }
1084 
1085  INLINE const cmatrix &operator +(const cmatrix &m) throw() { return m; }
1086  INLINE cmatrix operator +(const cmatrix_slice &m) throw() { return cmatrix(m); }
1087  INLINE cmatrix operator +(const cmatrix &m1,const cmatrix &m2)
1088 #if(CXSC_INDEX_CHECK)
1089  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1090 #else
1091  throw()
1092 #endif
1093  { return _mmplus<cmatrix,cmatrix,cmatrix>(m1,m2); }
1094  INLINE cmatrix operator +(const cmatrix &m,const cmatrix_slice &ms)
1095 #if(CXSC_INDEX_CHECK)
1096  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1097 #else
1098  throw()
1099 #endif
1100  { return _mmsplus<cmatrix,cmatrix_slice,cmatrix>(m,ms); }
1101  INLINE cmatrix operator +(const cmatrix_slice &ms,const cmatrix &m)
1102 #if(CXSC_INDEX_CHECK)
1103  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1104 #else
1105  throw()
1106 #endif
1107  { return _mmsplus<cmatrix,cmatrix_slice,cmatrix>(m,ms); }
1108  INLINE cmatrix operator +(const cmatrix_slice &m1,const cmatrix_slice &m2)
1109 #if(CXSC_INDEX_CHECK)
1110  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1111 #else
1112  throw()
1113 #endif
1114  { return _msmsplus<cmatrix_slice,cmatrix_slice,cmatrix>(m1,m2); }
1115  INLINE cmatrix &operator +=(cmatrix &m1,const cmatrix &m2)
1116 #if(CXSC_INDEX_CHECK)
1117  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1118 #else
1119  throw()
1120 #endif
1121  { return _mmplusassign(m1,m2); }
1122  INLINE cmatrix &operator +=(cmatrix &m1,const cmatrix_slice &ms)
1123 #if(CXSC_INDEX_CHECK)
1124  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1125 #else
1126  throw()
1127 #endif
1128  { return _mmsplusassign(m1,ms); }
1130 #if(CXSC_INDEX_CHECK)
1131  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1132 #else
1133  throw()
1134 #endif
1135  { return _msmplusassign(*this,m1); }
1137 #if(CXSC_INDEX_CHECK)
1138  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1139 #else
1140  throw()
1141 #endif
1142  { return _msmsplusassign(*this,ms2); }
1143  INLINE cmatrix operator -(const cmatrix &m) throw() { return _mminus(m); }
1144  INLINE cmatrix operator -(const cmatrix_slice &m) throw() { return _msminus<cmatrix_slice,cmatrix>(m); }
1145  INLINE cmatrix operator -(const cmatrix &m1,const cmatrix &m2)
1146 #if(CXSC_INDEX_CHECK)
1147  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1148 #else
1149  throw()
1150 #endif
1151  { return _mmminus<cmatrix,cmatrix,cmatrix>(m1,m2); }
1152  INLINE cmatrix operator -(const cmatrix &m,const cmatrix_slice &ms)
1153 #if(CXSC_INDEX_CHECK)
1154  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1155 #else
1156  throw()
1157 #endif
1158  { return _mmsminus<cmatrix,cmatrix_slice,cmatrix>(m,ms); }
1159  INLINE cmatrix operator -(const cmatrix_slice &ms,const cmatrix &m)
1160 #if(CXSC_INDEX_CHECK)
1161  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1162 #else
1163  throw()
1164 #endif
1165  { return _msmminus<cmatrix_slice,cmatrix,cmatrix>(ms,m); }
1166  INLINE cmatrix operator -(const cmatrix_slice &ms1,const cmatrix_slice &ms2)
1167 #if(CXSC_INDEX_CHECK)
1168  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1169 #else
1170  throw()
1171 #endif
1172  { return _msmsminus<cmatrix_slice,cmatrix_slice,cmatrix>(ms1,ms2); }
1173  INLINE cmatrix &operator -=(cmatrix &m1,const cmatrix &m2)
1174 #if(CXSC_INDEX_CHECK)
1175  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1176 #else
1177  throw()
1178 #endif
1179  { return _mmminusassign(m1,m2); }
1180  INLINE cmatrix &operator -=(cmatrix &m1,const cmatrix_slice &ms)
1181 #if(CXSC_INDEX_CHECK)
1182  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1183 #else
1184  throw()
1185 #endif
1186  { return _mmsminusassign(m1,ms); }
1188 #if(CXSC_INDEX_CHECK)
1189  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1190 #else
1191  throw()
1192 #endif
1193  { return _msmminusassign(*this,m1); }
1195 #if(CXSC_INDEX_CHECK)
1196  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1197 #else
1198  throw()
1199 #endif
1200  { return _msmsminusassign(*this,ms2); }
1201  INLINE cmatrix operator *(const cmatrix &m1, const cmatrix &m2)
1202 #if(CXSC_INDEX_CHECK)
1203  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1204 #else
1205  throw()
1206 #endif
1207  { return _mmcmult<cmatrix,cmatrix,cmatrix>(m1,m2); }
1208  INLINE cmatrix operator *(const cmatrix &m1, const cmatrix_slice &ms)
1209 #if(CXSC_INDEX_CHECK)
1210  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1211 #else
1212  throw()
1213 #endif
1214  { return _mmscmult<cmatrix,cmatrix_slice,cmatrix>(m1,ms); }
1215  INLINE cmatrix operator *(const cmatrix_slice &ms, const cmatrix &m1)
1216 #if(CXSC_INDEX_CHECK)
1217  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1218 #else
1219  throw()
1220 #endif
1221  { return _msmcmult<cmatrix_slice,cmatrix,cmatrix>(ms,m1); }
1222  INLINE cmatrix operator *(const cmatrix_slice &ms1, const cmatrix_slice &ms2)
1223 #if(CXSC_INDEX_CHECK)
1224  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1225 #else
1226  throw()
1227 #endif
1228  { return _msmscmult<cmatrix_slice,cmatrix_slice,cmatrix>(ms1,ms2); }
1229  INLINE cmatrix &operator *=(cmatrix &m1,const cmatrix &m2)
1230 #if(CXSC_INDEX_CHECK)
1231  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1232 #else
1233  throw()
1234 #endif
1235  { return _mmcmultassign<cmatrix,cmatrix,complex>(m1,m2); }
1236  INLINE cmatrix &operator *=(cmatrix &m1,const cmatrix_slice &ms)
1237 #if(CXSC_INDEX_CHECK)
1238  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1239 #else
1240  throw()
1241 #endif
1242  { return _mmscmultassign<cmatrix,cmatrix_slice,complex>(m1,ms); }
1243  INLINE cmatrix operator +(const rmatrix &m1,const cmatrix &m2)
1244 #if(CXSC_INDEX_CHECK)
1245  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1246 #else
1247  throw()
1248 #endif
1249  { return _mmplus<rmatrix,cmatrix,cmatrix>(m1,m2); }
1250  INLINE cmatrix operator +(const cmatrix &m1,const rmatrix &m2)
1251 #if(CXSC_INDEX_CHECK)
1252  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1253 #else
1254  throw()
1255 #endif
1256  { return _mmplus<rmatrix,cmatrix,cmatrix>(m2,m1); }
1257  INLINE cmatrix operator +(const rmatrix &m,const cmatrix_slice &ms)
1258 #if(CXSC_INDEX_CHECK)
1259  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1260 #else
1261  throw()
1262 #endif
1263  { return _mmsplus<rmatrix,cmatrix_slice,cmatrix>(m,ms); }
1264  INLINE cmatrix operator +(const cmatrix &m,const rmatrix_slice &ms)
1265 #if(CXSC_INDEX_CHECK)
1266  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1267 #else
1268  throw()
1269 #endif
1270  { return _mmsplus<cmatrix,rmatrix_slice,cmatrix>(m,ms); }
1271  INLINE cmatrix operator +(const rmatrix_slice &ms,const cmatrix &m)
1272 #if(CXSC_INDEX_CHECK)
1273  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1274 #else
1275  throw()
1276 #endif
1277  { return _mmsplus<cmatrix,rmatrix_slice,cmatrix>(m,ms); }
1278  INLINE cmatrix operator +(const cmatrix_slice &ms,const rmatrix &m)
1279 #if(CXSC_INDEX_CHECK)
1280  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1281 #else
1282  throw()
1283 #endif
1284  { return _mmsplus<rmatrix,cmatrix_slice,cmatrix>(m,ms); }
1285  INLINE cmatrix operator +(const rmatrix_slice &m1,const cmatrix_slice &m2)
1286 #if(CXSC_INDEX_CHECK)
1287  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1288 #else
1289  throw()
1290 #endif
1291  { return _msmsplus<rmatrix_slice,cmatrix_slice,cmatrix>(m1,m2); }
1292  INLINE cmatrix operator +(const cmatrix_slice &m1,const rmatrix_slice &m2)
1293 #if(CXSC_INDEX_CHECK)
1294  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1295 #else
1296  throw()
1297 #endif
1298  { return _msmsplus<rmatrix_slice,cmatrix_slice,cmatrix>(m2,m1); }
1299  INLINE cmatrix &operator +=(cmatrix &m1,const rmatrix &m2)
1300 #if(CXSC_INDEX_CHECK)
1301  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1302 #else
1303  throw()
1304 #endif
1305  { return _mmplusassign(m1,m2); }
1306  INLINE cmatrix &operator +=(cmatrix &m1,const rmatrix_slice &ms)
1307 #if(CXSC_INDEX_CHECK)
1308  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1309 #else
1310  throw()
1311 #endif
1312  { return _mmsplusassign(m1,ms); }
1314 #if(CXSC_INDEX_CHECK)
1315  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1316 #else
1317  throw()
1318 #endif
1319  { return _msmplusassign(*this,m1); }
1321 #if(CXSC_INDEX_CHECK)
1322  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1323 #else
1324  throw()
1325 #endif
1326  { return _msmsplusassign(*this,ms2); }
1327  INLINE cmatrix operator -(const rmatrix &m1,const cmatrix &m2)
1328 #if(CXSC_INDEX_CHECK)
1329  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1330 #else
1331  throw()
1332 #endif
1333  { return _mmminus<rmatrix,cmatrix,cmatrix>(m1,m2); }
1334  INLINE cmatrix operator -(const cmatrix &m1,const rmatrix &m2)
1335 #if(CXSC_INDEX_CHECK)
1336  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1337 #else
1338  throw()
1339 #endif
1340  { return _mmminus<cmatrix,rmatrix,cmatrix>(m1,m2); }
1341  INLINE cmatrix operator -(const rmatrix &m,const cmatrix_slice &ms)
1342 #if(CXSC_INDEX_CHECK)
1343  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1344 #else
1345  throw()
1346 #endif
1347  { return _mmsminus<rmatrix,cmatrix_slice,cmatrix>(m,ms); }
1348  INLINE cmatrix operator -(const cmatrix &m,const rmatrix_slice &ms)
1349 #if(CXSC_INDEX_CHECK)
1350  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1351 #else
1352  throw()
1353 #endif
1354  { return _mmsminus<cmatrix,rmatrix_slice,cmatrix>(m,ms); }
1355  INLINE cmatrix operator -(const rmatrix_slice &ms,const cmatrix &m)
1356 #if(CXSC_INDEX_CHECK)
1357  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1358 #else
1359  throw()
1360 #endif
1361  { return _msmminus<rmatrix_slice,cmatrix,cmatrix>(ms,m); }
1362  INLINE cmatrix operator -(const cmatrix_slice &ms,const rmatrix &m)
1363 #if(CXSC_INDEX_CHECK)
1364  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1365 #else
1366  throw()
1367 #endif
1368  { return _msmminus<cmatrix_slice,rmatrix,cmatrix>(ms,m); }
1369  INLINE cmatrix operator -(const rmatrix_slice &ms1,const cmatrix_slice &ms2)
1370 #if(CXSC_INDEX_CHECK)
1371  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1372 #else
1373  throw()
1374 #endif
1375  { return _msmsminus<rmatrix_slice,cmatrix_slice,cmatrix>(ms1,ms2); }
1376  INLINE cmatrix operator -(const cmatrix_slice &ms1,const rmatrix_slice &ms2)
1377 #if(CXSC_INDEX_CHECK)
1378  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1379 #else
1380  throw()
1381 #endif
1382  { return _msmsminus<cmatrix_slice,rmatrix_slice,cmatrix>(ms1,ms2); }
1383  INLINE cmatrix &operator -=(cmatrix &m1,const rmatrix &m2)
1384 #if(CXSC_INDEX_CHECK)
1385  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1386 #else
1387  throw()
1388 #endif
1389  { return _mmminusassign(m1,m2); }
1390  INLINE cmatrix &operator -=(cmatrix &m1,const rmatrix_slice &ms)
1391 #if(CXSC_INDEX_CHECK)
1392  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1393 #else
1394  throw()
1395 #endif
1396  { return _mmsminusassign(m1,ms); }
1398 #if(CXSC_INDEX_CHECK)
1399  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1400 #else
1401  throw()
1402 #endif
1403  { return _msmminusassign(*this,m1); }
1405 #if(CXSC_INDEX_CHECK)
1406  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1407 #else
1408  throw()
1409 #endif
1410  { return _msmsminusassign(*this,ms2); }
1411  INLINE cmatrix operator *(const rmatrix &m1, const cmatrix &m2)
1412 #if(CXSC_INDEX_CHECK)
1413  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1414 #else
1415  throw()
1416 #endif
1417  { return _mmcmult<rmatrix,cmatrix,cmatrix>(m1,m2); }
1418  INLINE cmatrix operator *(const cmatrix &m1, const rmatrix &m2)
1419 #if(CXSC_INDEX_CHECK)
1420  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1421 #else
1422  throw()
1423 #endif
1424  { return _mmcmult<cmatrix,rmatrix,cmatrix>(m1,m2); }
1425  INLINE cmatrix operator *(const rmatrix &m1, const cmatrix_slice &ms)
1426 #if(CXSC_INDEX_CHECK)
1427  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1428 #else
1429  throw()
1430 #endif
1431  { return _mmscmult<rmatrix,cmatrix_slice,cmatrix>(m1,ms); }
1432  INLINE cmatrix operator *(const cmatrix &m1, const rmatrix_slice &ms)
1433 #if(CXSC_INDEX_CHECK)
1434  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1435 #else
1436  throw()
1437 #endif
1438  { return _mmscmult<cmatrix,rmatrix_slice,cmatrix>(m1,ms); }
1439  INLINE cmatrix operator *(const rmatrix_slice &ms, const cmatrix &m1)
1440 #if(CXSC_INDEX_CHECK)
1441  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1442 #else
1443  throw()
1444 #endif
1445  { return _msmcmult<rmatrix_slice,cmatrix,cmatrix>(ms,m1); }
1446  INLINE cmatrix operator *(const cmatrix_slice &ms, const rmatrix &m1)
1447 #if(CXSC_INDEX_CHECK)
1448  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1449 #else
1450  throw()
1451 #endif
1452  { return _msmcmult<cmatrix_slice,rmatrix,cmatrix>(ms,m1); }
1453  INLINE cmatrix operator *(const rmatrix_slice &ms1, const cmatrix_slice &ms2)
1454 #if(CXSC_INDEX_CHECK)
1455  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1456 #else
1457  throw()
1458 #endif
1459  { return _msmscmult<rmatrix_slice,cmatrix_slice,cmatrix>(ms1,ms2); }
1460  INLINE cmatrix operator *(const cmatrix_slice &ms1, const rmatrix_slice &ms2)
1461 #if(CXSC_INDEX_CHECK)
1462  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1463 #else
1464  throw()
1465 #endif
1466  { return _msmscmult<cmatrix_slice,rmatrix_slice,cmatrix>(ms1,ms2); }
1467  INLINE cmatrix &operator *=(cmatrix &m1,const rmatrix &m2)
1468 #if(CXSC_INDEX_CHECK)
1469  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1470 #else
1471  throw()
1472 #endif
1473  { return _mmcmultassign<cmatrix,rmatrix,complex>(m1,m2); }
1474  INLINE cmatrix &operator *=(cmatrix &m1,const rmatrix_slice &ms)
1475 #if(CXSC_INDEX_CHECK)
1476  throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM)
1477 #else
1478  throw()
1479 #endif
1480  { return _mmscmultassign<cmatrix,rmatrix_slice,complex>(m1,ms); }
1481  INLINE bool operator ==(const cmatrix &m1,const cmatrix &m2) throw() { return _mmeq(m1,m2); }
1482  INLINE bool operator !=(const cmatrix &m1,const cmatrix &m2) throw() { return _mmneq(m1,m2); }
1483 /* INLINE bool operator <(const cmatrix &m1,const cmatrix &m2) throw() { return _mmless(m1,m2); }
1484  INLINE bool operator <=(const cmatrix &m1,const cmatrix &m2) throw() { return _mmleq(m1,m2); }
1485  INLINE bool operator >(const cmatrix &m1,const cmatrix &m2) throw() { return _mmless(m2,m1); }
1486  INLINE bool operator >=(const cmatrix &m1,const cmatrix &m2) throw() { return _mmleq(m2,m1); }
1487 */
1488  INLINE bool operator ==(const cmatrix &m1,const cmatrix_slice &ms) throw() { return _mmseq(m1,ms); }
1489  INLINE bool operator !=(const cmatrix &m1,const cmatrix_slice &ms) throw() { return _mmsneq(m1,ms); }
1490 /* INLINE bool operator <(const cmatrix &m1,const cmatrix_slice &ms) throw() { return _mmsless(m1,ms); }
1491  INLINE bool operator <=(const cmatrix &m1,const cmatrix_slice &ms) throw() { return _mmsleq(m1,ms); }
1492  INLINE bool operator >(const cmatrix &m1,const cmatrix_slice &ms) throw() { return _msmless(ms,m1); }
1493  INLINE bool operator >=(const cmatrix &m1,const cmatrix_slice &ms) throw() { return _msmleq(ms,m1); }
1494 */
1495  INLINE bool operator ==(const cmatrix_slice &m1,const cmatrix_slice &m2) throw() { return _msmseq(m1,m2); }
1496  INLINE bool operator !=(const cmatrix_slice &m1,const cmatrix_slice &m2) throw() { return _msmsneq(m1,m2); }
1497 /* INLINE bool operator <(const cmatrix_slice &m1,const cmatrix_slice &m2) throw() { return _msmsless(m1,m2); }
1498  INLINE bool operator <=(const cmatrix_slice &m1,const cmatrix_slice &m2) throw() { return _msmsleq(m1,m2); }
1499  INLINE bool operator >(const cmatrix_slice &m1,const cmatrix_slice &m2) throw() { return _msmsless(m2,m1); }
1500  INLINE bool operator >=(const cmatrix_slice &m1,const cmatrix_slice &m2) throw() { return _msmsleq(m2,m1); }
1501 */
1502  INLINE bool operator !(const cmatrix &ms) throw() { return _mnot(ms); }
1503  INLINE bool operator !(const cmatrix_slice &ms) throw() { return _msnot(ms); }
1504  INLINE std::ostream &operator <<(std::ostream &s,const cmatrix &r) throw() { return _mout(s,r); }
1505  INLINE std::ostream &operator <<(std::ostream &s,const cmatrix_slice &r) throw() { return _msout(s,r); }
1506  INLINE std::istream &operator >>(std::istream &s,cmatrix &r) throw() { return _min(s,r); }
1507  INLINE std::istream &operator >>(std::istream &s,cmatrix_slice &r) throw() { return _msin(s,r); }
1508 
1510  INLINE cmatrix cmatrix::operator()(const intvector& p, const intvector& q) {
1511  cmatrix A(*this);
1512  for(int i=0 ; i<ColLen(A) ; i++)
1513  for(int j=0 ; j<RowLen(A) ; j++)
1514  A[i+Lb(A,1)][j+Lb(A,2)] = (*this)[p[i+Lb(p)]+Lb(A,1)][q[j+Lb(q)]+Lb(A,2)];
1515  return A;
1516  }
1517 
1520  cmatrix A(*this);
1521  for(int i=0 ; i<ColLen(A) ; i++)
1522  A[i+Lb(A,1)] = (*this)[p[i+Lb(p)]+Lb(A,1)];
1523  return A;
1524  }
1525 
1528  intvector p = permvec(P);
1529  return (*this)(p);
1530  }
1531 
1533  INLINE cmatrix cmatrix::operator()(const intmatrix& P, const intmatrix& Q) {
1534  intvector p = permvec(P);
1535  intvector q = perminv(permvec(Q));
1536  return (*this)(p,q);
1537  }
1538 
1541  intvector p = permvec(P);
1542  return (*this)(p);
1543  }
1544 
1545 } // namespace cxsc
1546 
1547 #endif
cmatrix _cmatrix(const cmatrix &rm)
Deprecated typecast, which only exist for the reason of compatibility with older versions of C-XSC...
Definition: cmatrix.inl:708
cmatrix_subv & operator-=(const scmatrix_subv &rv)
Implementation of standard assigning operator.
Definition: scmatrix.hpp:4356
The Data Type rmatrix_slice.
Definition: rmatrix.hpp:1442
cmatrix_subv & operator=(const scmatrix_subv &rv)
Implementation of standard assigning operator.
Definition: scmatrix.hpp:4386
cmatrix_slice & operator-=(const srmatrix &m)
Implementation of addition and assignment operator.
Definition: scmatrix.hpp:1752
cimatrix & operator/=(cimatrix &m, const cinterval &c)
Implementation of division and allocation operation.
Definition: cimatrix.inl:1623
cmatrix_subv & operator+=(const scmatrix_subv &rv)
Implementation of standard assigning operator.
Definition: scmatrix.hpp:4326
cvector_slice & operator*=(const complex &r)
Implementation of multiplication and allocation operation.
Definition: cvector.inl:423
cmatrix & operator=(const complex &r)
Implementation of standard assigning operator.
Definition: cmatrix.inl:438
cmatrix & operator*=(const srmatrix &m)
Implementation of addition and assignment operator.
Definition: scmatrix.hpp:1760
cmatrix()
Constructor of class cmatrix.
Definition: cmatrix.inl:31
The Data Type intmatrix.
Definition: intmatrix.hpp:313
cmatrix & operator()()
Operator for accessing the whole matrix.
Definition: cmatrix.hpp:1175
int Lb(const cimatrix &rm, const int &i)
Returns the lower bound index.
Definition: cimatrix.inl:1156
cmatrix_subv operator[](const int &i)
Operator for accessing a single row of the matrix.
Definition: cmatrix.inl:300
The namespace cxsc, providing all functionality of the class library C-XSC.
Definition: cdot.cpp:29
civector operator*(const cimatrix_subv &rv, const cinterval &s)
Implementation of multiplication operation.
Definition: cimatrix.inl:731
cimatrix_subv Col(cimatrix &m, const int &i)
Returns one column of the matrix as a vector.
Definition: cimatrix.inl:242
cimatrix & SetLb(cimatrix &m, const int &i, const int &j)
Sets the lower bound index.
Definition: cimatrix.inl:1184
cvector & operator()()
Operator for accessing the whole vector.
Definition: cvector.hpp:817
complex & operator[](const int &i) const
Operator for accessing the single elements of the vector (read-only)
Definition: cmatrix.inl:195
cvector & operator=(const cvector &rv)
Implementation of standard assigning operator.
Definition: cvector.inl:276
The Data Type rvector_slice.
Definition: rvector.hpp:1063
The Data Type cvector.
Definition: cvector.hpp:57
cimatrix & SetUb(cimatrix &m, const int &i, const int &j)
Sets the upper bound index.
Definition: cimatrix.inl:1191
The Data Type rmatrix_subv.
Definition: rmatrix.hpp:53
cmatrix_subv & operator()()
Operator for accessing the whole vector.
Definition: cmatrix.hpp:289
The Data Type rvector.
Definition: rvector.hpp:57
The Data Type cmatrix.
Definition: cmatrix.hpp:513
cmatrix_slice & operator+=(const srmatrix &m)
Implementation of addition and assignment operator.
Definition: scmatrix.hpp:1736
cmatrix_slice & operator=(const cmatrix &m)
Implementation of standard assigning operator.
Definition: cmatrix.inl:450
void Resize(cimatrix &A)
Resizes the matrix.
Definition: cimatrix.inl:1211
cvector_slice & operator=(const scvector &sl)
Implementation of standard assigning operator.
Definition: scvector.hpp:1545
The Data Type rmatrix.
Definition: rmatrix.hpp:470
int ColLen(const cimatrix &)
Returns the column dimension.
Definition: cimatrix.inl:1202
cmatrix_slice & operator()()
Operator for accessing the whole matrix.
Definition: cmatrix.hpp:1698
The Scalar Type complex.
Definition: complex.hpp:49
The Data Type cmatrix_subv.
Definition: cmatrix.hpp:53
cimatrix_subv Row(cimatrix &m, const int &i)
Returns one row of the matrix as a vector.
Definition: cimatrix.inl:231
int RowLen(const cimatrix &)
Returns the row dimension.
Definition: cimatrix.inl:1199
cvector()
Constructor of class cvector.
Definition: cvector.inl:31
cmatrix & operator+=(const srmatrix &m)
Implementation of addition and assignment operator.
Definition: scmatrix.hpp:1728
The Data Type cmatrix_slice.
Definition: cmatrix.hpp:1202
complex(void)
Constructor of class complex.
Definition: complex.hpp:59
cmatrix_slice & operator*=(const srmatrix &m)
Implementation of addition and assignment operator.
Definition: scmatrix.hpp:1768
cmatrix_subv operator[](const int &i) const
Operator for accessing a single row of the matrix.
Definition: cmatrix.inl:222
cmatrix_subv & operator/=(const complex &c)
Implementation of division and allocation operation.
Definition: cmatrix.inl:515
cmatrix & operator-=(const srmatrix &m)
Implementation of addition and assignment operator.
Definition: scmatrix.hpp:1744
int Ub(const cimatrix &rm, const int &i)
Returns the upper bound index.
Definition: cimatrix.inl:1163
civector operator/(const cimatrix_subv &rv, const cinterval &s)
Implementation of division operation.
Definition: cimatrix.inl:730
The Data Type cvector_slice.
Definition: cvector.hpp:844
cmatrix_subv & operator*=(const complex &c)
Implementation of multiplication and allocation operation.
Definition: cmatrix.inl:512
The Scalar Type real.
Definition: real.hpp:113
The Data Type intvector.
Definition: intvector.hpp:51
ivector abs(const cimatrix_subv &mv)
Returns the absolute value of the matrix.
Definition: cimatrix.inl:737
cmatrix_slice & operator/=(const complex &c)
Implementation of division and allocation operation.
Definition: cmatrix.inl:890