C-XSC - A C++ Class Library for Extended Scientific Computing 2.5.4
imatrix.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: imatrix.inl,v 1.30 2014/01/30 17:23:45 cxsc Exp $ */
25
26#ifndef _CXSC_IMATRIX_INL_INCLUDED
27#define _CXSC_IMATRIX_INL_INCLUDED
28
29namespace cxsc {
30
31INLINE imatrix::imatrix() noexcept:dat(NULL),lb1(1),ub1(0),lb2(1),ub2(0),xsize(0),ysize(0)
32{
33}
34
35INLINE imatrix::imatrix(const interval &r) noexcept:lb1(1),ub1(1),lb2(1),ub2(1),xsize(1),ysize(1)
36{
37 dat=new interval[1];
38 *dat=r;
39}
40
41INLINE imatrix::imatrix(const real &r) noexcept:lb1(1),ub1(1),lb2(1),ub2(1),xsize(1),ysize(1)
42{
43 dat=new interval[1];
44 *dat=r;
45}
46
47INLINE imatrix::imatrix(const imatrix &rm) noexcept:lb1(rm.lb1),ub1(rm.ub1),lb2(rm.lb2),ub2(rm.ub2),xsize(rm.xsize),ysize(rm.ysize)
48{
49 dat=new interval[xsize*ysize];
50 for(int i=0;i<xsize*ysize;i++)
51 dat[i]=rm.dat[i];
52}
53
54INLINE imatrix::imatrix(const rmatrix &rm) noexcept:lb1(rm.lb1),ub1(rm.ub1),lb2(rm.lb2),ub2(rm.ub2),xsize(rm.xsize),ysize(rm.ysize)
55{
56 dat=new interval[xsize*ysize];
57 for(int i=0;i<xsize*ysize;i++)
58 dat[i]=rm.dat[i];
59}
60
61INLINE imatrix::imatrix(const int &m, const int &n)
62#if(CXSC_INDEX_CHECK)
63:lb1(1),ub1(m),lb2(1),ub2(n),xsize(n),ysize(m)
64#else
65 noexcept: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_IMATRIX_WRONG_BOUNDARIES("imatrix::imatrix(const int &m, const int &n)"));
70#endif
71 dat=new interval[m*n];
72}
73
74INLINE imatrix::imatrix(const int &m1, const int &m2, const int &n1, const int &n2)
75#if(CXSC_INDEX_CHECK)
76:lb1(m1),ub1(m2),lb2(n1),ub2(n2),xsize(n2-n1+1),ysize(m2-m1+1)
77#else
78 noexcept: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_IMATRIX_WRONG_BOUNDARIES("imatrix::imatrix(const int &m1, const int &n1, const int &m2, const int &n2)"));
83#endif
84 dat=new interval[xsize*ysize];
85}
86
87INLINE ivector::ivector(const imatrix_subv &v) noexcept:l(v.lb),u(v.ub),size(v.size)
88{
89 dat=new interval[size];
90 for (int i=0, j=v.start;i<v.size;i++,j+=v.offset)
91 dat[i]=v.dat[j];
92}
93
94INLINE imatrix::imatrix(const ivector &v) noexcept:lb1(v.l),ub1(v.u),lb2(1),ub2(1),xsize(1),ysize(v.size)
95{
96 dat=new interval[v.size];
97 for(int i=0;i<v.size;i++)
98 dat[i]=v.dat[i];
99}
100
101INLINE imatrix::imatrix(const rvector &v) noexcept:lb1(v.l),ub1(v.u),lb2(1),ub2(1),xsize(1),ysize(v.size)
102{
103 dat=new interval[v.size];
104 for(int i=0;i<v.size;i++)
105 dat[i]=v.dat[i];
106}
107
108INLINE imatrix::imatrix(const ivector_slice &v) noexcept:lb1(v.start),ub1(v.end),lb2(1),ub2(1),xsize(1),ysize(v.size)
109{
110 dat=new interval[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
115INLINE imatrix::imatrix(const rvector_slice &v) noexcept:lb1(v.start),ub1(v.end),lb2(1),ub2(1),xsize(1),ysize(v.size)
116{
117 dat=new interval[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
124 INLINE imatrix::imatrix(const imatrix_slice &sl) noexcept:lb1(sl.start1),ub1(sl.end1),lb2(sl.start2),ub2(sl.end2),xsize(sl.sxsize),ysize(sl.sysize)
125 {
126 int i,j;
127
128 dat=new interval[xsize*ysize];
129 for (i=0;i<ysize;i++)
130 {
131 for(j=0;j<xsize;j++)
132 {
133 dat[i*xsize+j]=sl.dat[(sl.offset1+i)*sl.mxsize+sl.offset2+j];
134 }
135 }
136 }
137
138 INLINE imatrix::imatrix(const rmatrix_slice &sl) noexcept:lb1(sl.start1),ub1(sl.end1),lb2(sl.start2),ub2(sl.end2),xsize(sl.sxsize),ysize(sl.sysize)
139 {
140 int i,j;
141
142 dat=new interval[xsize*ysize];
143 for (i=0;i<ysize;i++)
144 {
145 for(j=0;j<xsize;j++)
146 {
147 dat[i*xsize+j]=sl.dat[(sl.offset1+i)*sl.mxsize+sl.offset2+j];
148 }
149 }
150 }
151
152 INLINE imatrix_subv Row(imatrix &m,const int &i)
153#if(CXSC_INDEX_CHECK)
154
155#else
156 noexcept
157#endif
158
159 {
160 return m[i];
161 }
162
163 INLINE imatrix_subv Col(imatrix &m,const int &i)
164#if(CXSC_INDEX_CHECK)
165
166#else
167 noexcept
168#endif
169
170 {
171 return m[Col(i)];
172 }
173
174 INLINE imatrix_subv Row(const imatrix &m,const int &i)
175#if(CXSC_INDEX_CHECK)
176
177#else
178 noexcept
179#endif
180
181 {
182 return m[i];
183 }
184
185 INLINE imatrix_subv Col(const imatrix &m,const int &i)
186#if(CXSC_INDEX_CHECK)
187
188#else
189 noexcept
190#endif
191
192 {
193 return m[Col(i)];
194 }
195
196 INLINE interval& imatrix_subv::operator [](const int &i) const
197#if(CXSC_INDEX_CHECK)
198
199#else
200 noexcept
201#endif
202 {
203#if(CXSC_INDEX_CHECK)
204 if((i<lb)||(i>ub)) cxscthrow(ERROR_IVECTOR_ELEMENT_NOT_IN_VEC("interval &imatrix_subv::operator [](const int &i) const"));
205#endif
206 return dat[start+((i-lb)*offset)];
207 }
208
210#if(CXSC_INDEX_CHECK)
211
212#else
213 noexcept
214#endif
215 {
216#if(CXSC_INDEX_CHECK)
217 if((i<lb)||(i>ub)) cxscthrow(ERROR_IVECTOR_ELEMENT_NOT_IN_VEC("interval &imatrix_subv::operator [](const int &i)"));
218#endif
219 return dat[start+((i-lb)*offset)];
220 }
221
222
223 INLINE imatrix_subv imatrix::operator [](const int &i) const
224#if(CXSC_INDEX_CHECK)
225
226#else
227 noexcept
228#endif
229 {
230#if(CXSC_INDEX_CHECK)
231 if((i<lb1)||(i>ub1)) cxscthrow(ERROR_IMATRIX_ROW_OR_COL_NOT_IN_MAT("imatrix_subv imatrix::operator [](const int &i)"));
232#endif
233 return imatrix_subv(dat, lb2, ub2, xsize, xsize*(i-lb1),1);
234 }
235
236 INLINE imatrix_subv imatrix::operator [](const cxscmatrix_column &i) const
237#if(CXSC_INDEX_CHECK)
238
239#else
240 noexcept
241#endif
242 {
243#if(CXSC_INDEX_CHECK)
244 if((i.col()<lb2)||(i.col()>ub2)) cxscthrow(ERROR_IMATRIX_ROW_OR_COL_NOT_IN_MAT("imatrix_subv imatrix::operator [](const cxscmatrix_column &i)"));
245#endif
246 return imatrix_subv(dat, lb1, ub1, ysize, i.col()-lb2, xsize);
247 }
248
249 INLINE imatrix_slice imatrix::operator ()(const int &m, const int &n)
250#if(CXSC_INDEX_CHECK)
251
252#else
253 noexcept
254#endif
255 {
256#if(CXSC_INDEX_CHECK)
257 if((m<1)||(n<1)||(m<lb1)||(n<lb2)||(m>ub1)||(n>ub2)) cxscthrow(ERROR_IMATRIX_SUB_ARRAY_TOO_BIG("imatrix_slice imatrix::operator ()(const int &m, const int &n)"));
258#endif
259 return imatrix_slice(*this,1,m,1,n);
260 }
261
262 INLINE imatrix_slice imatrix::operator ()(const int &m1, const int &m2, const int &n1, const int &n2)
263#if(CXSC_INDEX_CHECK)
264
265#else
266 noexcept
267#endif
268 {
269#if(CXSC_INDEX_CHECK)
270 if((m1<lb1)||(n1<lb2)||(m2>ub1)||(n2>ub2)) cxscthrow(ERROR_IMATRIX_SUB_ARRAY_TOO_BIG("imatrix_slice imatrix::operator ()(const int &m1, const int &n1, const int &m2, const int &n2)"));
271#endif
272 return imatrix_slice(*this,m1,m2,n1,n2);
273 }
274
276#if(CXSC_INDEX_CHECK)
277
278#else
279 noexcept
280#endif
281 {
282#if(CXSC_INDEX_CHECK)
283 if((i<start1)||(i>end1)) cxscthrow(ERROR_IMATRIX_ROW_OR_COL_NOT_IN_MAT("imatrix_subv imatrix_slice::operator [](const int &i)"));
284#endif
285 return imatrix_subv(dat, start2, end2, sxsize, mxsize*(i-start1+offset1)+offset2,1);
286 }
287
288 INLINE imatrix_subv imatrix_slice::operator [](const cxscmatrix_column &i)
289#if(CXSC_INDEX_CHECK)
290
291#else
292 noexcept
293#endif
294 {
295#if(CXSC_INDEX_CHECK)
296 if((i.col()<start2)||(i.col()>end2)) cxscthrow(ERROR_IMATRIX_ROW_OR_COL_NOT_IN_MAT("imatrix_subv imatrix_slice::operator [](const cxscmatrix_column &i)"));
297#endif
298 return imatrix_subv(dat, start1, end1, sysize, offset1*mxsize+i.col()-start2+offset2, mxsize);
299 }
300
301 INLINE imatrix_subv imatrix_slice::operator [](const int &i) const
302#if(CXSC_INDEX_CHECK)
303
304#else
305 noexcept
306#endif
307 {
308#if(CXSC_INDEX_CHECK)
309 if((i<start1)||(i>end1)) cxscthrow(ERROR_IMATRIX_ROW_OR_COL_NOT_IN_MAT("imatrix_subv imatrix_slice::operator [](const int &i)"));
310#endif
311 return imatrix_subv(dat, start2, end2, sxsize, mxsize*(i-start1+offset1)+offset2,1);
312 }
313
314 INLINE imatrix_subv imatrix_slice::operator [](const cxscmatrix_column &i) const
315#if(CXSC_INDEX_CHECK)
316
317#else
318 noexcept
319#endif
320 {
321#if(CXSC_INDEX_CHECK)
322 if((i.col()<start2)||(i.col()>end2)) cxscthrow(ERROR_IMATRIX_ROW_OR_COL_NOT_IN_MAT("imatrix_subv imatrix_slice::operator [](const cxscmatrix_column &i)"));
323#endif
324 return imatrix_subv(dat, start1, end1, sysize, offset1*mxsize+i.col()-start2+offset2, mxsize);
325 }
326
327
328 INLINE imatrix_slice imatrix_slice::operator ()(const int &m, const int &n)
329#if(CXSC_INDEX_CHECK)
330
331#else
332 noexcept
333#endif
334 {
335#if(CXSC_INDEX_CHECK)
336 if((m<1)||(n<1)||(m<start1)||(n<start2)||(m>end1)||(n>end2)) cxscthrow(ERROR_IMATRIX_SUB_ARRAY_TOO_BIG("imatrix_slice imatrix_slice::operator ()(const int &m, const int &n)"));
337#endif
338 return imatrix_slice(*this,1,m,1,n);
339 }
340
341 INLINE imatrix_slice imatrix_slice::operator ()(const int &m1, const int &m2, const int &n1, const int &n2)
342#if(CXSC_INDEX_CHECK)
343
344#else
345 noexcept
346#endif
347 {
348#if(CXSC_INDEX_CHECK)
349 if((m1<start1)||(n1<start2)||(m2>end1)||(n2>end2)) cxscthrow(ERROR_IMATRIX_SUB_ARRAY_TOO_BIG("imatrix_slice imatrix_slice::operator ()(const int &m1, const int &m2, const int &n1, const int &n2)"));
350#endif
351 return imatrix_slice(*this,m1,m2,n1,n2);
352 }
353
355#if(CXSC_INDEX_CHECK)
356
357#else
358 noexcept
359#endif
360{
361#if(CXSC_INDEX_CHECK)
362 if(1<lb||i>ub) cxscthrow(ERROR_IVECTOR_SUB_ARRAY_TOO_BIG("imatrix_subv imatrix_subv::operator ()(const int &i)"));
363#endif
364 return imatrix_subv(dat,1,i,i,start+(1-lb)*offset,offset);
365}
366
367INLINE imatrix_subv imatrix_subv::operator ()(const int &i1,const int &i2)
368#if(CXSC_INDEX_CHECK)
369
370#else
371 noexcept
372#endif
373{
374#if(CXSC_INDEX_CHECK)
375 if(i1<lb||i2>ub) cxscthrow(ERROR_IVECTOR_SUB_ARRAY_TOO_BIG("imatrix_subv imatrix_subv::operator ()(const int &i1,const int &i2)"));
376#endif
377 return imatrix_subv(dat,i1,i2,i2-i1+1,start+(i1-lb)*offset,offset);
378}
379
380 INLINE imatrix_subv &imatrix_subv::operator =(const imatrix_subv &rv) noexcept { return _mvmvassign(*this,rv); }
381 INLINE imatrix_subv &imatrix_subv::operator =(const interval &r) noexcept { return _mvsassign(*this,r); }
383#if(CXSC_INDEX_CHECK)
384
385#else
386 noexcept
387#endif
388 { return _mvvassign(*this,v); }
390#if(CXSC_INDEX_CHECK)
391
392#else
393 noexcept
394#endif
395 { return _mvvassign(*this,ivector(v)); }
396 INLINE imatrix_subv &imatrix_subv::operator =(const rmatrix_subv &rv) noexcept { return _mvvassign(*this,rvector(rv)); }
397 INLINE imatrix_subv &imatrix_subv::operator =(const real &r) noexcept { return _mvsassign(*this,r); }
399#if(CXSC_INDEX_CHECK)
400
401#else
402 noexcept
403#endif
404 { return _mvvassign(*this,v); }
406#if(CXSC_INDEX_CHECK)
407
408#else
409 noexcept
410#endif
411 { return _mvvassign(*this,ivector(v)); }
412 INLINE imatrix_subv &imatrix_subv::operator *=(const real &c) noexcept { return _mvsmultassign(*this,c); }
413 INLINE imatrix_subv &imatrix_subv::operator +=(const real &c) noexcept { return _mvsplusassign(*this,c); }
414 INLINE imatrix_subv &imatrix_subv::operator -=(const real &c) noexcept { return _mvsminusassign(*this,c); }
415 INLINE imatrix_subv &imatrix_subv::operator /=(const real &c) noexcept { return _mvsdivassign(*this,c); }
416 INLINE imatrix &imatrix::operator =(const interval &r) noexcept { return _msassign(*this,r); }
417 INLINE imatrix &imatrix::operator =(const imatrix &m) noexcept { return _mmassign<imatrix,imatrix,interval>(*this,m,interval(0,0)); }
418 INLINE imatrix &imatrix::operator =(const imatrix_slice &ms) noexcept { return _mmsassign<imatrix,imatrix_slice,interval>(*this,ms); }
419 INLINE imatrix &imatrix::operator =(const ivector &v) noexcept { return _mvassign<imatrix,ivector,interval>(*this,v); }
420 INLINE imatrix &imatrix::operator =(const ivector_slice &v) noexcept { return _mvassign<imatrix,ivector,interval>(*this,ivector(v)); }
421 INLINE imatrix &imatrix::operator =(const real &r) noexcept { return _msassign(*this,interval(r)); }
422 INLINE imatrix &imatrix::operator =(const rmatrix &m) noexcept { return _mmassign<imatrix,rmatrix,interval>(*this,m,interval(0,0)); }
423 INLINE imatrix &imatrix::operator =(const rmatrix_slice &ms) noexcept { return _mmsassign<imatrix,rmatrix_slice,interval>(*this,ms); }
424 INLINE imatrix &imatrix::operator =(const rvector &v) noexcept { return _mvassign<imatrix,rvector,interval>(*this,v); }
425 INLINE imatrix &imatrix::operator =(const rvector_slice &v) noexcept { return _mvassign<imatrix,rvector,interval>(*this,rvector(v)); }
426 INLINE imatrix::operator void*() noexcept { return _mvoid(*this); }
427
429#if(CXSC_INDEX_CHECK)
430
431#else
432 noexcept
433#endif
434 { return _msmassign(*this,m); }
436#if(CXSC_INDEX_CHECK)
437
438#else
439 noexcept
440#endif
441 { return _msmsassign(*this,ms); }
442 INLINE imatrix_slice &imatrix_slice::operator =(const interval &r) noexcept { return _mssassign(*this,r); }
444#if(CXSC_INDEX_CHECK)
445
446#else
447 noexcept
448#endif
449 { return _msmassign(*this,imatrix(v)); }
451#if(CXSC_INDEX_CHECK)
452
453#else
454 noexcept
455#endif
456 { return _msmassign(*this,imatrix(ivector(v))); }
458#if(CXSC_INDEX_CHECK)
459
460#else
461 noexcept
462#endif
463 { return _msmassign(*this,m); }
465#if(CXSC_INDEX_CHECK)
466
467#else
468 noexcept
469#endif
470 { return _msmsassign(*this,ms); }
471 INLINE imatrix_slice &imatrix_slice::operator =(const real &r) noexcept { return _mssassign(*this,r); }
473#if(CXSC_INDEX_CHECK)
474
475#else
476 noexcept
477#endif
478 { return _msmassign(*this,rmatrix(v)); }
480#if(CXSC_INDEX_CHECK)
481
482#else
483 noexcept
484#endif
485 { return _msmassign(*this,rmatrix(rvector(v))); }
486 INLINE imatrix_slice::operator void*() noexcept { return _msvoid(*this); }
487
488 INLINE ivector operator /(const imatrix_subv &rv, const interval &s) noexcept { return _mvsdiv<imatrix_subv,interval,ivector>(rv,s); }
489 INLINE ivector operator *(const imatrix_subv &rv, const interval &s) noexcept { return _mvsmult<imatrix_subv,interval,ivector>(rv,s); }
490 INLINE ivector operator *(const interval &s, const imatrix_subv &rv) noexcept { return _mvsmult<imatrix_subv,interval,ivector>(rv,s); }
491 INLINE imatrix_subv &imatrix_subv::operator *=(const interval &c) noexcept { return _mvsmultassign(*this,c); }
492 INLINE imatrix_subv &imatrix_subv::operator +=(const interval &c) noexcept { return _mvsplusassign(*this,c); }
493 INLINE imatrix_subv &imatrix_subv::operator -=(const interval &c) noexcept { return _mvsminusassign(*this,c); }
494 INLINE imatrix_subv &imatrix_subv::operator /=(const interval &c) noexcept { return _mvsdivassign(*this,c); }
495 INLINE ivector abs(const imatrix_subv &mv) noexcept { return _mvabs<imatrix_subv,ivector>(mv); }
496 INLINE rvector absmin(const imatrix_subv &mv) noexcept {
497 rvector x(Lb(mv),Ub(mv));
498 for(int i=Lb(mv) ; i<=Ub(mv) ; i++)
499 x[i] = AbsMin(mv[i]);
500 return x;
501 }
502 INLINE rvector absmax(const imatrix_subv &mv) noexcept {
503 rvector x(Lb(mv),Ub(mv));
504 for(int i=Lb(mv) ; i<=Ub(mv) ; i++)
505 x[i] = AbsMax(mv[i]);
506 return x;
507 }
508 INLINE rvector diam(const imatrix_subv &mv) noexcept { return _mvdiam<imatrix_subv,rvector>(mv); }
509 INLINE rvector mid(const imatrix_subv &mv) noexcept { return _mvmid<imatrix_subv,rvector>(mv); }
510 INLINE rvector Inf(const imatrix_subv &mv) noexcept { return _mvinf<imatrix_subv,rvector>(mv); }
511 INLINE rvector Sup(const imatrix_subv &mv) noexcept { return _mvsup<imatrix_subv,rvector>(mv); }
512 INLINE imatrix_subv &SetInf(imatrix_subv &mv,const rvector &rv)
513#if(CXSC_INDEX_CHECK)
514
515#else
516 noexcept
517#endif
518 { return _mvvsetinf(mv,rv); }
519 INLINE imatrix_subv &SetSup(imatrix_subv &mv,const rvector &rv)
520#if(CXSC_INDEX_CHECK)
521
522#else
523 noexcept
524#endif
525 { return _mvvsetsup(mv,rv); }
526 INLINE imatrix_subv &UncheckedSetInf(imatrix_subv &mv,const rvector &rv)
527#if(CXSC_INDEX_CHECK)
528
529#else
530 noexcept
531#endif
532 { return _mvvusetinf(mv,rv); }
533 INLINE imatrix_subv &UncheckedSetSup(imatrix_subv &mv,const rvector &rv)
534#if(CXSC_INDEX_CHECK)
535
536#else
537 noexcept
538#endif
539 { return _mvvusetsup(mv,rv); }
540 INLINE imatrix_subv &SetSup(imatrix_subv &iv,const real &r) noexcept { return _mvssetsup(iv,r); }
541 INLINE imatrix_subv &SetInf(imatrix_subv &iv,const real &r) noexcept { return _mvssetinf(iv,r); }
542 INLINE imatrix_subv &UncheckedSetSup(imatrix_subv &iv,const real &r) noexcept { return _mvsusetsup(iv,r); }
543 INLINE imatrix_subv &SetUncheckedInf(imatrix_subv &iv,const real &r) noexcept { return _mvsusetinf(iv,r); }
544 INLINE ivector &ivector::operator =(const imatrix_subv &mv) noexcept { return _vmvassign<ivector,imatrix_subv,interval>(*this,mv); }
545 INLINE ivector_slice &ivector_slice::operator =(const imatrix_subv &mv) noexcept { return _vsvassign(*this,ivector(mv)); }
546
547
548 INLINE interval operator *(const imatrix_subv & rv1, const imatrix_subv &rv2)
549#if(CXSC_INDEX_CHECK)
550
551#else
552 noexcept
553#endif
554 { return _mvmvimult<imatrix_subv,imatrix_subv,interval>(rv1,rv2); }
555 INLINE interval operator *(const ivector & rv1, const imatrix_subv &rv2)
556#if(CXSC_INDEX_CHECK)
557
558#else
559 noexcept
560#endif
561 { return _vmvimult<ivector,imatrix_subv,interval>(rv1,rv2); }
562 INLINE interval operator *(const imatrix_subv &rv1,const ivector &rv2)
563#if(CXSC_INDEX_CHECK)
564
565#else
566 noexcept
567#endif
568 { return _vmvimult<ivector,imatrix_subv,interval>(rv2,rv1); }
569 INLINE interval operator *(const ivector_slice &sl,const imatrix_subv &sv)
570#if(CXSC_INDEX_CHECK)
571
572#else
573 noexcept
574#endif
575 { return _vmvimult<ivector,imatrix_subv,interval>(ivector(sl),sv); }
576 INLINE interval operator *(const imatrix_subv &mv,const ivector_slice &vs)
577#if(CXSC_INDEX_CHECK)
578
579#else
580 noexcept
581#endif
582 { return _vmvimult<ivector,imatrix_subv,interval>(ivector(vs),mv); }
583 INLINE ivector operator +(const imatrix_subv & rv1, const imatrix_subv &rv2)
584#if(CXSC_INDEX_CHECK)
585
586#else
587 noexcept
588#endif
589 { return _mvmvplus<imatrix_subv,imatrix_subv,ivector>(rv1,rv2); }
590 INLINE ivector operator +(const imatrix_subv &rv1,const ivector &rv2)
591#if(CXSC_INDEX_CHECK)
592
593#else
594 noexcept
595#endif
596 { return _mvvplus<imatrix_subv,ivector,ivector>(rv1,rv2); }
597 INLINE ivector operator +(const ivector & rv1, const imatrix_subv &rv2)
598#if(CXSC_INDEX_CHECK)
599
600#else
601 noexcept
602#endif
603 { return _mvvplus<imatrix_subv,ivector,ivector>(rv2,rv1); }
604 INLINE ivector operator +(const ivector_slice &sl,const imatrix_subv &mv)
605#if(CXSC_INDEX_CHECK)
606
607#else
608 noexcept
609#endif
610 { return _mvvplus<imatrix_subv,ivector,ivector>(mv,ivector(sl)); }
611 INLINE ivector operator +(const imatrix_subv &mv,const ivector_slice &sl)
612#if(CXSC_INDEX_CHECK)
613
614#else
615 noexcept
616#endif
617 { return _mvvplus<imatrix_subv,ivector,ivector>(mv,ivector(sl)); }
619#if(CXSC_INDEX_CHECK)
620
621#else
622 noexcept
623#endif
624 { return _mvvplusassign(*this,rv); }
626#if(CXSC_INDEX_CHECK)
627
628#else
629 noexcept
630#endif
631 { return _mvvplusassign(*this,ivector(rv)); }
632 INLINE ivector operator -(const imatrix_subv & rv1, const imatrix_subv &rv2)
633#if(CXSC_INDEX_CHECK)
634
635#else
636 noexcept
637#endif
638 { return _mvmvminus<imatrix_subv,imatrix_subv,ivector>(rv1,rv2); }
639 INLINE ivector operator -(const ivector & rv1, const imatrix_subv &rv2)
640#if(CXSC_INDEX_CHECK)
641
642#else
643 noexcept
644#endif
645 { return _vmvminus<ivector,imatrix_subv,ivector>(rv1,rv2); }
646 INLINE ivector operator -(const imatrix_subv &rv1,const ivector &rv2)
647#if(CXSC_INDEX_CHECK)
648
649#else
650 noexcept
651#endif
652 { return _mvvminus<imatrix_subv,ivector,ivector>(rv1,rv2); }
653 INLINE ivector operator -(const ivector_slice &sl,const imatrix_subv &mv)
654#if(CXSC_INDEX_CHECK)
655
656#else
657 noexcept
658#endif
659 { return _vmvminus<ivector,imatrix_subv,ivector>(ivector(sl),mv); }
660 INLINE ivector operator -(const imatrix_subv &mv,const ivector_slice &sl)
661#if(CXSC_INDEX_CHECK)
662
663#else
664 noexcept
665#endif
666 { return _mvvminus<imatrix_subv,ivector,ivector>(mv,ivector(sl)); }
668#if(CXSC_INDEX_CHECK)
669
670#else
671 noexcept
672#endif
673 { return _mvvminusassign(*this,rv); }
675#if(CXSC_INDEX_CHECK)
676
677#else
678 noexcept
679#endif
680 { return _mvvminusassign(*this,ivector(rv)); }
681 INLINE ivector operator |(const imatrix_subv & rv1, const imatrix_subv &rv2)
682#if(CXSC_INDEX_CHECK)
683
684#else
685 noexcept
686#endif
687 { return _mvmvconv<imatrix_subv,imatrix_subv,ivector>(rv1,rv2); }
688 INLINE ivector operator |(const imatrix_subv &rv1,const ivector &rv2)
689#if(CXSC_INDEX_CHECK)
690
691#else
692 noexcept
693#endif
694 { return _mvvconv<imatrix_subv,ivector,ivector>(rv1,rv2); }
695 INLINE ivector operator |(const ivector & rv1, const imatrix_subv &rv2)
696#if(CXSC_INDEX_CHECK)
697
698#else
699 noexcept
700#endif
701 { return _mvvconv<imatrix_subv,ivector,ivector>(rv2,rv1); }
702 INLINE ivector operator |(const ivector_slice &sl,const imatrix_subv &mv)
703#if(CXSC_INDEX_CHECK)
704
705#else
706 noexcept
707#endif
708 { return _mvvconv<imatrix_subv,ivector,ivector>(mv,ivector(sl)); }
709 INLINE ivector operator |(const imatrix_subv &mv,const ivector_slice &sl)
710#if(CXSC_INDEX_CHECK)
711
712#else
713 noexcept
714#endif
715 { return _mvvconv<imatrix_subv,ivector,ivector>(mv,ivector(sl)); }
717#if(CXSC_INDEX_CHECK)
718
719#else
720 noexcept
721#endif
722 { return _mvvconvassign(*this,rv); }
724#if(CXSC_INDEX_CHECK)
725
726#else
727 noexcept
728#endif
729 { return _mvvconvassign(*this,ivector(rv)); }
730 INLINE ivector operator &(const imatrix_subv & rv1, const imatrix_subv &rv2)
731#if(CXSC_INDEX_CHECK)
732
733#else
734 noexcept
735#endif
736 { return _mvmvsect<imatrix_subv,imatrix_subv,ivector>(rv1,rv2); }
737 INLINE ivector operator &(const imatrix_subv &rv1,const ivector &rv2)
738#if(CXSC_INDEX_CHECK)
739
740#else
741 noexcept
742#endif
743 { return _mvvsect<imatrix_subv,ivector,ivector>(rv1,rv2); }
744 INLINE ivector operator &(const ivector & rv1, const imatrix_subv &rv2)
745#if(CXSC_INDEX_CHECK)
746
747#else
748 noexcept
749#endif
750 { return _mvvsect<imatrix_subv,ivector,ivector>(rv2,rv1); }
751 INLINE ivector operator &(const ivector_slice &sl,const imatrix_subv &mv)
752#if(CXSC_INDEX_CHECK)
753
754#else
755 noexcept
756#endif
757 { return _mvvsect<imatrix_subv,ivector,ivector>(mv,ivector(sl)); }
758 INLINE ivector operator &(const imatrix_subv &mv,const ivector_slice &sl)
759#if(CXSC_INDEX_CHECK)
760
761#else
762 noexcept
763#endif
764 { return _mvvsect<imatrix_subv,ivector,ivector>(mv,ivector(sl)); }
766#if(CXSC_INDEX_CHECK)
767
768#else
769 noexcept
770#endif
771 { return _mvvsectassign(*this,rv); }
773#if(CXSC_INDEX_CHECK)
774
775#else
776 noexcept
777#endif
778 { return _mvvsectassign(*this,ivector(rv)); }
779
780
782#if(CXSC_INDEX_CHECK)
783
784#else
785 noexcept
786#endif
787 { return _mvvplusassign(*this,rv); }
789#if(CXSC_INDEX_CHECK)
790
791#else
792 noexcept
793#endif
794 { return _mvvplusassign(*this,rvector(rv)); }
796#if(CXSC_INDEX_CHECK)
797
798#else
799 noexcept
800#endif
801 { return _mvvminusassign(*this,rv); }
803#if(CXSC_INDEX_CHECK)
804
805#else
806 noexcept
807#endif
808 { return _mvvminusassign(*this,rvector(rv)); }
810#if(CXSC_INDEX_CHECK)
811
812#else
813 noexcept
814#endif
815 { return _mvvconvassign(*this,rv); }
817#if(CXSC_INDEX_CHECK)
818
819#else
820 noexcept
821#endif
822 { return _mvvconvassign(*this,rvector(rv)); }
824#if(CXSC_INDEX_CHECK)
825
826#else
827 noexcept
828#endif
829 { return _mvvsectassign(*this,rv); }
831#if(CXSC_INDEX_CHECK)
832
833#else
834 noexcept
835#endif
836 { return _mvvsectassign(*this,rvector(rv)); }
842 INLINE imatrix _imatrix(const imatrix &rm) noexcept { return rm; }
848 INLINE imatrix _imatrix(const ivector &v) noexcept { return imatrix(v); }
854 INLINE imatrix _imatrix(const ivector_slice &v) noexcept { return imatrix(v); }
860 INLINE imatrix _imatrix(const interval &r) noexcept { return imatrix(r); }
861 INLINE int Lb(const imatrix &rm, const int &i)
862#if(CXSC_INDEX_CHECK)
863
864#else
865 noexcept
866#endif
867 { return _mlb(rm,i); }
868 INLINE int Ub(const imatrix &rm, const int &i)
869#if(CXSC_INDEX_CHECK)
870
871#else
872 noexcept
873#endif
874 { return _mub(rm,i); }
875 INLINE int Lb(const imatrix_slice &rm, const int &i)
876#if(CXSC_INDEX_CHECK)
877
878#else
879 noexcept
880#endif
881 { return _mslb(rm,i); }
882 INLINE int Ub(const imatrix_slice &rm, const int &i)
883#if(CXSC_INDEX_CHECK)
884
885#else
886 noexcept
887#endif
888 { return _msub(rm,i); }
889 INLINE imatrix &SetLb(imatrix &m, const int &i,const int &j)
890#if(CXSC_INDEX_CHECK)
891
892#else
893 noexcept
894#endif
895 { return _msetlb(m,i,j); }
896 INLINE imatrix &SetUb(imatrix &m, const int &i,const int &j)
897#if(CXSC_INDEX_CHECK)
898
899#else
900 noexcept
901#endif
902 { return _msetub(m,i,j); }
903
904 INLINE int RowLen ( const imatrix& A ) // Length of the rows of a interval matrix
905 { return Ub(A,2)-Lb(A,2)+1; } //----------------------------------------
906
907 INLINE int ColLen ( const imatrix& A ) // Length of the columns of a interval matrix
908 { return Ub(A,1)-Lb(A,1)+1; } //-------------------------------------------
909
910 INLINE int RowLen ( const imatrix_slice& A ) // Length of the rows of a interval matrix
911 { return Ub(A,2)-Lb(A,2)+1; } //----------------------------------------
912
913 INLINE int ColLen ( const imatrix_slice& A ) // Length of the columns of a interval matrix
914 { return Ub(A,1)-Lb(A,1)+1; } //-------------------------------------------
915
916 INLINE void Resize(imatrix &A) noexcept { _mresize(A);}
917 INLINE void Resize(imatrix &A,const int &m, const int &n)
918#if(CXSC_INDEX_CHECK)
919
920#else
921 noexcept
922#endif
923 { _mresize<imatrix,interval>(A,m,n); }
924 INLINE void Resize(imatrix &A,const int &m1, const int &m2,const int &n1,const int &n2)
925#if(CXSC_INDEX_CHECK)
926
927#else
928 noexcept
929#endif
930 { _mresize<imatrix,interval>(A,m1,m2,n1,n2); }
931 INLINE imatrix abs(const imatrix &m) noexcept { return _mabs<imatrix,imatrix>(m); }
932 INLINE rmatrix absmin(const imatrix &m) noexcept {
933 rmatrix A(Lb(m,1),Ub(m,1),Lb(m,2),Ub(m,2));
934 for(int i=Lb(m,1) ; i<=Ub(m,1) ; i++)
935 for(int j=Lb(m,2) ; j<=Ub(m,2) ; j++)
936 A[i][j] = AbsMin(m[i][j]);
937 return A;
938 }
939 INLINE rmatrix absmax(const imatrix &m) noexcept {
940 rmatrix A(Lb(m,1),Ub(m,1),Lb(m,2),Ub(m,2));
941 for(int i=Lb(m,1) ; i<=Ub(m,1) ; i++)
942 for(int j=Lb(m,2) ; j<=Ub(m,2) ; j++)
943 A[i][j] = AbsMax(m[i][j]);
944 return A;
945 }
946 INLINE imatrix abs(const imatrix_slice &ms) noexcept { return _msabs<imatrix_slice,imatrix>(ms); }
947 INLINE rmatrix absmin(const imatrix_slice &m) noexcept {
948 rmatrix A(Lb(m,1),Ub(m,1),Lb(m,2),Ub(m,2));
949 for(int i=Lb(m,1) ; i<=Ub(m,1) ; i++)
950 for(int j=Lb(m,2) ; j<=Ub(m,2) ; j++)
951 A[i][j] = AbsMin(m[i][j]);
952 return A;
953 }
954 INLINE rmatrix absmax(const imatrix_slice &m) noexcept {
955 rmatrix A(Lb(m,1),Ub(m,1),Lb(m,2),Ub(m,2));
956 for(int i=Lb(m,1) ; i<=Ub(m,1) ; i++)
957 for(int j=Lb(m,2) ; j<=Ub(m,2) ; j++)
958 A[i][j] = AbsMax(m[i][j]);
959 return A;
960 }
961 INLINE rmatrix diam(const imatrix &m) noexcept { return _mdiam<imatrix,rmatrix>(m); }
962 INLINE rmatrix diam(const imatrix_slice &ms) noexcept { return _msdiam<imatrix_slice,rmatrix>(ms); }
963 INLINE rmatrix mid(const imatrix &m) noexcept { return _mmid<imatrix,rmatrix>(m); }
964 INLINE rmatrix mid(const imatrix_slice &ms) noexcept { return _msmid<imatrix_slice,rmatrix>(ms); }
965 INLINE rmatrix Inf(const imatrix &m) noexcept { return _minf<imatrix,rmatrix>(m); }
966 INLINE rmatrix Sup(const imatrix &m) noexcept { return _msup<imatrix,rmatrix>(m); }
967 INLINE rmatrix Inf(const imatrix_slice &m) noexcept { return _msinf<imatrix_slice,rmatrix>(m); }
968 INLINE rmatrix Sup(const imatrix_slice &m) noexcept { return _mssup<imatrix_slice,rmatrix>(m); }
969 INLINE imatrix &SetInf(imatrix &cm,const rmatrix &rm)
970#if(CXSC_INDEX_CHECK)
971
972#else
973 noexcept
974#endif
975 { return _mmsetinf<imatrix,rmatrix>(cm,rm); }
976 INLINE imatrix_slice &SetInf(imatrix_slice &cm,const rmatrix &rm)
977#if(CXSC_INDEX_CHECK)
978
979#else
980 noexcept
981#endif
982 { return _msmsetinf<imatrix_slice,rmatrix>(cm,rm); }
983 INLINE imatrix &SetInf(imatrix &cm,const rmatrix_slice &rm)
984#if(CXSC_INDEX_CHECK)
985
986#else
987 noexcept
988#endif
989 { return _mmssetinf<imatrix,rmatrix_slice>(cm,rm); }
990 INLINE imatrix_slice &SetInf(imatrix_slice &cm,const rmatrix_slice &rm)
991#if(CXSC_INDEX_CHECK)
992
993#else
994 noexcept
995#endif
996 { return _msmssetinf<imatrix_slice,rmatrix_slice>(cm,rm); }
997 INLINE imatrix &SetSup(imatrix &cm,const rmatrix &rm)
998#if(CXSC_INDEX_CHECK)
999
1000#else
1001 noexcept
1002#endif
1003 { return _mmsetsup<imatrix,rmatrix>(cm,rm); }
1004 INLINE imatrix_slice &SetSup(imatrix_slice &cm,const rmatrix &rm)
1005#if(CXSC_INDEX_CHECK)
1006
1007#else
1008 noexcept
1009#endif
1010 { return _msmsetsup<imatrix_slice,rmatrix>(cm,rm); }
1011 INLINE imatrix &SetSup(imatrix &cm,const rmatrix_slice &rm)
1012#if(CXSC_INDEX_CHECK)
1013
1014#else
1015 noexcept
1016#endif
1017 { return _mmssetsup<imatrix,rmatrix_slice>(cm,rm); }
1018 INLINE imatrix_slice &SetSup(imatrix_slice &cm,const rmatrix_slice &rm)
1019#if(CXSC_INDEX_CHECK)
1020
1021#else
1022 noexcept
1023#endif
1024 { return _msmssetsup<imatrix_slice,rmatrix_slice>(cm,rm); }
1025 INLINE imatrix &UncheckedSetInf(imatrix &cm,const rmatrix &rm)
1026#if(CXSC_INDEX_CHECK)
1027
1028#else
1029 noexcept
1030#endif
1031 { return _mmusetinf<imatrix,rmatrix>(cm,rm); }
1032 INLINE imatrix_slice &UncheckedSetInf(imatrix_slice &cm,const rmatrix &rm)
1033#if(CXSC_INDEX_CHECK)
1034
1035#else
1036 noexcept
1037#endif
1038 { return _msmusetinf<imatrix_slice,rmatrix>(cm,rm); }
1039 INLINE imatrix &UncheckedSetInf(imatrix &cm,const rmatrix_slice &rm)
1040#if(CXSC_INDEX_CHECK)
1041
1042#else
1043 noexcept
1044#endif
1045 { return _mmsusetinf<imatrix,rmatrix_slice>(cm,rm); }
1046 INLINE imatrix_slice &UncheckedSetInf(imatrix_slice &cm,const rmatrix_slice &rm)
1047#if(CXSC_INDEX_CHECK)
1048
1049#else
1050 noexcept
1051#endif
1052 { return _msmsusetinf<imatrix_slice,rmatrix_slice>(cm,rm); }
1053 INLINE imatrix &UncheckedSetSup(imatrix &cm,const rmatrix &rm)
1054#if(CXSC_INDEX_CHECK)
1055
1056#else
1057 noexcept
1058#endif
1059 { return _mmusetsup<imatrix,rmatrix>(cm,rm); }
1060 INLINE imatrix_slice &UncheckedSetSup(imatrix_slice &cm,const rmatrix &rm)
1061#if(CXSC_INDEX_CHECK)
1062
1063#else
1064 noexcept
1065#endif
1066 { return _msmusetsup<imatrix_slice,rmatrix>(cm,rm); }
1067 INLINE imatrix &UncheckedSetSup(imatrix &cm,const rmatrix_slice &rm)
1068#if(CXSC_INDEX_CHECK)
1069
1070#else
1071 noexcept
1072#endif
1073 { return _mmsusetsup<imatrix,rmatrix_slice>(cm,rm); }
1074 INLINE imatrix_slice &UncheckedSetSup(imatrix_slice &cm,const rmatrix_slice &rm)
1075#if(CXSC_INDEX_CHECK)
1076
1077#else
1078 noexcept
1079#endif
1080 { return _msmsusetsup<imatrix_slice,rmatrix_slice>(cm,rm); }
1082#if(CXSC_INDEX_CHECK)
1083
1084#else
1085 noexcept
1086#endif
1087 { _smconstr(*this,m); }
1088// INLINE interval interval::_interval(const imatrix &m) { _smconstr(*this,m); return *this; }
1089 INLINE imatrix operator *(const interval &c, const imatrix &m) noexcept { return _smmult<interval,imatrix,imatrix>(c,m); }
1090 INLINE imatrix operator *(const interval &c, const imatrix_slice &ms) noexcept { return _smsmult<interval,imatrix_slice,imatrix>(c,ms); }
1091 INLINE imatrix operator *(const imatrix &m,const interval &c) noexcept { return _smmult<interval,imatrix,imatrix>(c,m); }
1092 INLINE imatrix operator *(const imatrix_slice &ms,const interval &c) noexcept { return _smsmult<interval,imatrix_slice,imatrix>(c,ms); }
1093 INLINE imatrix &operator *=(imatrix &m,const interval &c) noexcept { return _msmultassign(m,c); }
1095#if(CXSC_INDEX_CHECK)
1096
1097#else
1098 noexcept
1099#endif
1100 { return (*this=*this*m); }
1102#if(CXSC_INDEX_CHECK)
1103
1104#else
1105 noexcept
1106#endif
1107 { return (*this=*this*m); }
1108 INLINE imatrix_slice &imatrix_slice::operator *=(const interval &c) noexcept { return _mssmultassign(*this,c); }
1109 INLINE imatrix operator /(const imatrix &m,const interval &c) noexcept { return _msdiv<imatrix,interval,imatrix>(m,c); }
1110 INLINE imatrix operator /(const imatrix_slice &ms, const interval &c) noexcept { return _mssdiv<imatrix_slice,interval,imatrix>(ms,c); }
1111 INLINE imatrix &operator /=(imatrix &m,const interval &c) noexcept { return _msdivassign(m,c); }
1112 INLINE imatrix_slice &imatrix_slice::operator /=(const interval &c) noexcept { return _mssdivassign(*this,c); }
1113 INLINE imatrix operator *(const real &c, const imatrix &m) noexcept { return _smmult<real,imatrix,imatrix>(c,m); }
1114 INLINE imatrix operator *(const real &c, const imatrix_slice &ms) noexcept { return _smsmult<real,imatrix_slice,imatrix>(c,ms); }
1115 INLINE imatrix operator *(const imatrix &m,const real &c) noexcept { return _smmult<real,imatrix,imatrix>(c,m); }
1116 INLINE imatrix operator *(const imatrix_slice &ms,const real &c) noexcept { return _smsmult<real,imatrix_slice,imatrix>(c,ms); }
1117 INLINE imatrix &operator *=(imatrix &m,const real &c) noexcept { return _msmultassign(m,c); }
1119#if(CXSC_INDEX_CHECK)
1120
1121#else
1122 noexcept
1123#endif
1124 { return (*this=*this*m); }
1126#if(CXSC_INDEX_CHECK)
1127
1128#else
1129 noexcept
1130#endif
1131 { return (*this=*this*m); }
1132 INLINE imatrix_slice &imatrix_slice::operator *=(const real &c) noexcept { return _mssmultassign(*this,c); }
1133 INLINE imatrix operator /(const imatrix &m,const real &c) noexcept { return _msdiv<imatrix,real,imatrix>(m,c); }
1134 INLINE imatrix operator /(const imatrix_slice &ms, const real &c) noexcept { return _mssdiv<imatrix_slice,real,imatrix>(ms,c); }
1135 INLINE imatrix &operator /=(imatrix &m,const real &c) noexcept { return _msdivassign(m,c); }
1136 INLINE imatrix_slice &imatrix_slice::operator /=(const real &c) noexcept { return _mssdivassign(*this,c); }
1137// INLINE interval::interval(const rmatrix &m) { _smconstr(*this,m); }
1138// INLINE interval interval::_interval(const imatrix &m) { _smconstr(*this,m); return *this; }
1139 INLINE imatrix operator *(const interval &c, const rmatrix &m) noexcept { return _smmult<interval,rmatrix,imatrix>(c,m); }
1140 INLINE imatrix operator *(const interval &c, const rmatrix_slice &ms) noexcept { return _smsmult<interval,rmatrix_slice,imatrix>(c,ms); }
1141 INLINE imatrix operator *(const rmatrix &m,const interval &c) noexcept { return _smmult<interval,rmatrix,imatrix>(c,m); }
1142 INLINE imatrix operator *(const rmatrix_slice &ms,const interval &c) noexcept { return _smsmult<interval,rmatrix_slice,imatrix>(c,ms); }
1143 INLINE imatrix operator /(const rmatrix &m,const interval &c) noexcept { return _msdiv<rmatrix,interval,imatrix>(m,c); }
1144 INLINE imatrix operator /(const rmatrix_slice &ms, const interval &c) noexcept { return _mssdiv<rmatrix_slice,interval,imatrix>(ms,c); }
1145 INLINE ivector::ivector(const imatrix &sl)
1146#if(CXSC_INDEX_CHECK)
1147
1148#else
1149 noexcept
1150#endif
1151 { _vmconstr<ivector,imatrix,interval>(*this,sl); }
1153#if(CXSC_INDEX_CHECK)
1154
1155#else
1156 noexcept
1157#endif
1158 { _vmsconstr<ivector,imatrix_slice,interval>(*this,sl); }
1160#if(CXSC_INDEX_CHECK)
1161
1162#else
1163 noexcept
1164#endif
1165 { return _vmassign<ivector,imatrix,interval>(*this,m); }
1167#if(CXSC_INDEX_CHECK)
1168
1169#else
1170 noexcept
1171#endif
1172 { return _vmassign<ivector,imatrix,interval>(*this,imatrix(m)); }
1174#if(CXSC_INDEX_CHECK)
1175
1176#else
1177 noexcept
1178#endif
1179 { return _vsvassign(*this,ivector(imatrix(m))); }
1181#if(CXSC_INDEX_CHECK)
1182
1183#else
1184 noexcept
1185#endif
1186 { return _mvvassign(*this,ivector(m)); }
1188#if(CXSC_INDEX_CHECK)
1189
1190#else
1191 noexcept
1192#endif
1193 { return _mvvassign(*this,ivector(imatrix(m))); }
1194 INLINE ivector operator *(const imatrix &m,const ivector &v)
1195#if(CXSC_INDEX_CHECK)
1196
1197#else
1198 noexcept
1199#endif
1200 { return _mvimult<imatrix,ivector,ivector>(m,v); }
1201 INLINE ivector operator *(const imatrix_slice &ms,const ivector &v)
1202#if(CXSC_INDEX_CHECK)
1203
1204#else
1205 noexcept
1206#endif
1207 { return _msvimult<imatrix_slice,ivector,ivector>(ms,v); }
1208 INLINE ivector operator *(const ivector &v,const imatrix &m)
1209#if(CXSC_INDEX_CHECK)
1210
1211#else
1212 noexcept
1213#endif
1214 { return _vmimult<ivector,imatrix,ivector>(v,m); }
1215 INLINE ivector operator *(const ivector &v,const imatrix_slice &ms)
1216#if(CXSC_INDEX_CHECK)
1217
1218#else
1219 noexcept
1220#endif
1221 { return _vmsimult<ivector,imatrix_slice,ivector>(v,ms); }
1222 INLINE ivector &operator *=(ivector &v,const imatrix &m)
1223#if(CXSC_INDEX_CHECK)
1224
1225#else
1226 noexcept
1227#endif
1228 { return _vmimultassign<ivector,imatrix,interval>(v,m); }
1230#if(CXSC_INDEX_CHECK)
1231
1232#else
1233 noexcept
1234#endif
1235 { return _vmsimultassign<ivector,imatrix_slice,interval>(v,ms); }
1237#if(CXSC_INDEX_CHECK)
1238
1239#else
1240 noexcept
1241#endif
1242 { return _vsmimultassign<ivector_slice,imatrix,interval>(*this,m); }
1243 INLINE ivector operator *(const ivector_slice &v,const imatrix &m)
1244#if(CXSC_INDEX_CHECK)
1245
1246#else
1247 noexcept
1248#endif
1249 { return _vmimult<ivector,imatrix,ivector>(ivector(v),m); }
1251#if(CXSC_INDEX_CHECK)
1252
1253#else
1254 noexcept
1255#endif
1256 { return _vmsimult<ivector,imatrix_slice,ivector>(ivector(v),m); }
1258#if(CXSC_INDEX_CHECK)
1259
1260#else
1261 noexcept
1262#endif
1263 { return _mvvassign(*this,rvector(m)); }
1265#if(CXSC_INDEX_CHECK)
1266
1267#else
1268 noexcept
1269#endif
1270 { return _mvvassign(*this,rvector(rmatrix(m))); }
1271 INLINE ivector operator *(const rvector &v,const imatrix &m)
1272#if(CXSC_INDEX_CHECK)
1273
1274#else
1275 noexcept
1276#endif
1277 { return _vmimult<rvector,imatrix,ivector>(v,m); }
1278 INLINE ivector operator *(const rvector &v,const imatrix_slice &ms)
1279#if(CXSC_INDEX_CHECK)
1280
1281#else
1282 noexcept
1283#endif
1284 { return _vmsimult<rvector,imatrix_slice,ivector>(v,ms); }
1285 INLINE ivector operator *(const rvector_slice &v,const imatrix &m)
1286#if(CXSC_INDEX_CHECK)
1287
1288#else
1289 noexcept
1290#endif
1291 { return _vmimult<ivector,imatrix,ivector>(ivector(v),m); }
1292 INLINE ivector operator *(const imatrix &m,const rvector &v)
1293#if(CXSC_INDEX_CHECK)
1294
1295#else
1296 noexcept
1297#endif
1298 { return _mvimult<imatrix,rvector,ivector>(m,v); }
1299 INLINE ivector operator *(const imatrix_slice &ms,const rvector &v)
1300#if(CXSC_INDEX_CHECK)
1301
1302#else
1303 noexcept
1304#endif
1305 { return _msvimult<imatrix_slice,rvector,ivector>(ms,v); }
1306
1307
1308 INLINE const imatrix &operator +(const imatrix &m1) noexcept { return m1; }
1309 INLINE imatrix operator +(const imatrix_slice &ms) noexcept { return imatrix(ms); }
1310 INLINE imatrix operator +(const imatrix &m1,const imatrix &m2)
1311#if(CXSC_INDEX_CHECK)
1312
1313#else
1314 noexcept
1315#endif
1316 { return _mmplus<imatrix,imatrix,imatrix>(m1,m2); }
1317 INLINE imatrix operator +(const imatrix &m,const imatrix_slice &ms)
1318#if(CXSC_INDEX_CHECK)
1319
1320#else
1321 noexcept
1322#endif
1323 { return _mmsplus<imatrix,imatrix_slice,imatrix>(m,ms); }
1324 INLINE imatrix operator +(const imatrix_slice &ms,const imatrix &m)
1325#if(CXSC_INDEX_CHECK)
1326
1327#else
1328 noexcept
1329#endif
1330 { return _mmsplus<imatrix,imatrix_slice,imatrix>(m,ms); }
1331 INLINE imatrix operator +(const imatrix_slice &m1,const imatrix_slice &m2)
1332#if(CXSC_INDEX_CHECK)
1333
1334#else
1335 noexcept
1336#endif
1337 { return _msmsplus<imatrix_slice,imatrix_slice,imatrix>(m1,m2); }
1338 INLINE imatrix &operator +=(imatrix &m1,const imatrix &m2)
1339#if(CXSC_INDEX_CHECK)
1340
1341#else
1342 noexcept
1343#endif
1344 { return _mmplusassign(m1,m2); }
1346#if(CXSC_INDEX_CHECK)
1347
1348#else
1349 noexcept
1350#endif
1351 { return _mmsplusassign(m1,ms); }
1353#if(CXSC_INDEX_CHECK)
1354
1355#else
1356 noexcept
1357#endif
1358 { return _msmplusassign(*this,m1); }
1360#if(CXSC_INDEX_CHECK)
1361
1362#else
1363 noexcept
1364#endif
1365 { return _msmsplusassign(*this,ms2); }
1366 INLINE imatrix operator -(const imatrix &m) noexcept { return _mminus(m); }
1367 INLINE imatrix operator -(const imatrix_slice &ms) noexcept { return _msminus<imatrix_slice,imatrix>(ms); }
1368 INLINE imatrix operator -(const imatrix &m1,const imatrix &m2)
1369#if(CXSC_INDEX_CHECK)
1370
1371#else
1372 noexcept
1373#endif
1374 { return _mmminus<imatrix,imatrix,imatrix>(m1,m2); }
1375 INLINE imatrix operator -(const imatrix &m,const imatrix_slice &ms)
1376#if(CXSC_INDEX_CHECK)
1377
1378#else
1379 noexcept
1380#endif
1381 { return _mmsminus<imatrix,imatrix_slice,imatrix>(m,ms); }
1382 INLINE imatrix operator -(const imatrix_slice &ms,const imatrix &m)
1383#if(CXSC_INDEX_CHECK)
1384
1385#else
1386 noexcept
1387#endif
1388 { return _msmminus<imatrix_slice,imatrix,imatrix>(ms,m); }
1389 INLINE imatrix operator -(const imatrix_slice &ms1,const imatrix_slice &ms2)
1390#if(CXSC_INDEX_CHECK)
1391
1392#else
1393 noexcept
1394#endif
1395 { return _msmsminus<imatrix_slice,imatrix_slice,imatrix>(ms1,ms2); }
1396 INLINE imatrix &operator -=(imatrix &m1,const imatrix &m2)
1397#if(CXSC_INDEX_CHECK)
1398
1399#else
1400 noexcept
1401#endif
1402 { return _mmminusassign(m1,m2); }
1403 INLINE imatrix &operator -=(imatrix &m1,const imatrix_slice &ms)
1404#if(CXSC_INDEX_CHECK)
1405
1406#else
1407 noexcept
1408#endif
1409 { return _mmsminusassign(m1,ms); }
1411#if(CXSC_INDEX_CHECK)
1412
1413#else
1414 noexcept
1415#endif
1416 { return _msmminusassign(*this,m1); }
1418#if(CXSC_INDEX_CHECK)
1419
1420#else
1421 noexcept
1422#endif
1423 { return _msmsminusassign(*this,ms2); }
1424 INLINE imatrix operator *(const imatrix &m1, const imatrix &m2)
1425#if(CXSC_INDEX_CHECK)
1426
1427#else
1428 noexcept
1429#endif
1430 { return _mmimult<imatrix,imatrix,imatrix>(m1,m2); }
1431 INLINE imatrix operator *(const imatrix &m1, const imatrix_slice &ms)
1432#if(CXSC_INDEX_CHECK)
1433
1434#else
1435 noexcept
1436#endif
1437 { return _mmsimult<imatrix,imatrix_slice,imatrix>(m1,ms); }
1438 INLINE imatrix operator *(const imatrix_slice &ms, const imatrix &m1)
1439#if(CXSC_INDEX_CHECK)
1440
1441#else
1442 noexcept
1443#endif
1444 { return _msmimult<imatrix_slice,imatrix,imatrix>(ms,m1); }
1445 INLINE imatrix operator *(const imatrix_slice &ms1, const imatrix_slice &ms2)
1446#if(CXSC_INDEX_CHECK)
1447
1448#else
1449 noexcept
1450#endif
1451 { return _msmsimult<imatrix_slice,imatrix_slice,imatrix>(ms1,ms2); }
1452 INLINE imatrix &operator *=(imatrix &m1,const imatrix &m2)
1453#if(CXSC_INDEX_CHECK)
1454
1455#else
1456 noexcept
1457#endif
1458 { return _mmimultassign<imatrix,imatrix,interval>(m1,m2); }
1460#if(CXSC_INDEX_CHECK)
1461
1462#else
1463 noexcept
1464#endif
1465 { return _mmsimultassign<imatrix,imatrix_slice,interval>(m1,ms); }
1466 INLINE imatrix operator |(const imatrix &m1,const imatrix &m2)
1467#if(CXSC_INDEX_CHECK)
1468
1469#else
1470 noexcept
1471#endif
1472 { return _mmconv<imatrix,imatrix,imatrix>(m1,m2); }
1473 INLINE imatrix operator |(const imatrix &m,const imatrix_slice &ms)
1474#if(CXSC_INDEX_CHECK)
1475
1476#else
1477 noexcept
1478#endif
1479 { return _mmsconv<imatrix,imatrix_slice,imatrix>(m,ms); }
1480 INLINE imatrix operator |(const imatrix_slice &ms,const imatrix &m)
1481#if(CXSC_INDEX_CHECK)
1482
1483#else
1484 noexcept
1485#endif
1486 { return _mmsconv<imatrix,imatrix_slice,imatrix>(m,ms); }
1487 INLINE imatrix operator |(const imatrix_slice &m1,const imatrix_slice &m2)
1488#if(CXSC_INDEX_CHECK)
1489
1490#else
1491 noexcept
1492#endif
1493 { return _msmsconv<imatrix_slice,imatrix_slice,imatrix>(m1,m2); }
1494 INLINE imatrix &operator |=(imatrix &m1,const imatrix &m2)
1495#if(CXSC_INDEX_CHECK)
1496
1497#else
1498 noexcept
1499#endif
1500 { return _mmconvassign(m1,m2); }
1501 INLINE imatrix &operator |=(imatrix &m1,const imatrix_slice &ms)
1502#if(CXSC_INDEX_CHECK)
1503
1504#else
1505 noexcept
1506#endif
1507 { return _mmsconvassign(m1,ms); }
1509#if(CXSC_INDEX_CHECK)
1510
1511#else
1512 noexcept
1513#endif
1514 { return _msmconvassign(*this,m1); }
1516#if(CXSC_INDEX_CHECK)
1517
1518#else
1519 noexcept
1520#endif
1521 { return _msmsconvassign(*this,ms2); }
1522 INLINE imatrix operator &(const imatrix &m1,const imatrix &m2)
1523#if(CXSC_INDEX_CHECK)
1524
1525#else
1526 noexcept
1527#endif
1528 { return _mmsect<imatrix,imatrix,imatrix>(m1,m2); }
1529 INLINE imatrix operator &(const imatrix &m,const imatrix_slice &ms)
1530#if(CXSC_INDEX_CHECK)
1531
1532#else
1533 noexcept
1534#endif
1535 { return _mmssect<imatrix,imatrix_slice,imatrix>(m,ms); }
1536 INLINE imatrix operator &(const imatrix_slice &ms,const imatrix &m)
1537#if(CXSC_INDEX_CHECK)
1538
1539#else
1540 noexcept
1541#endif
1542 { return _mmssect<imatrix,imatrix_slice,imatrix>(m,ms); }
1543 INLINE imatrix operator &(const imatrix_slice &m1,const imatrix_slice &m2)
1544#if(CXSC_INDEX_CHECK)
1545
1546#else
1547 noexcept
1548#endif
1549 { return _msmssect<imatrix_slice,imatrix_slice,imatrix>(m1,m2); }
1550 INLINE imatrix &operator &=(imatrix &m1,const imatrix &m2)
1551#if(CXSC_INDEX_CHECK)
1552
1553#else
1554 noexcept
1555#endif
1556 { return _mmsectassign(m1,m2); }
1557 INLINE imatrix &operator &=(imatrix &m1,const imatrix_slice &ms)
1558#if(CXSC_INDEX_CHECK)
1559
1560#else
1561 noexcept
1562#endif
1563 { return _mmssectassign(m1,ms); }
1565#if(CXSC_INDEX_CHECK)
1566
1567#else
1568 noexcept
1569#endif
1570 { return _msmsectassign(*this,m1); }
1572#if(CXSC_INDEX_CHECK)
1573
1574#else
1575 noexcept
1576#endif
1577 { return _msmssectassign(*this,ms2); }
1578 INLINE imatrix operator +(const rmatrix &m1,const imatrix &m2)
1579#if(CXSC_INDEX_CHECK)
1580
1581#else
1582 noexcept
1583#endif
1584 { return _mmplus<rmatrix,imatrix,imatrix>(m1,m2); }
1585 INLINE imatrix operator +(const imatrix &m1,const rmatrix &m2)
1586#if(CXSC_INDEX_CHECK)
1587
1588#else
1589 noexcept
1590#endif
1591 { return _mmplus<rmatrix,imatrix,imatrix>(m2,m1); }
1592 INLINE imatrix operator +(const rmatrix &m,const imatrix_slice &ms)
1593#if(CXSC_INDEX_CHECK)
1594
1595#else
1596 noexcept
1597#endif
1598 { return _mmsplus<rmatrix,imatrix_slice,imatrix>(m,ms); }
1599 INLINE imatrix operator +(const imatrix &m,const rmatrix_slice &ms)
1600#if(CXSC_INDEX_CHECK)
1601
1602#else
1603 noexcept
1604#endif
1605 { return _mmsplus<imatrix,rmatrix_slice,imatrix>(m,ms); }
1606 INLINE imatrix operator +(const rmatrix_slice &ms,const imatrix &m)
1607#if(CXSC_INDEX_CHECK)
1608
1609#else
1610 noexcept
1611#endif
1612 { return _mmsplus<imatrix,rmatrix_slice,imatrix>(m,ms); }
1613 INLINE imatrix operator +(const imatrix_slice &ms,const rmatrix &m)
1614#if(CXSC_INDEX_CHECK)
1615
1616#else
1617 noexcept
1618#endif
1619 { return _mmsplus<rmatrix,imatrix_slice,imatrix>(m,ms); }
1620 INLINE imatrix operator +(const rmatrix_slice &m1,const imatrix_slice &m2)
1621#if(CXSC_INDEX_CHECK)
1622
1623#else
1624 noexcept
1625#endif
1626 { return _msmsplus<rmatrix_slice,imatrix_slice,imatrix>(m1,m2); }
1627 INLINE imatrix operator +(const imatrix_slice &m1,const rmatrix_slice &m2)
1628#if(CXSC_INDEX_CHECK)
1629
1630#else
1631 noexcept
1632#endif
1633 { return _msmsplus<rmatrix_slice,imatrix_slice,imatrix>(m2,m1); }
1634 INLINE imatrix &operator +=(imatrix &m1,const rmatrix &m2)
1635#if(CXSC_INDEX_CHECK)
1636
1637#else
1638 noexcept
1639#endif
1640 { return _mmplusassign(m1,m2); }
1642#if(CXSC_INDEX_CHECK)
1643
1644#else
1645 noexcept
1646#endif
1647 { return _mmsplusassign(m1,ms); }
1649#if(CXSC_INDEX_CHECK)
1650
1651#else
1652 noexcept
1653#endif
1654 { return _msmplusassign(*this,m1); }
1656#if(CXSC_INDEX_CHECK)
1657
1658#else
1659 noexcept
1660#endif
1661 { return _msmsplusassign(*this,ms2); }
1662 INLINE imatrix operator -(const rmatrix &m1,const imatrix &m2)
1663#if(CXSC_INDEX_CHECK)
1664
1665#else
1666 noexcept
1667#endif
1668 { return _mmminus<rmatrix,imatrix,imatrix>(m1,m2); }
1669 INLINE imatrix operator -(const imatrix &m1,const rmatrix &m2)
1670#if(CXSC_INDEX_CHECK)
1671
1672#else
1673 noexcept
1674#endif
1675 { return _mmminus<imatrix,rmatrix,imatrix>(m1,m2); }
1676 INLINE imatrix operator -(const rmatrix &m,const imatrix_slice &ms)
1677#if(CXSC_INDEX_CHECK)
1678
1679#else
1680 noexcept
1681#endif
1682 { return _mmsminus<rmatrix,imatrix_slice,imatrix>(m,ms); }
1683 INLINE imatrix operator -(const imatrix &m,const rmatrix_slice &ms)
1684#if(CXSC_INDEX_CHECK)
1685
1686#else
1687 noexcept
1688#endif
1689 { return _mmsminus<imatrix,rmatrix_slice,imatrix>(m,ms); }
1690 INLINE imatrix operator -(const rmatrix_slice &ms,const imatrix &m)
1691#if(CXSC_INDEX_CHECK)
1692
1693#else
1694 noexcept
1695#endif
1696 { return _msmminus<rmatrix_slice,imatrix,imatrix>(ms,m); }
1697 INLINE imatrix operator -(const imatrix_slice &ms,const rmatrix &m)
1698#if(CXSC_INDEX_CHECK)
1699
1700#else
1701 noexcept
1702#endif
1703 { return _msmminus<imatrix_slice,rmatrix,imatrix>(ms,m); }
1704 INLINE imatrix operator -(const rmatrix_slice &ms1,const imatrix_slice &ms2)
1705#if(CXSC_INDEX_CHECK)
1706
1707#else
1708 noexcept
1709#endif
1710 { return _msmsminus<rmatrix_slice,imatrix_slice,imatrix>(ms1,ms2); }
1711 INLINE imatrix operator -(const imatrix_slice &ms1,const rmatrix_slice &ms2)
1712#if(CXSC_INDEX_CHECK)
1713
1714#else
1715 noexcept
1716#endif
1717 { return _msmsminus<imatrix_slice,rmatrix_slice,imatrix>(ms1,ms2); }
1718 INLINE imatrix &operator -=(imatrix &m1,const rmatrix &m2)
1719#if(CXSC_INDEX_CHECK)
1720
1721#else
1722 noexcept
1723#endif
1724 { return _mmminusassign(m1,m2); }
1725 INLINE imatrix &operator -=(imatrix &m1,const rmatrix_slice &ms)
1726#if(CXSC_INDEX_CHECK)
1727
1728#else
1729 noexcept
1730#endif
1731 { return _mmsminusassign(m1,ms); }
1733#if(CXSC_INDEX_CHECK)
1734
1735#else
1736 noexcept
1737#endif
1738 { return _msmminusassign(*this,m1); }
1740#if(CXSC_INDEX_CHECK)
1741
1742#else
1743 noexcept
1744#endif
1745 { return _msmsminusassign(*this,ms2); }
1746 INLINE imatrix operator *(const rmatrix &m1, const imatrix &m2)
1747#if(CXSC_INDEX_CHECK)
1748
1749#else
1750 noexcept
1751#endif
1752 { return _mmimult<rmatrix,imatrix,imatrix>(m1,m2); }
1753 INLINE imatrix operator *(const imatrix &m1, const rmatrix &m2)
1754#if(CXSC_INDEX_CHECK)
1755
1756#else
1757 noexcept
1758#endif
1759 { return _mmimult<imatrix,rmatrix,imatrix>(m1,m2); }
1760 INLINE imatrix operator *(const rmatrix &m1, const imatrix_slice &ms)
1761#if(CXSC_INDEX_CHECK)
1762
1763#else
1764 noexcept
1765#endif
1766 { return _mmsimult<rmatrix,imatrix_slice,imatrix>(m1,ms); }
1767 INLINE imatrix operator *(const imatrix &m1, const rmatrix_slice &ms)
1768#if(CXSC_INDEX_CHECK)
1769
1770#else
1771 noexcept
1772#endif
1773 { return _mmsimult<imatrix,rmatrix_slice,imatrix>(m1,ms); }
1774 INLINE imatrix operator *(const rmatrix_slice &ms, const imatrix &m1)
1775#if(CXSC_INDEX_CHECK)
1776
1777#else
1778 noexcept
1779#endif
1780 { return _msmimult<rmatrix_slice,imatrix,imatrix>(ms,m1); }
1781 INLINE imatrix operator *(const imatrix_slice &ms, const rmatrix &m1)
1782#if(CXSC_INDEX_CHECK)
1783
1784#else
1785 noexcept
1786#endif
1787 { return _msmimult<imatrix_slice,rmatrix,imatrix>(ms,m1); }
1788 INLINE imatrix operator *(const rmatrix_slice &ms1, const imatrix_slice &ms2)
1789#if(CXSC_INDEX_CHECK)
1790
1791#else
1792 noexcept
1793#endif
1794 { return _msmsimult<rmatrix_slice,imatrix_slice,imatrix>(ms1,ms2); }
1795 INLINE imatrix operator *(const imatrix_slice &ms1, const rmatrix_slice &ms2)
1796#if(CXSC_INDEX_CHECK)
1797
1798#else
1799 noexcept
1800#endif
1801 { return _msmsimult<imatrix_slice,rmatrix_slice,imatrix>(ms1,ms2); }
1802 INLINE imatrix &operator *=(imatrix &m1,const rmatrix &m2)
1803#if(CXSC_INDEX_CHECK)
1804
1805#else
1806 noexcept
1807#endif
1808 { return _mmimultassign<imatrix,rmatrix,interval>(m1,m2); }
1810#if(CXSC_INDEX_CHECK)
1811
1812#else
1813 noexcept
1814#endif
1815 { return _mmsimultassign<imatrix,rmatrix_slice,interval>(m1,ms); }
1816 INLINE imatrix operator |(const rmatrix &m1,const rmatrix &m2)
1817#if(CXSC_INDEX_CHECK)
1818
1819#else
1820 noexcept
1821#endif
1822 { return _mmconv<rmatrix,rmatrix,imatrix>(m1,m2); }
1823 INLINE imatrix operator |(const rmatrix &m,const rmatrix_slice &ms)
1824#if(CXSC_INDEX_CHECK)
1825
1826#else
1827 noexcept
1828#endif
1829 { return _mmsconv<rmatrix,rmatrix_slice,imatrix>(m,ms); }
1830 INLINE imatrix operator |(const rmatrix_slice &ms,const rmatrix &m)
1831#if(CXSC_INDEX_CHECK)
1832
1833#else
1834 noexcept
1835#endif
1836 { return _mmsconv<rmatrix,rmatrix_slice,imatrix>(m,ms); }
1837 INLINE imatrix operator |(const rmatrix_slice &m1,const rmatrix_slice &m2)
1838#if(CXSC_INDEX_CHECK)
1839
1840#else
1841 noexcept
1842#endif
1843 { return _msmsconv<rmatrix_slice,rmatrix_slice,imatrix>(m1,m2); }
1844 INLINE imatrix operator |(const rmatrix &m1,const imatrix &m2)
1845#if(CXSC_INDEX_CHECK)
1846
1847#else
1848 noexcept
1849#endif
1850 { return _mmconv<rmatrix,imatrix,imatrix>(m1,m2); }
1851 INLINE imatrix operator |(const imatrix &m1,const rmatrix &m2)
1852#if(CXSC_INDEX_CHECK)
1853
1854#else
1855 noexcept
1856#endif
1857 { return _mmconv<rmatrix,imatrix,imatrix>(m2,m1); }
1858 INLINE imatrix operator |(const rmatrix &m,const imatrix_slice &ms)
1859#if(CXSC_INDEX_CHECK)
1860
1861#else
1862 noexcept
1863#endif
1864 { return _mmsconv<rmatrix,imatrix_slice,imatrix>(m,ms); }
1865 INLINE imatrix operator |(const imatrix &m,const rmatrix_slice &ms)
1866#if(CXSC_INDEX_CHECK)
1867
1868#else
1869 noexcept
1870#endif
1871 { return _mmsconv<imatrix,rmatrix_slice,imatrix>(m,ms); }
1872 INLINE imatrix operator |(const rmatrix_slice &ms,const imatrix &m)
1873#if(CXSC_INDEX_CHECK)
1874
1875#else
1876 noexcept
1877#endif
1878 { return _mmsconv<imatrix,rmatrix_slice,imatrix>(m,ms); }
1879 INLINE imatrix operator |(const imatrix_slice &ms,const rmatrix &m)
1880#if(CXSC_INDEX_CHECK)
1881
1882#else
1883 noexcept
1884#endif
1885 { return _mmsconv<rmatrix,imatrix_slice,imatrix>(m,ms); }
1886 INLINE imatrix operator |(const rmatrix_slice &m1,const imatrix_slice &m2)
1887#if(CXSC_INDEX_CHECK)
1888
1889#else
1890 noexcept
1891#endif
1892 { return _msmsconv<rmatrix_slice,imatrix_slice,imatrix>(m1,m2); }
1893 INLINE imatrix operator |(const imatrix_slice &m1,const rmatrix_slice &m2)
1894#if(CXSC_INDEX_CHECK)
1895
1896#else
1897 noexcept
1898#endif
1899 { return _msmsconv<rmatrix_slice,imatrix_slice,imatrix>(m2,m1); }
1900 INLINE imatrix &operator |=(imatrix &m1,const rmatrix &m2)
1901#if(CXSC_INDEX_CHECK)
1902
1903#else
1904 noexcept
1905#endif
1906 { return _mmconvassign(m1,m2); }
1907 INLINE imatrix &operator |=(imatrix &m1,const rmatrix_slice &ms)
1908#if(CXSC_INDEX_CHECK)
1909
1910#else
1911 noexcept
1912#endif
1913 { return _mmsconvassign(m1,ms); }
1915#if(CXSC_INDEX_CHECK)
1916
1917#else
1918 noexcept
1919#endif
1920 { return _msmconvassign(*this,m1); }
1922#if(CXSC_INDEX_CHECK)
1923
1924#else
1925 noexcept
1926#endif
1927 { return _msmsconvassign(*this,ms2); }
1928 INLINE imatrix operator &(const rmatrix &m1,const imatrix &m2)
1929#if(CXSC_INDEX_CHECK)
1930
1931#else
1932 noexcept
1933#endif
1934 { return _mmsect<rmatrix,imatrix,imatrix>(m1,m2); }
1935 INLINE imatrix operator &(const imatrix &m1,const rmatrix &m2)
1936#if(CXSC_INDEX_CHECK)
1937
1938#else
1939 noexcept
1940#endif
1941 { return _mmsect<rmatrix,imatrix,imatrix>(m2,m1); }
1942 INLINE imatrix operator &(const rmatrix &m,const imatrix_slice &ms)
1943#if(CXSC_INDEX_CHECK)
1944
1945#else
1946 noexcept
1947#endif
1948 { return _mmssect<rmatrix,imatrix_slice,imatrix>(m,ms); }
1949 INLINE imatrix operator &(const imatrix &m,const rmatrix_slice &ms)
1950#if(CXSC_INDEX_CHECK)
1951
1952#else
1953 noexcept
1954#endif
1955 { return _mmssect<imatrix,rmatrix_slice,imatrix>(m,ms); }
1956 INLINE imatrix operator &(const rmatrix_slice &ms,const imatrix &m)
1957#if(CXSC_INDEX_CHECK)
1958
1959#else
1960 noexcept
1961#endif
1962 { return _mmssect<imatrix,rmatrix_slice,imatrix>(m,ms); }
1963 INLINE imatrix operator &(const imatrix_slice &ms,const rmatrix &m)
1964#if(CXSC_INDEX_CHECK)
1965
1966#else
1967 noexcept
1968#endif
1969 { return _mmssect<rmatrix,imatrix_slice,imatrix>(m,ms); }
1970 INLINE imatrix operator &(const rmatrix_slice &m1,const imatrix_slice &m2)
1971#if(CXSC_INDEX_CHECK)
1972
1973#else
1974 noexcept
1975#endif
1976 { return _msmssect<rmatrix_slice,imatrix_slice,imatrix>(m1,m2); }
1977 INLINE imatrix operator &(const imatrix_slice &m1,const rmatrix_slice &m2)
1978#if(CXSC_INDEX_CHECK)
1979
1980#else
1981 noexcept
1982#endif
1983 { return _msmssect<rmatrix_slice,imatrix_slice,imatrix>(m2,m1); }
1984 INLINE imatrix &operator &=(imatrix &m1,const rmatrix &m2)
1985#if(CXSC_INDEX_CHECK)
1986
1987#else
1988 noexcept
1989#endif
1990 { return _mmsectassign(m1,m2); }
1991 INLINE imatrix &operator &=(imatrix &m1,const rmatrix_slice &ms)
1992#if(CXSC_INDEX_CHECK)
1993
1994#else
1995 noexcept
1996#endif
1997 { return _mmssectassign(m1,ms); }
1999#if(CXSC_INDEX_CHECK)
2000
2001#else
2002 noexcept
2003#endif
2004 { return _msmsectassign(*this,m1); }
2006#if(CXSC_INDEX_CHECK)
2007
2008#else
2009 noexcept
2010#endif
2011 { return _msmssectassign(*this,ms2); }
2012 INLINE bool operator ==(const imatrix &m1,const imatrix &m2) noexcept { return _mmeq(m1,m2); }
2013 INLINE bool operator !=(const imatrix &m1,const imatrix &m2) noexcept { return _mmneq(m1,m2); }
2014 INLINE bool operator <(const imatrix &m1,const imatrix &m2) noexcept { return _mmless(m1,m2); }
2015 INLINE bool operator <=(const imatrix &m1,const imatrix &m2) noexcept { return _mmleq(m1,m2); }
2016 INLINE bool operator >(const imatrix &m1,const imatrix &m2) noexcept { return _mmless(m2,m1); }
2017 INLINE bool operator >=(const imatrix &m1,const imatrix &m2) noexcept { return _mmleq(m2,m1); }
2018 INLINE bool operator ==(const imatrix &m1,const imatrix_slice &ms) noexcept { return _mmseq(m1,ms); }
2019 INLINE bool operator !=(const imatrix &m1,const imatrix_slice &ms) noexcept { return _mmsneq(m1,ms); }
2020 INLINE bool operator <(const imatrix &m1,const imatrix_slice &ms) noexcept { return _mmsless(m1,ms); }
2021 INLINE bool operator <=(const imatrix &m1,const imatrix_slice &ms) noexcept { return _mmsleq(m1,ms); }
2022 INLINE bool operator >(const imatrix &m1,const imatrix_slice &ms) noexcept { return _msmless(ms,m1); }
2023 INLINE bool operator >=(const imatrix &m1,const imatrix_slice &ms) noexcept { return _msmleq(ms,m1); }
2024 INLINE bool operator ==(const imatrix_slice &m1,const imatrix_slice &m2) noexcept { return _msmseq(m1,m2); }
2025 INLINE bool operator !=(const imatrix_slice &m1,const imatrix_slice &m2) noexcept { return _msmsneq(m1,m2); }
2026 INLINE bool operator <(const imatrix_slice &m1,const imatrix_slice &m2) noexcept { return _msmsless(m1,m2); }
2027 INLINE bool operator <=(const imatrix_slice &m1,const imatrix_slice &m2) noexcept { return _msmsleq(m1,m2); }
2028 INLINE bool operator >(const imatrix_slice &m1,const imatrix_slice &m2) noexcept { return _msmsless(m2,m1); }
2029 INLINE bool operator >=(const imatrix_slice &m1,const imatrix_slice &m2) noexcept { return _msmsleq(m2,m1); }
2030 INLINE bool operator !(const imatrix &ms) noexcept { return _mnot(ms); }
2031 INLINE bool operator !(const imatrix_slice &ms) noexcept { return _msnot(ms); }
2032 INLINE std::ostream &operator <<(std::ostream &s,const imatrix &r) noexcept { return _mout(s,r); }
2033 INLINE std::ostream &operator <<(std::ostream &s,const imatrix_slice &r) noexcept { return _msout(s,r); }
2034 INLINE std::istream &operator >>(std::istream &s,imatrix &r) noexcept { return _min(s,r); }
2035 INLINE std::istream &operator >>(std::istream &s,imatrix_slice &r) noexcept { return _msin(s,r); }
2036
2038 INLINE imatrix imatrix::operator()(const intvector& p, const intvector& q) {
2039 imatrix A(*this);
2040 for(int i=0 ; i<ColLen(A) ; i++)
2041 for(int j=0 ; j<RowLen(A) ; j++)
2042 A[i+Lb(A,1)][j+Lb(A,2)] = (*this)[p[i+Lb(p)]+Lb(A,1)][q[j+Lb(q)]+Lb(A,2)];
2043 return A;
2044 }
2045
2048 imatrix A(*this);
2049 for(int i=0 ; i<ColLen(A) ; i++)
2050 A[i+Lb(A,1)] = (*this)[p[i+Lb(p)]+Lb(A,1)];
2051 return A;
2052 }
2053
2056 intvector p = permvec(P);
2057 return (*this)(p);
2058 }
2059
2061 INLINE imatrix imatrix::operator()(const intmatrix& P, const intmatrix& Q) {
2062 intvector p = permvec(P);
2063 intvector q = perminv(permvec(Q));
2064 return (*this)(p,q);
2065 }
2066
2069 intvector p = permvec(P);
2070 return (*this)(p);
2071 }
2072
2073} // namespace cxsc
2074
2075#endif
2076
The Data Type imatrix_slice.
Definition imatrix.hpp:1442
imatrix_subv operator[](const int &i) noexcept
Operator for accessing a single row of the matrix.
Definition imatrix.inl:275
imatrix_slice & operator+=(const imatrix &m1) noexcept
Implementation of addition and allocation operation.
Definition imatrix.inl:1352
imatrix_slice & operator=(const imatrix &m) noexcept
Implementation of standard assigning operator.
Definition imatrix.inl:428
imatrix_slice & operator/=(const interval &c) noexcept
Implementation of division and allocation operation.
Definition imatrix.inl:1112
imatrix_slice & operator|=(const imatrix &m1) noexcept
Allocates the convex hull of the arguments to the first argument.
Definition imatrix.inl:1508
imatrix_slice & operator()() noexcept
Operator for accessing the whole matrix.
Definition imatrix.hpp:2010
imatrix_slice & operator&=(const imatrix &m1) noexcept
Allocates the intersection of the arguments to the first argument.
Definition imatrix.inl:1564
imatrix_slice & operator-=(const imatrix &m1) noexcept
Implementation of subtraction and allocation operation.
Definition imatrix.inl:1410
imatrix_slice & operator*=(const imatrix &m) noexcept
Implementation of multiplication and allocation operation.
Definition imatrix.inl:1094
The Data Type imatrix_subv.
Definition imatrix.hpp:56
interval & operator[](const int &i) const noexcept
Operator for accessing the single elements of the vector (read-only)
Definition imatrix.inl:196
imatrix_subv & operator*=(const interval &c) noexcept
Implementation of multiplication and allocation operation.
Definition imatrix.inl:491
imatrix_subv & operator/=(const interval &c) noexcept
Implementation of division and allocation operation.
Definition imatrix.inl:494
imatrix_subv & operator()() noexcept
Operator for accessing the whole vector.
Definition imatrix.hpp:417
imatrix_subv & operator|=(const sivector &rv)
Implementation of addition and allocation operation.
imatrix_subv & operator+=(const interval &c) noexcept
Implementation of addition and allocation operation.
Definition imatrix.inl:492
imatrix_subv & operator-=(const interval &c) noexcept
Implementation of subtraction and allocation operation.
Definition imatrix.inl:493
imatrix_subv & operator&=(const sivector &rv)
Implementation of subtraction and allocation operation.
imatrix_subv & operator=(const simatrix_subv &rv)
Implementation of standard assigning operator.
The Data Type imatrix.
Definition imatrix.hpp:660
imatrix & operator=(const interval &r) noexcept
Implementation of standard assigning operator.
Definition imatrix.inl:416
imatrix() noexcept
Constructor of class imatrix.
Definition imatrix.inl:31
imatrix_subv operator[](const int &i) const noexcept
Operator for accessing a single row of the matrix.
Definition imatrix.inl:223
imatrix & operator()() noexcept
Operator for accessing the whole matrix.
Definition imatrix.hpp:1415
The Scalar Type interval.
Definition interval.hpp:55
interval()
Constructor of class interval.
Definition interval.hpp:64
The Data Type intmatrix.
The Data Type intvector.
Definition intvector.hpp:52
The Data Type ivector_slice.
Definition ivector.hpp:963
ivector_slice & operator*=(const interval &r) noexcept
Implementation of multiplication and allocation operation.
Definition ivector.inl:496
ivector_slice & operator=(const sivector &sl)
Implementation of standard assigning operator.
The Data Type ivector.
Definition ivector.hpp:55
ivector & operator=(const ivector &rv) noexcept
Implementation of standard assigning operator.
Definition ivector.inl:263
ivector & operator()() noexcept
Operator for accessing the whole vector.
Definition ivector.hpp:934
ivector() noexcept
Constructor of class ivector.
Definition ivector.inl:31
The Scalar Type real.
Definition real.hpp:114
The Data Type rmatrix_slice.
Definition rmatrix.hpp:1443
The Data Type rmatrix_subv.
Definition rmatrix.hpp:54
The Data Type rmatrix.
Definition rmatrix.hpp:471
The Data Type rvector_slice.
Definition rvector.hpp:1064
The Data Type rvector.
Definition rvector.hpp:58
The namespace cxsc, providing all functionality of the class library C-XSC.
Definition cdot.cpp:29
cdotprecision & operator+=(cdotprecision &cd, const l_complex &lc) noexcept
Implementation of standard algebraic addition and allocation operation.
Definition cdot.inl:251
cimatrix_subv Col(cimatrix &m, const int &i) noexcept
Returns one column of the matrix as a vector.
Definition cimatrix.inl:242
int ColLen(const cimatrix &)
Returns the column dimension.
civector operator/(const cimatrix_subv &rv, const cinterval &s) noexcept
Implementation of division operation.
Definition cimatrix.inl:730
cvector diam(const cimatrix_subv &mv) noexcept
Returns the diameter of the matrix.
Definition cimatrix.inl:738
rvector absmax(const imatrix_subv &mv) noexcept
Returns the absolute maximum value of the matrix.
Definition imatrix.inl:502
int Ub(const cimatrix &rm, const int &i) noexcept
Returns the upper bound index.
cimatrix & SetLb(cimatrix &m, const int &i, const int &j) noexcept
Sets the lower bound index.
int RowLen(const cimatrix &)
Returns the row dimension.
rvector absmin(const imatrix_subv &mv) noexcept
Returns the absolute minimum value of the matrix.
Definition imatrix.inl:496
cimatrix_subv Row(cimatrix &m, const int &i) noexcept
Returns one row of the matrix as a vector.
Definition cimatrix.inl:231
cimatrix _imatrix(const cimatrix &rm) noexcept
Deprecated typecast, which only exist for the reason of compatibility with older versions of C-XSC.
cimatrix & operator*=(cimatrix &m, const cinterval &c) noexcept
Implementation of multiplication and allocation operation.
real AbsMax(const interval &x)
Computes the greatest absolute value .
Definition interval.cpp:303
ivector abs(const cimatrix_subv &mv) noexcept
Returns the absolute value of the matrix.
Definition cimatrix.inl:737
cvector mid(const cimatrix_subv &mv) noexcept
Returns the middle of the matrix.
Definition cimatrix.inl:739
civector operator*(const cimatrix_subv &rv, const cinterval &s) noexcept
Implementation of multiplication operation.
Definition cimatrix.inl:731
void Resize(cimatrix &A) noexcept
Resizes the matrix.
cimatrix_subv & SetUncheckedInf(cimatrix_subv &iv, const complex &r) noexcept
Returns the matrix with the new unchecked given infimum value.
Definition cimatrix.inl:890
cimatrix & SetUb(cimatrix &m, const int &i, const int &j) noexcept
Sets the upper bound index.
int Lb(const cimatrix &rm, const int &i) noexcept
Returns the lower bound index.
real AbsMin(const interval &x)
Computes the smallest absolute value .
Definition interval.cpp:293
cimatrix & operator/=(cimatrix &m, const cinterval &c) noexcept
Implementation of division and allocation operation.