C-XSC - A C++ Class Library for Extended Scientific Computing  2.5.4
intmatrix.hpp
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: intmatrix.hpp,v 1.20 2014/01/30 17:23:45 cxsc Exp $ */
25 
26 #ifndef _CXSC_INTMATRIX_HPP_INCLUDED
27 #define _CXSC_INTMATRIX_HPP_INCLUDED
28 
29 #include "xscclass.hpp"
30 
31 #include "dot.hpp"
32 #include "intvector.hpp"
33 #include "except.hpp"
34 #include "matrix.hpp"
35 
36 namespace cxsc {
37 
38 class intmatrix;
39 class intmatrix_slice;
40 
42 
46 {
47  friend class intvector;
48  friend class intmatrix;
49  friend class intmatrix_slice;
50  private:
51  int *dat;
52  int lb,ub;
53  int size,start,offset; // start=first element index 0..n-1
54 
55  public:
57  friend INLINE intmatrix_subv Row(intmatrix &m,const int &i)
58 #if(CXSC_INDEX_CHECK)
59  throw(ERROR_INTMATRIX_ROW_OR_COL_NOT_IN_MAT);
60 #else
61  throw();
62 #endif
63  friend INLINE intmatrix_subv Col(intmatrix &m,const int &i)
65 #if(CXSC_INDEX_CHECK)
66  throw(ERROR_INTMATRIX_ROW_OR_COL_NOT_IN_MAT);
67 #else
68  throw();
69 #endif
70  friend INLINE intmatrix_subv Row(const intmatrix &m,const int &i)
71 #if(CXSC_INDEX_CHECK)
72  throw(ERROR_INTMATRIX_ROW_OR_COL_NOT_IN_MAT);
73 #else
74  throw();
75 #endif
76  friend INLINE intmatrix_subv Col(const intmatrix &m,const int &i)
78 #if(CXSC_INDEX_CHECK)
79  throw(ERROR_INTMATRIX_ROW_OR_COL_NOT_IN_MAT);
80 #else
81  throw();
82 #endif
83 //#if(CXSC_INDEX_CHECK)
84 #ifdef _CXSC_FRIEND_TPL
85  //----------------- Templates ---------------------------------------
86 template <class MV1,class MV2> friend MV1 &_mvmvassign(MV1 &v,const MV2 &rv)
87 #if(CXSC_INDEX_CHECK)
88  throw(ERROR__OP_WITH_WRONG_DIM<MV1>);
89 #else
90  throw();
91 #endif
92 template <class MV,class S> friend MV &_mvsassign(MV &v,const S &r) throw();
93 template <class MV,class V> friend MV &_mvvassign(MV &v,const V &rv)
94 #if(CXSC_INDEX_CHECK)
95  throw(ERROR__OP_WITH_WRONG_DIM<MV>);
96 #else
97  throw();
98 #endif
99 template <class V,class MV2,class S> friend V &_vmvassign(V &v,const MV2 &rv) throw();
100 template <class MV,class V> friend V _mvabs(const MV &mv) throw();
101 template <class DP,class V,class SV> friend void _vmvaccu(DP &dp, const V & rv1, const SV &rv2)
102 #if(CXSC_INDEX_CHECK)
103  throw(OP_WITH_WRONG_DIM);
104 #else
105  throw();
106 #endif
107 template <class DP,class MV1,class MV2> friend void _mvmvaccu(DP &dp, const MV1 & rv1, const MV2 &rv2)
108 #if(CXSC_INDEX_CHECK)
109  throw(OP_WITH_WRONG_DIM);
110 #else
111  throw();
112 #endif
113  template <class MV,class S,class E> friend E _mvsmult(const MV &rv, const S &s) throw();
114  template <class MV1,class MV2,class E> friend E _mvmvplus(const MV1 &rv1, const MV2 &rv2)
115 #if(CXSC_INDEX_CHECK)
116  throw(ERROR__OP_WITH_WRONG_DIM<E>);
117 #else
118  throw();
119 #endif
120  template <class MV1,class MV2,class E> friend E _mvmvminus(const MV1 &rv1, const MV2 &rv2)
121 #if(CXSC_INDEX_CHECK)
122  throw(ERROR__OP_WITH_WRONG_DIM<E>);
123 #else
124  throw();
125 #endif
126  template <class MV,class V,class E> friend E _mvvplus(const MV &rv1, const V &rv2)
127 #if(CXSC_INDEX_CHECK)
128  throw(ERROR__OP_WITH_WRONG_DIM<E>);
129 #else
130  throw();
131 #endif
132  template <class MV,class V,class E> friend E _mvvminus(const MV &rv1, const V &rv2)
133 #if(CXSC_INDEX_CHECK)
134  throw(ERROR__OP_WITH_WRONG_DIM<E>);
135 #else
136  throw();
137 #endif
138  template <class V,class MV,class E> friend E _vmvminus(const V &rv1, const MV &rv2)
139 #if(CXSC_INDEX_CHECK)
140  throw(ERROR__OP_WITH_WRONG_DIM<E>);
141 #else
142  throw();
143 #endif
144  template <class MV,class S,class E> friend E _mvsdiv(const MV &rv, const S &s) throw();
145 template <class MV,class S> friend MV &_mvsmultassign(MV &v,const S &r) throw();
146 template <class MV, class S> friend MV &_mvsplusassign(MV &v,const S &r) throw();
147 template <class MV,class S> friend MV &_mvsminusassign(MV &v,const S &r) throw();
148 template <class MV,class S> friend MV &_mvsdivassign(MV &v,const S &r) throw();
149 template <class MV,class V> friend MV &_mvvplusassign(MV &v,const V &rv)
150 #if(CXSC_INDEX_CHECK)
151  throw(ERROR__OP_WITH_WRONG_DIM<MV>);
152 #else
153  throw();
154 #endif
155 template <class V,class MV> friend V &_vmvplusassign(V &rv,const MV &v)
156 #if(CXSC_INDEX_CHECK)
157  throw(ERROR__OP_WITH_WRONG_DIM<V>);
158 #else
159  throw();
160 #endif
161 template <class MV,class V> friend MV &_mvvminusassign(MV &v,const V &rv)
162 #if(CXSC_INDEX_CHECK)
163  throw(ERROR__OP_WITH_WRONG_DIM<MV>);
164 #else
165  throw();
166 #endif
167 template <class V,class MV> friend V &_vmvminusassign(V &rv,const MV &v)
168 #if(CXSC_INDEX_CHECK)
169  throw(ERROR__OP_WITH_WRONG_DIM<V>);
170 #else
171  throw();
172 #endif
173 
174 #endif
175 
176  //----------------- Konstruktoren ----------------------------------
177 
179  explicit INLINE intmatrix_subv (int *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) { }
180  public:
182  INLINE intmatrix_subv(const intmatrix_subv &v) throw():dat(v.dat),lb(v.lb),ub(v.ub),size(v.size),start(v.start),offset(v.offset) { }
183  public:
184 
185  //---------------------- Standardfunktionen ------------------------
186 
187  friend INLINE intvector::intvector(const intmatrix_subv &) throw();
189  INLINE intmatrix_subv &operator =(const intmatrix_subv &rv) throw();
191  INLINE intmatrix_subv &operator =(const int &r) throw();
193  INLINE intmatrix_subv &operator =(const intmatrix &m)
194 #if(CXSC_INDEX_CHECK)
195  throw(ERROR_INTMATRIX_TYPE_CAST_OF_THICK_OBJ);
196 #else
197  throw();
198 #endif
199  INLINE intmatrix_subv &operator =(const intmatrix_slice &m)
201 #if(CXSC_INDEX_CHECK)
202  throw(ERROR_INTMATRIX_TYPE_CAST_OF_THICK_OBJ);
203 #else
204  throw();
205 #endif
206  INLINE intmatrix_subv &operator =(const intvector &v)
208 #if(CXSC_INDEX_CHECK)
209  throw(ERROR_INTVECTOR_OP_WITH_WRONG_DIM);
210 #else
211  throw();
212 #endif
213  INLINE intmatrix_subv &operator =(const intvector_slice &v)
215 #if(CXSC_INDEX_CHECK)
216  throw(ERROR_INTVECTOR_OP_WITH_WRONG_DIM);
217 #else
218  throw();
219 #endif
220  friend INLINE int Lb(const intmatrix_subv &rv) throw() { return rv.lb; }
223  friend INLINE int Ub(const intmatrix_subv &rv) throw() { return rv.ub; }
225  INLINE int &operator [](const int &i) const
226 #if(CXSC_INDEX_CHECK)
227  throw(ERROR_INTVECTOR_ELEMENT_NOT_IN_VEC);
228 #else
229  throw();
230 #endif
231  INLINE intmatrix_subv &operator ()() throw() { return *this; }
234  INLINE intmatrix_subv operator ()(const int &i)
235 #if(CXSC_INDEX_CHECK)
236  throw(ERROR_INTVECTOR_SUB_ARRAY_TOO_BIG);
237 #else
238  throw();
239 #endif
240  INLINE intmatrix_subv operator ()(const int &i1,const int &i2)
242 #if(CXSC_INDEX_CHECK)
243  throw(ERROR_INTVECTOR_SUB_ARRAY_TOO_BIG);
244 #else
245  throw();
246 #endif
247 
249  INLINE intmatrix_subv &operator *=(const int &c) throw();
251  INLINE intmatrix_subv &operator +=(const int &c) throw();
253  INLINE intmatrix_subv &operator -=(const int &c) throw();
255  INLINE intmatrix_subv &operator /=(const int &c) throw();
257  INLINE intmatrix_subv &operator -=(const intvector &rv)
258 #if(CXSC_INDEX_CHECK)
259  throw(ERROR_INTVECTOR_OP_WITH_WRONG_DIM);
260 #else
261  throw();
262 #endif
263  INLINE intmatrix_subv &operator -=(const intvector_slice &rv)
265 #if(CXSC_INDEX_CHECK)
266  throw(ERROR_INTVECTOR_OP_WITH_WRONG_DIM);
267 #else
268  throw();
269 #endif
270  INLINE intmatrix_subv &operator +=(const intvector &rv)
272 #if(CXSC_INDEX_CHECK)
273  throw(ERROR_INTVECTOR_OP_WITH_WRONG_DIM);
274 #else
275  throw();
276 #endif
277  INLINE intmatrix_subv &operator +=(const intvector_slice &rv)
279 #if(CXSC_INDEX_CHECK)
280  throw(ERROR_INTVECTOR_OP_WITH_WRONG_DIM);
281 #else
282  throw();
283 #endif
284 //#else
285 //#endif
286 
287 };
288 
289 
291 INLINE intmatrix_subv Row(intmatrix &m,const int &i)
292 #if(CXSC_INDEX_CHECK)
293  throw(ERROR_INTMATRIX_ROW_OR_COL_NOT_IN_MAT);
294 #else
295  throw();
296 #endif
297 INLINE intmatrix_subv Col(intmatrix &m,const int &i)
299 #if(CXSC_INDEX_CHECK)
300  throw(ERROR_INTMATRIX_ROW_OR_COL_NOT_IN_MAT);
301 #else
302  throw();
303 #endif
304 
305 
306 //----------------------- Matrix -----------------------------------------------
307 
308 class intmatrix_slice;
310 
314 {
315  friend class intmatrix_slice;
316  friend class intmatrix_subv;
317  private:
318  int *dat;
319  int lb1,ub1,lb2,ub2,xsize,ysize;
320 
321  public:
322 //#if(CXSC_INDEX_CHECK)
323 #ifdef _CXSC_FRIEND_TPL
324  //----------------- Templates ---------------------------------------
325 template <class S,class M> friend void _smconstr(S &s,const M &m)
326 #if(CXSC_INDEX_CHECK)
327  throw(ERROR__TYPE_CAST_OF_THICK_OBJ<M>,ERROR__USE_OF_UNINITIALIZED_OBJ<M>);
328 #else
329  throw();
330 #endif
331 template <class V,class M,class S> friend void _vmconstr(V &v,const M &m)
332 #if(CXSC_INDEX_CHECK)
333  throw(ERROR__TYPE_CAST_OF_THICK_OBJ<M>);
334 #else
335  throw();
336 #endif
337  template <class M1,class M2,class S> friend M1 &_mmassign(M1 &m1,const M2 &m,S ms) throw();
338  template <class M,class MS2,class S> friend M &_mmsassign(M &m,const MS2 &ms) throw();
339  template <class MS,class M> friend MS &_msmassign(MS &ms,const M &m)
340 #if(CXSC_INDEX_CHECK)
341  throw(ERROR__OP_WITH_WRONG_DIM<MS>);
342 #else
343  throw();
344 #endif
345  template <class M,class S> friend M &_msassign(M &m,const S &r) throw();
346 template <class V,class M,class S> friend V &_vmassign(V &v,const M &m)
347 #if(CXSC_INDEX_CHECK)
348  throw(ERROR__TYPE_CAST_OF_THICK_OBJ<M>);
349 #else
350  throw();
351 #endif
352 template <class M,class V,class S> friend M &_mvassign(M &m,const V &v) throw();
353  template <class M> friend int _mlb(const M &m, const int &i)
354 #if(CXSC_INDEX_CHECK)
355  throw(ERROR__WRONG_ROW_OR_COL<M>);
356 #else
357  throw();
358 #endif
359  template <class M> friend int _mub(const M &m, const int &i)
360 #if(CXSC_INDEX_CHECK)
361  throw(ERROR__WRONG_ROW_OR_COL<M>);
362 #else
363  throw();
364 #endif
365  template <class M> friend M &_msetlb(M &m, const int &i,const int &j)
366 #if(CXSC_INDEX_CHECK)
367  throw(ERROR__WRONG_ROW_OR_COL<M>);
368 #else
369  throw();
370 #endif
371  template <class M> friend M &_msetub(M &m, const int &i,const int &j)
372 #if(CXSC_INDEX_CHECK)
373  throw(ERROR__WRONG_ROW_OR_COL<M>);
374 #else
375  throw();
376 #endif
377  template <class M> friend void _mresize(M &A) throw();
378  template <class M,class S> friend void _mresize(M &A,const int &m, const int &n)
379 #if(CXSC_INDEX_CHECK)
380  throw(ERROR__WRONG_BOUNDARIES<M>);
381 #else
382  throw();
383 #endif
384  template <class M,class S> friend void _mresize(M &A,const int &m1, const int &m2,const int &n1,const int &n2)
385 #if(CXSC_INDEX_CHECK)
386  throw(ERROR__WRONG_BOUNDARIES<M>);
387 #else
388  throw();
389 #endif
390  template <class M,class E> friend E _mabs(const M &m) throw();
391  template <class MS,class E> friend E _msabs(const MS &ms) throw();
392  //------- matrix-matrix --------------
393  template <class M1,class M2,class E> friend E _mmplus(const M1 &m1,const M2 &m2)
394 #if(CXSC_INDEX_CHECK)
395  throw(ERROR__OP_WITH_WRONG_DIM<M1>);
396 #else
397  throw();
398 #endif
399  template <class M,class MS,class E> friend E _mmsplus(const M &m,const MS &ms)
400 #if(CXSC_INDEX_CHECK)
401  throw(ERROR__OP_WITH_WRONG_DIM<M>);
402 #else
403  throw();
404 #endif
405  template <class MS1,class MS2,class E> friend E _msmsplus(const MS1 &m1,const MS2 &m2)
406 #if(CXSC_INDEX_CHECK)
407  throw(ERROR__OP_WITH_WRONG_DIM<E>);
408 #else
409  throw();
410 #endif
411  template <class M> friend M _mminus(const M &m) throw();
412  template <class MS,class E> friend E _msminus(const MS &ms) throw();
413  template <class M1,class M2,class E> friend E _mmminus(const M1 &m1,const M2 &m2)
414 #if(CXSC_INDEX_CHECK)
415  throw(ERROR__OP_WITH_WRONG_DIM<M1>);
416 #else
417  throw();
418 #endif
419  template <class M1,class M2> friend M1 &_mmplusassign(M1 &m1,const M2 &m2)
420 #if(CXSC_INDEX_CHECK)
421  throw(ERROR__OP_WITH_WRONG_DIM<M1>);
422 #else
423  throw();
424 #endif
425  template <class M,class MS> friend M &_mmsplusassign(M &m1,const MS &ms)
426 #if(CXSC_INDEX_CHECK)
427  throw(ERROR__OP_WITH_WRONG_DIM<M>);
428 #else
429  throw();
430 #endif
431  template <class MS,class M> friend MS &_msmplusassign(MS &ms,const M &m1)
432 #if(CXSC_INDEX_CHECK)
433  throw(ERROR__OP_WITH_WRONG_DIM<MS>);
434 #else
435  throw();
436 #endif
437  template <class M,class MS,class E> friend E _mmsminus(const M &m,const MS &ms)
438 #if(CXSC_INDEX_CHECK)
439  throw(ERROR__OP_WITH_WRONG_DIM<E>);
440 #else
441  throw();
442 #endif
443  template <class MS,class M,class E> friend E _msmminus(const MS &ms,const M &m)
444 #if(CXSC_INDEX_CHECK)
445  throw(ERROR__OP_WITH_WRONG_DIM<E>);
446 #else
447  throw();
448 #endif
449  template <class MS1,class MS2,class E> friend E _msmsminus(const MS1 &ms1,const MS2 &ms2)
450 #if(CXSC_INDEX_CHECK)
451  throw(ERROR__OP_WITH_WRONG_DIM<E>);
452 #else
453  throw();
454 #endif
455  template <class M1,class M2> friend M1 &_mmminusassign(M1 &m1,const M2 &m2)
456 #if(CXSC_INDEX_CHECK)
457  throw(ERROR__OP_WITH_WRONG_DIM<M1>);
458 #else
459  throw();
460 #endif
461  template <class M,class MS> friend M &_mmsminusassign(M &m1,const MS &ms)
462 #if(CXSC_INDEX_CHECK)
463  throw(ERROR__OP_WITH_WRONG_DIM<M>);
464 #else
465  throw();
466 #endif
467  template <class MS,class M> friend MS &_msmminusassign(MS &ms,const M &m1)
468 #if(CXSC_INDEX_CHECK)
469  throw(ERROR__OP_WITH_WRONG_DIM<MS>);
470 #else
471  throw();
472 #endif
473  //-------- matrix-scalar ---------------------
474  template <class S,class M,class E> friend E _smmult(const S &c, const M &m) throw();
475  template <class M,class S> friend M &_msmultassign(M &m,const S &c) throw();
476  template <class S,class MS,class E> friend E _smsmult(const S &c, const MS &ms) throw();
477  template <class M,class S,class E> friend E _msdiv(const M &m,const S &c) throw();
478  template <class M,class S> friend M &_msdivassign(M &m,const S &c) throw();
479  template <class MS,class S,class E> friend E _mssdiv(const MS &ms, const S &c) throw();
480  //--------- matrix-vector --------------------
481 
482  template <class M> friend void *_mvoid(const M &m) throw();
483  template <class M> friend bool _mnot(const M &m) throw();
484  template <class MS> friend void *_msvoid(const MS &ms) throw();
485  template <class MS> friend bool _msnot(const MS &ms) throw();
486  template <class M1,class M2> friend bool _mmeq(const M1 &m1,const M2 &m2) throw();
487  template <class M1,class M2> friend bool _mmneq(const M1 &m1,const M2 &m2) throw();
488  template <class M1,class M2> friend bool _mmless(const M1 &m1,const M2 &m2) throw();
489  template <class M1,class M2> friend bool _mmleq(const M1 &m1,const M2 &m2) throw();
490  template <class M,class MS> friend bool _mmseq(const M &m1,const MS &ms) throw();
491  template <class M,class MS> friend bool _mmsneq(const M &m1,const MS &ms) throw();
492  template <class M,class MS> friend bool _mmsless(const M &m1,const MS &ms) throw();
493  template <class M,class MS> friend bool _mmsleq(const M &m1,const MS &ms) throw();
494  template <class MS,class M> friend bool _msmless(const MS &ms,const M &m1) throw();
495  template <class MS,class M> friend bool _msmleq(const MS &ms,const M &m1) throw();
496  template <class M> friend std::ostream &_mout(std::ostream &s,const M &r) throw();
497  template <class M> friend std::istream &_min(std::istream &s,M &r) throw();
498 
499 #endif
500 
501  //-------------------------- Konstruktoren ----------------------------
502 
504  INLINE intmatrix(const intmatrix &rm) throw();
506  INLINE intmatrix(const intmatrix_slice &rm) throw();
508  INLINE intmatrix() throw();
510  explicit INLINE intmatrix(const int &m, const int &n)
511 #if(CXSC_INDEX_CHECK)
512  throw(ERROR_INTMATRIX_WRONG_BOUNDARIES);
513 #else
514  throw();
515 #endif
516  explicit INLINE intmatrix(const int &m1, const int &n1, const int &m2, const int &n2)
518 #if(CXSC_INDEX_CHECK)
519  throw(ERROR_INTMATRIX_WRONG_BOUNDARIES);
520 #else
521  throw();
522 #endif
523  explicit INLINE intmatrix(const intvector &v) throw();
526  explicit INLINE intmatrix(const intvector_slice &v) throw();
528  explicit INLINE intmatrix(const int &r) throw();
530  INLINE intmatrix &operator =(const int &r) throw();
532  INLINE intmatrix &operator =(const intmatrix &m) throw();
534  INLINE intmatrix &operator =(const intmatrix_slice &ms) throw();
536  INLINE intmatrix &operator =(const intvector &v) throw();
538  INLINE intmatrix &operator =(const intvector_slice &v) throw();
539 
540  //--------------------------- Destruktoren -----------------------------
541 
542  INLINE ~intmatrix() throw() { delete [] dat; }
543 
544  //------------------------- Standardfunktionen -------------------------
545 
546  friend INLINE intvector::intvector(const intmatrix &m)
547 #if(CXSC_INDEX_CHECK)
548  throw(ERROR_INTMATRIX_TYPE_CAST_OF_THICK_OBJ);
549 #else
550  throw();
551 #endif
552  INLINE intmatrix_subv operator [](const int &i) const
554 #if(CXSC_INDEX_CHECK)
555  throw(ERROR_INTMATRIX_ROW_OR_COL_NOT_IN_MAT);
556 #else
557  throw();
558 #endif
559  INLINE intmatrix_subv operator [](const cxscmatrix_column &i) const
561 #if(CXSC_INDEX_CHECK)
562  throw(ERROR_INTMATRIX_ROW_OR_COL_NOT_IN_MAT);
563 #else
564  throw();
565 #endif
566  INLINE intmatrix &operator ()() throw() { return *this; }
569  INLINE intmatrix_slice operator ()(const int &m, const int &n)
570 #if(CXSC_INDEX_CHECK)
571  throw(ERROR_INTMATRIX_SUB_ARRAY_TOO_BIG);
572 #else
573  throw();
574 #endif
575  INLINE intmatrix_slice operator ()(const int &m1, const int &m2, const int &n1, const int &n2)
577 #if(CXSC_INDEX_CHECK)
578  throw(ERROR_INTMATRIX_SUB_ARRAY_TOO_BIG);
579 #else
580  throw();
581 #endif
582  INLINE operator void*() throw();
583 //#else
584 //#endif
585 };
586 
588 
594 {
595  friend class intmatrix;
596  private:
597  int *dat;
598  int offset1,offset2,mxsize,mysize;
599  int start1,end1,start2,end2,sxsize,sysize; // slice size
600 
601  public:
602 //#if(CXSC_INDEX_CHECK)
603 #ifdef _CXSC_FRIEND_TPL
604  //----------------- Templates ---------------------------------------
605 template <class V,class MS,class S> friend void _vmsconstr(V &v,const MS &m)
606 #if(CXSC_INDEX_CHECK)
607  throw(ERROR__TYPE_CAST_OF_THICK_OBJ<MS>);
608 #else
609  throw();
610 #endif
611  template <class MS,class M> friend MS &_msmassign(MS &ms,const M &m)
612 #if(CXSC_INDEX_CHECK)
613  throw(ERROR__OP_WITH_WRONG_DIM<MS>);
614 #else
615  throw();
616 #endif
617  template <class MS1,class MS2> friend MS1 &_msmsassign(MS1 &ms1,const MS2 &ms)
618 #if(CXSC_INDEX_CHECK)
619  throw(ERROR__OP_WITH_WRONG_DIM<MS1>);
620 #else
621  throw();
622 #endif
623  template <class M,class MS2,class S> friend M &_mmsassign(M &m,const MS2 &ms) throw();
624  template <class MS,class S> friend MS &_mssassign(MS &ms,const S &r) throw();
625  template <class MS> friend int _mslb(const MS &ms, const int &i)
626 #if(CXSC_INDEX_CHECK)
627  throw(ERROR__WRONG_ROW_OR_COL<MS>);
628 #else
629  throw();
630 #endif
631  template <class MS> friend int _msub(const MS &ms, const int &i)
632 #if(CXSC_INDEX_CHECK)
633  throw(ERROR__WRONG_ROW_OR_COL<MS>);
634 #else
635  throw();
636 #endif
637  template <class MS,class E> friend E _msabs(const MS &ms) throw();
638  //------------ matrix-matrix --------------------
639  template <class MS,class E> friend E _msminus(const MS &ms) throw();
640  template <class M,class MS,class E> friend E _mmsplus(const M &m,const MS &ms)
641 #if(CXSC_INDEX_CHECK)
642  throw(ERROR__OP_WITH_WRONG_DIM<M>);
643 #else
644  throw();
645 #endif
646  template <class MS1,class MS2,class E> friend E _msmsplus(const MS1 &m1,const MS2 &m2)
647 #if(CXSC_INDEX_CHECK)
648  throw(ERROR__OP_WITH_WRONG_DIM<E>);
649 #else
650  throw();
651 #endif
652  template <class M,class MS> friend M &_mmsplusassign(M &m1,const MS &ms)
653 #if(CXSC_INDEX_CHECK)
654  throw(ERROR__OP_WITH_WRONG_DIM<M>);
655 #else
656  throw();
657 #endif
658  template <class MS,class M> friend MS &_msmplusassign(MS &ms,const M &m1)
659 #if(CXSC_INDEX_CHECK)
660  throw(ERROR__OP_WITH_WRONG_DIM<MS>);
661 #else
662  throw();
663 #endif
664  template <class MS1,class MS2> friend MS1 &_msmsplusassign(MS1 &ms1,const MS2 &ms2)
665 #if(CXSC_INDEX_CHECK)
666  throw(ERROR__OP_WITH_WRONG_DIM<MS1>);
667 #else
668  throw();
669 #endif
670  template <class M,class MS,class E> friend E _mmsminus(const M &m,const MS &ms)
671 #if(CXSC_INDEX_CHECK)
672  throw(ERROR__OP_WITH_WRONG_DIM<E>);
673 #else
674  throw();
675 #endif
676  template <class MS,class M,class E> friend E _msmminus(const MS &ms,const M &m)
677 #if(CXSC_INDEX_CHECK)
678  throw(ERROR__OP_WITH_WRONG_DIM<E>);
679 #else
680  throw();
681 #endif
682  template <class MS1,class MS2,class E> friend E _msmsminus(const MS1 &ms1,const MS2 &ms2)
683 #if(CXSC_INDEX_CHECK)
684  throw(ERROR__OP_WITH_WRONG_DIM<E>);
685 #else
686  throw();
687 #endif
688  template <class M,class MS> friend M &_mmsminusassign(M &m1,const MS &ms)
689 #if(CXSC_INDEX_CHECK)
690  throw(ERROR__OP_WITH_WRONG_DIM<M>);
691 #else
692  throw();
693 #endif
694  template <class MS,class M> friend MS &_msmminusassign(MS &ms,const M &m1)
695 #if(CXSC_INDEX_CHECK)
696  throw(ERROR__OP_WITH_WRONG_DIM<MS>);
697 #else
698  throw();
699 #endif
700  template <class MS1,class MS2> friend MS1 &_msmsminusassign(MS1 &ms1,const MS2 &ms2)
701 #if(CXSC_INDEX_CHECK)
702  throw(ERROR__OP_WITH_WRONG_DIM<MS1>);
703 #else
704  throw();
705 #endif
706  //--------- matrix-scalar -----------------
707  template <class S,class MS,class E> friend E _smsmult(const S &c, const MS &ms) throw();
708  template <class MS,class S> friend MS &_mssmultassign(MS &ms,const S &c) throw();
709  template <class MS,class S,class E> friend E _mssdiv(const MS &ms, const S &c) throw();
710  template <class MS,class S> friend MS &_mssdivassign(MS &ms,const S &c) throw();
711 
712  template <class MS> friend void *_msvoid(const MS &ms) throw();
713  template <class MS> friend bool _msnot(const MS &ms) throw();
714  template <class M,class MS> friend bool _mmseq(const M &m1,const MS &ms) throw();
715  template <class M,class MS> friend bool _mmsneq(const M &m1,const MS &ms) throw();
716  template <class M,class MS> friend bool _mmsless(const M &m1,const MS &ms) throw();
717  template <class M,class MS> friend bool _mmsleq(const M &m1,const MS &ms) throw();
718  template <class MS,class M> friend bool _msmless(const MS &ms,const M &m1) throw();
719  template <class MS,class M> friend bool _msmleq(const MS &ms,const M &m1) throw();
720  template <class MS1,class MS2> friend bool _msmseq(const MS1 &ms1,const MS2 &ms2) throw();
721  template <class MS1,class MS2> friend bool _msmsneq(const MS1 &ms1,const MS2 &ms2) throw();
722  template <class MS1,class MS2> friend bool _msmsless(const MS1 &ms1,const MS2 &ms2) throw();
723  template <class MS1,class MS2> friend bool _msmsleq(const MS1 &ms1,const MS2 &ms2) throw();
724  template <class MS> friend std::ostream &_msout(std::ostream &s,const MS &r) throw();
725  template <class MS> friend std::istream &_msin(std::istream &s,MS &r) throw();
726 
727 #endif
728 
729 
730  //--------------- Konstruktoren ----------------------------------------
731 
733  explicit INLINE intmatrix_slice(intmatrix &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) { }
735  explicit INLINE intmatrix_slice(intmatrix_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) { }
736  public:
738  INLINE intmatrix_slice(const intmatrix_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) { }
739  public:
740 
741  //---------------- Standardfunktionen -----------------------------------
742 
743  friend intvector::intvector(const intmatrix_slice &sl)
744 #if(CXSC_INDEX_CHECK)
745  throw(ERROR_INTMATRIX_TYPE_CAST_OF_THICK_OBJ);
746 #else
747  throw();
748 #endif
749  friend INLINE intmatrix::intmatrix(const intmatrix_slice &) throw();
751  INLINE intmatrix_slice &operator =(const intmatrix &m)
752 #if(CXSC_INDEX_CHECK)
753  throw(ERROR_INTMATRIX_OP_WITH_WRONG_DIM);
754 #else
755  throw();
756 #endif
757  INLINE intmatrix_slice &operator =(const intmatrix_slice &ms)
759 #if(CXSC_INDEX_CHECK)
760  throw(ERROR_INTMATRIX_OP_WITH_WRONG_DIM);
761 #else
762  throw();
763 #endif
764  INLINE intmatrix_slice &operator =(const int &r) throw();
767  INLINE intmatrix_slice &operator =(const intvector &v)
768 #if(CXSC_INDEX_CHECK)
769  throw(ERROR_INTMATRIX_OP_WITH_WRONG_DIM);
770 #else
771  throw();
772 #endif
773  INLINE intmatrix_slice &operator =(const intvector_slice &v)
775 #if(CXSC_INDEX_CHECK)
776  throw(ERROR_INTMATRIX_OP_WITH_WRONG_DIM);
777 #else
778  throw();
779 #endif
780  INLINE intmatrix_slice &operator =(const intmatrix_subv &v)
782 #if(CXSC_INDEX_CHECK)
783  throw(ERROR_INTMATRIX_OP_WITH_WRONG_DIM);
784 #else
785  throw();
786 #endif
787  INLINE intmatrix_subv operator [](const int &i)
789 #if(CXSC_INDEX_CHECK)
790  throw(ERROR_INTMATRIX_ROW_OR_COL_NOT_IN_MAT);
791 #else
792  throw();
793 #endif
794  INLINE intmatrix_subv operator [](const cxscmatrix_column &i)
796 #if(CXSC_INDEX_CHECK)
797  throw(ERROR_INTMATRIX_ROW_OR_COL_NOT_IN_MAT);
798 #else
799  throw();
800 #endif
801  INLINE intmatrix_slice &operator ()() throw() { return *this; }
804  INLINE intmatrix_slice operator ()(const int &m, const int &n)
805 #if(CXSC_INDEX_CHECK)
806  throw(ERROR_INTMATRIX_SUB_ARRAY_TOO_BIG);
807 #else
808  throw();
809 #endif
810  INLINE intmatrix_slice operator ()(const int &m1, const int &m2, const int &n1, const int &n2)
812 #if(CXSC_INDEX_CHECK)
813  throw(ERROR_INTMATRIX_SUB_ARRAY_TOO_BIG);
814 #else
815  throw();
816 #endif
817  INLINE intmatrix_slice& operator +=(const intmatrix &m1)
819 #if(CXSC_INDEX_CHECK)
820  throw(ERROR_INTMATRIX_OP_WITH_WRONG_DIM);
821 #else
822  throw();
823 #endif
824  INLINE intmatrix_slice& operator +=(const intmatrix_slice &ms2)
826 #if(CXSC_INDEX_CHECK)
827  throw(ERROR_INTMATRIX_OP_WITH_WRONG_DIM);
828 #else
829  throw();
830 #endif
831  INLINE intmatrix_slice& operator -=(const intmatrix &m1)
833 #if(CXSC_INDEX_CHECK)
834  throw(ERROR_INTMATRIX_OP_WITH_WRONG_DIM);
835 #else
836  throw();
837 #endif
838  INLINE intmatrix_slice& operator -=(const intmatrix_slice &ms2)
840 #if(CXSC_INDEX_CHECK)
841  throw(ERROR_INTMATRIX_OP_WITH_WRONG_DIM);
842 #else
843  throw();
844 #endif
845  INLINE intmatrix_slice& operator *=(const int &c) throw();
848  INLINE intmatrix_slice& operator /=(const int &c) throw();
849  INLINE operator void*() throw();
850 //#else
851 //#endif
852 };
853 
854 //================================================================
855 //====================== Subvector Functions =====================
856 
857 //=======================Vector / Scalar =========================
858 
860  INLINE intvector operator /(const intmatrix_subv &rv, const int &s) throw();
862  INLINE intvector operator *(const intmatrix_subv &rv, const int &s) throw();
864  INLINE intvector operator *(const int &s, const intmatrix_subv &rv) throw();
866  INLINE intvector abs(const intmatrix_subv &mv) throw();
867 
868 //======================== Vector / Vector ========================
869 
871  INLINE void accumulate(dotprecision &dp, const intmatrix_subv & rv1, const intmatrix_subv &rv2)
872 #if(CXSC_INDEX_CHECK)
873  throw(OP_WITH_WRONG_DIM);
874 #else
875  throw();
876 #endif
877  INLINE void accumulate(dotprecision &dp, const intvector & rv1, const intmatrix_subv &rv2)
879 #if(CXSC_INDEX_CHECK)
880  throw(OP_WITH_WRONG_DIM);
881 #else
882  throw();
883 #endif
884  INLINE void accumulate(dotprecision &dp, const intmatrix_subv & rv1, const intvector &rv2)
886 #if(CXSC_INDEX_CHECK)
887  throw(OP_WITH_WRONG_DIM);
888 #else
889  throw();
890 #endif
891  INLINE void accumulate(dotprecision &dp,const intvector_slice &sl,const intmatrix_subv &sv)
893 #if(CXSC_INDEX_CHECK)
894  throw(OP_WITH_WRONG_DIM);
895 #else
896  throw();
897 #endif
898  INLINE void accumulate(dotprecision &dp,const intmatrix_subv &mv,const intvector_slice &vs)
900 #if(CXSC_INDEX_CHECK)
901  throw(OP_WITH_WRONG_DIM);
902 #else
903  throw();
904 #endif
905 
907  INLINE intvector operator +(const intmatrix_subv & rv1, const intmatrix_subv &rv2)
908 #if(CXSC_INDEX_CHECK)
909  throw(ERROR_INTVECTOR_OP_WITH_WRONG_DIM);
910 #else
911  throw();
912 #endif
913  INLINE intvector operator +(const intmatrix_subv &rv1,const intvector &rv2)
915 #if(CXSC_INDEX_CHECK)
916  throw(ERROR_INTVECTOR_OP_WITH_WRONG_DIM);
917 #else
918  throw();
919 #endif
920  INLINE intvector operator +(const intvector & rv1, const intmatrix_subv &rv2)
922 #if(CXSC_INDEX_CHECK)
923  throw(ERROR_INTVECTOR_OP_WITH_WRONG_DIM);
924 #else
925  throw();
926 #endif
927  INLINE intvector operator +(const intvector_slice &sl,const intmatrix_subv &mv)
929 #if(CXSC_INDEX_CHECK)
930  throw(ERROR_INTVECTOR_OP_WITH_WRONG_DIM);
931 #else
932  throw();
933 #endif
934  INLINE intvector operator +(const intmatrix_subv &mv,const intvector_slice &sl)
936 #if(CXSC_INDEX_CHECK)
937  throw(ERROR_INTVECTOR_OP_WITH_WRONG_DIM);
938 #else
939  throw();
940 #endif
941 
943  INLINE intvector operator -(const intmatrix_subv & rv1, const intmatrix_subv &rv2)
944 #if(CXSC_INDEX_CHECK)
945  throw(ERROR_INTVECTOR_OP_WITH_WRONG_DIM);
946 #else
947  throw();
948 #endif
949  INLINE intvector operator -(const intvector & rv1, const intmatrix_subv &rv2)
951 #if(CXSC_INDEX_CHECK)
952  throw(ERROR_INTVECTOR_OP_WITH_WRONG_DIM);
953 #else
954  throw();
955 #endif
956  INLINE intvector operator -(const intmatrix_subv &rv1,const intvector &rv2)
958 #if(CXSC_INDEX_CHECK)
959  throw(ERROR_INTVECTOR_OP_WITH_WRONG_DIM);
960 #else
961  throw();
962 #endif
963  INLINE intvector operator -(const intvector_slice &sl,const intmatrix_subv &mv)
965 #if(CXSC_INDEX_CHECK)
966  throw(ERROR_INTVECTOR_OP_WITH_WRONG_DIM);
967 #else
968  throw();
969 #endif
970  INLINE intvector operator -(const intmatrix_subv &mv,const intvector_slice &sl)
972 #if(CXSC_INDEX_CHECK)
973  throw(ERROR_INTVECTOR_OP_WITH_WRONG_DIM);
974 #else
975  throw();
976 #endif
977 
978 //====================================================================
979 //===================== Matrix Functions =============================
980 
982  INLINE intmatrix _intmatrix(const intmatrix &rm) throw();
984  INLINE intmatrix _intmatrix(const intvector &v) throw();
986  INLINE intmatrix _intmatrix(const intvector_slice &v) throw();
988  INLINE intmatrix _intmatrix(const int &r) throw();
989 
991  INLINE int Lb(const intmatrix &rm, const int &i)
992 #if(CXSC_INDEX_CHECK)
993  throw(ERROR_INTMATRIX_WRONG_ROW_OR_COL);
994 #else
995  throw();
996 #endif
997  INLINE int Ub(const intmatrix &rm, const int &i)
999 #if(CXSC_INDEX_CHECK)
1000  throw(ERROR_INTMATRIX_WRONG_ROW_OR_COL);
1001 #else
1002  throw();
1003 #endif
1004  INLINE int Lb(const intmatrix_slice &rm, const int &i)
1006 #if(CXSC_INDEX_CHECK)
1007  throw(ERROR_INTMATRIX_WRONG_ROW_OR_COL);
1008 #else
1009  throw();
1010 #endif
1011  INLINE int Ub(const intmatrix_slice &rm, const int &i)
1013 #if(CXSC_INDEX_CHECK)
1014  throw(ERROR_INTMATRIX_WRONG_ROW_OR_COL);
1015 #else
1016  throw();
1017 #endif
1018  INLINE intmatrix &SetLb(intmatrix &m, const int &i,const int &j)
1020 #if(CXSC_INDEX_CHECK)
1021  throw(ERROR_INTMATRIX_WRONG_ROW_OR_COL);
1022 #else
1023  throw();
1024 #endif
1025  INLINE intmatrix &SetUb(intmatrix &m, const int &i,const int &j)
1027 #if(CXSC_INDEX_CHECK)
1028  throw(ERROR_INTMATRIX_WRONG_ROW_OR_COL);
1029 #else
1030  throw();
1031 #endif
1032  INLINE void Resize(intmatrix &A) throw();
1035  INLINE void Resize(intmatrix &A,const int &m, const int &n)
1036 #if(CXSC_INDEX_CHECK)
1037  throw(ERROR_INTMATRIX_WRONG_BOUNDARIES);
1038 #else
1039  throw();
1040 #endif
1041  INLINE void Resize(intmatrix &A,const int &m1, const int &m2,const int &n1,const int &n2)
1043 #if(CXSC_INDEX_CHECK)
1044  throw(ERROR_INTMATRIX_WRONG_BOUNDARIES);
1045 #else
1046  throw();
1047 #endif
1048 
1050  INLINE intmatrix abs(const intmatrix &m) throw();
1052  INLINE intmatrix abs(const intmatrix_slice &ms) throw();
1053 
1054 //===================== Matrix / Scalar ===============================
1055 
1057  INLINE intmatrix operator *(const int &c, const intmatrix &m) throw();
1059  INLINE intmatrix operator *(const int &c, const intmatrix_slice &ms) throw();
1061  INLINE intmatrix operator *(const intmatrix &m,const int &c) throw();
1063  INLINE intmatrix operator *(const intmatrix_slice &ms,const int &c) throw();
1065  INLINE intmatrix &operator *=(intmatrix &m,const int &c) throw();
1067  INLINE intmatrix operator /(const intmatrix &m,const int &c) throw();
1069  INLINE intmatrix operator /(const intmatrix_slice &ms, const int &c) throw();
1071  INLINE intmatrix &operator /=(intmatrix &m,const int &c) throw();
1072 
1073 
1074 //================ Matrix / Matrix ============================
1075 
1077  INLINE const intmatrix &operator +(const intmatrix &m1) throw();
1079  INLINE intmatrix operator +(const intmatrix_slice &ms) throw();
1081  INLINE intmatrix operator +(const intmatrix &m1,const intmatrix &m2)
1082 #if(CXSC_INDEX_CHECK)
1083  throw(ERROR_INTMATRIX_OP_WITH_WRONG_DIM);
1084 #else
1085  throw();
1086 #endif
1087  INLINE intmatrix operator +(const intmatrix &m,const intmatrix_slice &ms)
1089 #if(CXSC_INDEX_CHECK)
1090  throw(ERROR_INTMATRIX_OP_WITH_WRONG_DIM);
1091 #else
1092  throw();
1093 #endif
1094  INLINE intmatrix operator +(const intmatrix_slice &ms,const intmatrix &m)
1096 #if(CXSC_INDEX_CHECK)
1097  throw(ERROR_INTMATRIX_OP_WITH_WRONG_DIM);
1098 #else
1099  throw();
1100 #endif
1101  INLINE intmatrix operator +(const intmatrix_slice &m1,const intmatrix_slice &m2)
1103 #if(CXSC_INDEX_CHECK)
1104  throw(ERROR_INTMATRIX_OP_WITH_WRONG_DIM);
1105 #else
1106  throw();
1107 #endif
1108  INLINE intmatrix &operator +=(intmatrix &m1,const intmatrix &m2)
1110 #if(CXSC_INDEX_CHECK)
1111  throw(ERROR_INTMATRIX_OP_WITH_WRONG_DIM);
1112 #else
1113  throw();
1114 #endif
1115  INLINE intmatrix &operator +=(intmatrix &m1,const intmatrix_slice &ms)
1117 #if(CXSC_INDEX_CHECK)
1118  throw(ERROR_INTMATRIX_OP_WITH_WRONG_DIM);
1119 #else
1120  throw();
1121 #endif
1122 
1124  INLINE intmatrix operator -(const intmatrix &m) throw();
1126  INLINE intmatrix operator -(const intmatrix_slice &ms) throw();
1128  INLINE intmatrix operator -(const intmatrix &m1,const intmatrix &m2)
1129 #if(CXSC_INDEX_CHECK)
1130  throw(ERROR_INTMATRIX_OP_WITH_WRONG_DIM);
1131 #else
1132  throw();
1133 #endif
1134  INLINE intmatrix operator -(const intmatrix &m,const intmatrix_slice &ms)
1136 #if(CXSC_INDEX_CHECK)
1137  throw(ERROR_INTMATRIX_OP_WITH_WRONG_DIM);
1138 #else
1139  throw();
1140 #endif
1141  INLINE intmatrix operator -(const intmatrix_slice &ms,const intmatrix &m)
1143 #if(CXSC_INDEX_CHECK)
1144  throw(ERROR_INTMATRIX_OP_WITH_WRONG_DIM);
1145 #else
1146  throw();
1147 #endif
1148  INLINE intmatrix operator -(const intmatrix_slice &ms1,const intmatrix_slice &ms2)
1150 #if(CXSC_INDEX_CHECK)
1151  throw(ERROR_INTMATRIX_OP_WITH_WRONG_DIM);
1152 #else
1153  throw();
1154 #endif
1155  INLINE intmatrix &operator -=(intmatrix &m1,const intmatrix &m2)
1157 #if(CXSC_INDEX_CHECK)
1158  throw(ERROR_INTMATRIX_OP_WITH_WRONG_DIM);
1159 #else
1160  throw();
1161 #endif
1162  INLINE intmatrix &operator -=(intmatrix &m1,const intmatrix_slice &ms)
1164 #if(CXSC_INDEX_CHECK)
1165  throw(ERROR_INTMATRIX_OP_WITH_WRONG_DIM);
1166 #else
1167  throw();
1168 #endif
1169 
1170 
1171 //============== Compare Operator ==========================
1172 
1173 //-------------- Matrix - Matrix -------------------------
1174 
1176  INLINE bool operator ==(const intmatrix &m1,const intmatrix &m2) throw();
1178  INLINE bool operator !=(const intmatrix &m1,const intmatrix &m2) throw();
1180  INLINE bool operator <(const intmatrix &m1,const intmatrix &m2) throw();
1182  INLINE bool operator <=(const intmatrix &m1,const intmatrix &m2) throw();
1184  INLINE bool operator >(const intmatrix &m1,const intmatrix &m2) throw();
1186  INLINE bool operator >=(const intmatrix &m1,const intmatrix &m2) throw();
1188  INLINE bool operator ==(const intmatrix &m1,const intmatrix_slice &ms) throw();
1190  INLINE bool operator !=(const intmatrix &m1,const intmatrix_slice &ms) throw();
1192  INLINE bool operator <(const intmatrix &m1,const intmatrix_slice &ms) throw();
1194  INLINE bool operator <=(const intmatrix &m1,const intmatrix_slice &ms) throw();
1196  INLINE bool operator >(const intmatrix &m1,const intmatrix_slice &ms) throw();
1198  INLINE bool operator >=(const intmatrix &m1,const intmatrix_slice &ms) throw();
1199 
1200 //---------------- Matrix - Matrix_slice ----------------------
1201 
1203  INLINE bool operator ==(const intmatrix_slice &m1,const intmatrix_slice &m2) throw();
1205  INLINE bool operator !=(const intmatrix_slice &m1,const intmatrix_slice &m2) throw();
1207  INLINE bool operator <(const intmatrix_slice &m1,const intmatrix_slice &m2) throw();
1209  INLINE bool operator <=(const intmatrix_slice &m1,const intmatrix_slice &m2) throw();
1211  INLINE bool operator >(const intmatrix_slice &m1,const intmatrix_slice &m2) throw();
1213  INLINE bool operator >=(const intmatrix_slice &m1,const intmatrix_slice &m2) throw();
1214 
1215 //=================== Not Operator =============================
1216 
1218  INLINE bool operator !(const intmatrix &ms) throw();
1220  INLINE bool operator !(const intmatrix_slice &ms) throw();
1221 
1222 //======================== Input / Output ========================
1223 
1225  INLINE std::ostream &operator <<(std::ostream &s,const intmatrix &r) throw();
1227  INLINE std::ostream &operator <<(std::ostream &s,const intmatrix_slice &r) throw();
1229  INLINE std::istream &operator >>(std::istream &s,intmatrix &r) throw();
1231  INLINE std::istream &operator >>(std::istream &s,intmatrix_slice &r) throw();
1232 
1234  INLINE int RowLen ( const intmatrix& );
1236  INLINE int ColLen ( const intmatrix& );
1239  INLINE int RowLen ( const intmatrix_slice& );
1241  INLINE int ColLen ( const intmatrix_slice& );
1243  intmatrix Id ( const intmatrix& );
1245  intmatrix transp ( const intmatrix& );
1247  void DoubleSize ( intmatrix& );
1248 
1249 //=================== Permutation matrix/vector functions =======================
1250 
1251  INLINE intvector permvec(const intmatrix&);
1252  INLINE intmatrix permmat(const intvector&);
1253  INLINE intmatrix perminv(const intmatrix&);
1254 
1255 } // namespace cxsc
1256 
1257 #ifdef _CXSC_INCL_INL
1258 # include "matrix.inl"
1259 # include "intmatrix.inl"
1260 #endif
1261 
1262 #endif
1263 
intmatrix & operator=(const int &r)
Implementation of standard assigning operator.
Definition: intmatrix.inl:312
cimatrix & operator/=(cimatrix &m, const cinterval &c)
Implementation of division and allocation operation.
Definition: cimatrix.inl:1623
friend int Lb(const intmatrix_subv &rv)
Returns the lower bound of the vector.
Definition: intmatrix.hpp:221
The Data Type intmatrix.
Definition: intmatrix.hpp:313
friend intmatrix_subv Col(intmatrix &m, const int &i)
Returns one column of the matrix as a vector.
Definition: intmatrix.inl:133
intmatrix_slice & operator-=(const intmatrix &m1)
Implementation of subtraction and allocation operation.
Definition: intmatrix.inl:367
intmatrix_slice(const intmatrix_slice &ms)
Constructor of class intmatrix_slice.
Definition: intmatrix.hpp:738
int Lb(const cimatrix &rm, const int &i)
Returns the lower bound index.
Definition: cimatrix.inl:1156
The namespace cxsc, providing all functionality of the class library C-XSC.
Definition: cdot.cpp:29
intmatrix_slice & operator*=(const int &c)
Implementation of multiplication and allocation operation.
Definition: intmatrix.inl:381
civector operator*(const cimatrix_subv &rv, const cinterval &s)
Implementation of multiplication operation.
Definition: cimatrix.inl:731
intmatrix_subv & operator+=(const int &c)
Implementation of addition and allocation operation.
Definition: intmatrix.inl:388
The Data Type intmatrix_subv.
Definition: intmatrix.hpp:45
friend int Ub(const intmatrix_subv &rv)
Returns the upper bound of the vector.
Definition: intmatrix.hpp:223
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
intmatrix & operator()()
Operator for accessing the whole matrix.
Definition: intmatrix.hpp:567
friend intmatrix_subv Row(intmatrix &m, const int &i)
Returns one row of the matrix as a vector.
Definition: intmatrix.inl:122
intmatrix()
Constructor of class intmatrix.
Definition: intmatrix.inl:31
void DoubleSize(cimatrix &A)
Doubles the size of the matrix.
Definition: cimatrix.cpp:83
intmatrix_subv(int *d, const int &l, const int &u, const int &s, const int &st, const int &o)
Constructor of class intmatrix_subv.
Definition: intmatrix.hpp:179
intmatrix_slice(intmatrix_slice &a, const int &l1, const int &u1, const int &l2, const int &u2)
Constructor of class intmatrix_slice.
Definition: intmatrix.hpp:735
intmatrix_slice & operator=(const intmatrix &m)
Implementation of standard assigning operator.
Definition: intmatrix.inl:317
cimatrix Id(const cimatrix &A)
Returns the Identity matrix.
Definition: cimatrix.cpp:61
cimatrix & SetUb(cimatrix &m, const int &i, const int &j)
Sets the upper bound index.
Definition: cimatrix.inl:1191
intmatrix_subv & operator*=(const int &c)
Implementation of multiplication and allocation operation.
Definition: intmatrix.inl:387
intmatrix _intmatrix(const intmatrix &rm)
Deprecated typecast, which only exist for the reason of compatibility with older versions of C-XSC.
Definition: intmatrix.inl:533
void Resize(cimatrix &A)
Resizes the matrix.
Definition: cimatrix.inl:1211
intmatrix_slice & operator()()
Operator for accessing the whole matrix.
Definition: intmatrix.hpp:802
int ColLen(const cimatrix &)
Returns the column dimension.
Definition: cimatrix.inl:1202
The Data Type intvector_slice.
Definition: intvector.hpp:422
intmatrix_subv operator[](const int &i) const
Operator for accessing a single row of the matrix.
Definition: intmatrix.inl:166
cimatrix_subv Row(cimatrix &m, const int &i)
Returns one row of the matrix as a vector.
Definition: cimatrix.inl:231
intmatrix_subv operator[](const int &i)
Operator for accessing a single row of the matrix.
Definition: intmatrix.inl:218
The Data Type intmatrix_slice.
Definition: intmatrix.hpp:593
int RowLen(const cimatrix &)
Returns the row dimension.
Definition: cimatrix.inl:1199
int & operator[](const int &i) const
Operator for accessing the single elements of the vector.
Definition: intmatrix.inl:95
intmatrix_slice & operator/=(const int &c)
Implementation of division and allocation operation.
Definition: intmatrix.inl:382
cdotprecision & operator+=(cdotprecision &cd, const l_complex &lc)
Implementation of standard algebraic addition and allocation operation.
Definition: cdot.inl:251
intmatrix_subv & operator()()
Operator for accessing the whole vector.
Definition: intmatrix.hpp:232
intvector()
Constructor of class intvector.
Definition: intvector.inl:33
intmatrix_subv & operator-=(const int &c)
Implementation of subtraction and allocation operation.
Definition: intmatrix.inl:389
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
cimatrix transp(const cimatrix &A)
Returns the transposed matrix.
Definition: cimatrix.cpp:74
intmatrix_slice(intmatrix &a, const int &l1, const int &u1, const int &l2, const int &u2)
Constructor of class intmatrix_slice.
Definition: intmatrix.hpp:733
intmatrix_subv & operator/=(const int &c)
Implementation of division and allocation operation.
Definition: intmatrix.inl:390
cimatrix & operator*=(cimatrix &m, const cinterval &c)
Implementation of multiplication and allocation operation.
Definition: cimatrix.inl:1605
intmatrix_slice & operator+=(const intmatrix &m1)
Implementation of addition and allocation operation.
Definition: intmatrix.inl:353
intmatrix_subv(const intmatrix_subv &v)
Constructor of class intmatrix_subv.
Definition: intmatrix.hpp:182
The Data Type intvector.
Definition: intvector.hpp:51
intmatrix_subv & operator=(const intmatrix_subv &rv)
Implementation of standard assigning operator.
Definition: intmatrix.inl:296
ivector abs(const cimatrix_subv &mv)
Returns the absolute value of the matrix.
Definition: cimatrix.inl:737