26#ifndef _CXSC_IMATRIX_INL_INCLUDED
27#define _CXSC_IMATRIX_INL_INCLUDED
31INLINE
imatrix::imatrix() noexcept:dat(NULL),lb1(1),ub1(0),lb2(1),ub2(0),xsize(0),ysize(0)
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)
50 for(
int i=0;i<xsize*ysize;i++)
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)
57 for(
int i=0;i<xsize*ysize;i++)
63:lb1(1),ub1(m),lb2(1),ub2(n),xsize(n),ysize(m)
65 noexcept:lb1(1),ub1(m),lb2(1),ub2(n),xsize(n),ysize(m)
69 if((n<0)||(m<0)) cxscthrow(ERROR_IMATRIX_WRONG_BOUNDARIES(
"imatrix::imatrix(const int &m, const int &n)"));
76:lb1(m1),ub1(m2),lb2(n1),ub2(n2),xsize(n2-n1+1),ysize(m2-m1+1)
78 noexcept:lb1(m1),ub1(m2),lb2(n1),ub2(n2),xsize(n2-n1+1),ysize(m2-m1+1)
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)"));
90 for (
int i=0, j=v.start;i<v.size;i++,j+=v.offset)
97 for(
int i=0;i<v.size;i++)
104 for(
int i=0;i<v.size;i++)
111 for(
int i=0,j=v.start-v.l;i<v.size;i++,j++)
118 for(
int i=0,j=v.start-v.l;i<v.size;i++,j++)
129 for (i=0;i<ysize;i++)
133 dat[i*xsize+j]=sl.dat[(sl.offset1+i)*sl.mxsize+sl.offset2+j];
143 for (i=0;i<ysize;i++)
147 dat[i*xsize+j]=sl.dat[(sl.offset1+i)*sl.mxsize+sl.offset2+j];
204 if((i<lb)||(i>ub)) cxscthrow(ERROR_IVECTOR_ELEMENT_NOT_IN_VEC(
"interval &imatrix_subv::operator [](const int &i) const"));
206 return dat[start+((i-lb)*offset)];
217 if((i<lb)||(i>ub)) cxscthrow(ERROR_IVECTOR_ELEMENT_NOT_IN_VEC(
"interval &imatrix_subv::operator [](const int &i)"));
219 return dat[start+((i-lb)*offset)];
231 if((i<lb1)||(i>ub1)) cxscthrow(ERROR_IMATRIX_ROW_OR_COL_NOT_IN_MAT(
"imatrix_subv imatrix::operator [](const int &i)"));
233 return imatrix_subv(dat, lb2, ub2, xsize, xsize*(i-lb1),1);
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)"));
246 return imatrix_subv(dat, lb1, ub1, ysize, i.col()-lb2, xsize);
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)"));
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)"));
283 if((i<start1)||(i>end1)) cxscthrow(ERROR_IMATRIX_ROW_OR_COL_NOT_IN_MAT(
"imatrix_subv imatrix_slice::operator [](const int &i)"));
285 return imatrix_subv(dat, start2, end2, sxsize, mxsize*(i-start1+offset1)+offset2,1);
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)"));
298 return imatrix_subv(dat, start1, end1, sysize, offset1*mxsize+i.col()-start2+offset2, mxsize);
309 if((i<start1)||(i>end1)) cxscthrow(ERROR_IMATRIX_ROW_OR_COL_NOT_IN_MAT(
"imatrix_subv imatrix_slice::operator [](const int &i)"));
311 return imatrix_subv(dat, start2, end2, sxsize, mxsize*(i-start1+offset1)+offset2,1);
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)"));
324 return imatrix_subv(dat, start1, end1, sysize, offset1*mxsize+i.col()-start2+offset2, mxsize);
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)"));
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)"));
362 if(1<lb||i>ub) cxscthrow(ERROR_IVECTOR_SUB_ARRAY_TOO_BIG(
"imatrix_subv imatrix_subv::operator ()(const int &i)"));
364 return imatrix_subv(dat,1,i,i,start+(1-lb)*offset,offset);
375 if(i1<lb||i2>ub) cxscthrow(ERROR_IVECTOR_SUB_ARRAY_TOO_BIG(
"imatrix_subv imatrix_subv::operator ()(const int &i1,const int &i2)"));
377 return imatrix_subv(dat,i1,i2,i2-i1+1,start+(i1-lb)*offset,offset);
388 {
return _mvvassign(*
this,v); }
395 {
return _mvvassign(*
this,
ivector(v)); }
404 {
return _mvvassign(*
this,v); }
411 {
return _mvvassign(*
this,
ivector(v)); }
426 INLINE imatrix::operator
void*()
noexcept {
return _mvoid(*
this); }
434 {
return _msmassign(*
this,m); }
441 {
return _msmsassign(*
this,ms); }
449 {
return _msmassign(*
this,
imatrix(v)); }
463 {
return _msmassign(*
this,m); }
470 {
return _msmsassign(*
this,ms); }
478 {
return _msmassign(*
this,
rmatrix(v)); }
486 INLINE imatrix_slice::operator
void*()
noexcept {
return _msvoid(*
this); }
498 for(
int i=
Lb(mv) ; i<=
Ub(mv) ; i++)
504 for(
int i=
Lb(mv) ; i<=
Ub(mv) ; i++)
518 {
return _mvvsetinf(mv,rv); }
525 {
return _mvvsetsup(mv,rv); }
532 {
return _mvvusetinf(mv,rv); }
539 {
return _mvvusetsup(mv,rv); }
554 {
return _mvmvimult<imatrix_subv,imatrix_subv,interval>(rv1,rv2); }
561 {
return _vmvimult<ivector,imatrix_subv,interval>(rv1,rv2); }
568 {
return _vmvimult<ivector,imatrix_subv,interval>(rv2,rv1); }
575 {
return _vmvimult<ivector,imatrix_subv,interval>(
ivector(sl),sv); }
582 {
return _vmvimult<ivector,imatrix_subv,interval>(
ivector(vs),mv); }
589 {
return _mvmvplus<imatrix_subv,imatrix_subv,ivector>(rv1,rv2); }
596 {
return _mvvplus<imatrix_subv,ivector,ivector>(rv1,rv2); }
603 {
return _mvvplus<imatrix_subv,ivector,ivector>(rv2,rv1); }
610 {
return _mvvplus<imatrix_subv,ivector,ivector>(mv,
ivector(sl)); }
617 {
return _mvvplus<imatrix_subv,ivector,ivector>(mv,
ivector(sl)); }
624 {
return _mvvplusassign(*
this,rv); }
631 {
return _mvvplusassign(*
this,
ivector(rv)); }
638 {
return _mvmvminus<imatrix_subv,imatrix_subv,ivector>(rv1,rv2); }
645 {
return _vmvminus<ivector,imatrix_subv,ivector>(rv1,rv2); }
652 {
return _mvvminus<imatrix_subv,ivector,ivector>(rv1,rv2); }
659 {
return _vmvminus<ivector,imatrix_subv,ivector>(
ivector(sl),mv); }
666 {
return _mvvminus<imatrix_subv,ivector,ivector>(mv,
ivector(sl)); }
673 {
return _mvvminusassign(*
this,rv); }
680 {
return _mvvminusassign(*
this,
ivector(rv)); }
687 {
return _mvmvconv<imatrix_subv,imatrix_subv,ivector>(rv1,rv2); }
688 INLINE ivector operator |(
const imatrix_subv &rv1,
const ivector &rv2)
694 {
return _mvvconv<imatrix_subv,ivector,ivector>(rv1,rv2); }
695 INLINE ivector operator |(
const ivector & rv1,
const imatrix_subv &rv2)
701 {
return _mvvconv<imatrix_subv,ivector,ivector>(rv2,rv1); }
702 INLINE ivector operator |(
const ivector_slice &sl,
const imatrix_subv &mv)
708 {
return _mvvconv<imatrix_subv,ivector,ivector>(mv,ivector(sl)); }
709 INLINE ivector operator |(
const imatrix_subv &mv,
const ivector_slice &sl)
715 {
return _mvvconv<imatrix_subv,ivector,ivector>(mv,ivector(sl)); }
722 {
return _mvvconvassign(*
this,rv); }
729 {
return _mvvconvassign(*
this,
ivector(rv)); }
736 {
return _mvmvsect<imatrix_subv,imatrix_subv,ivector>(rv1,rv2); }
737 INLINE ivector operator &(
const imatrix_subv &rv1,
const ivector &rv2)
743 {
return _mvvsect<imatrix_subv,ivector,ivector>(rv1,rv2); }
744 INLINE ivector operator &(
const ivector & rv1,
const imatrix_subv &rv2)
750 {
return _mvvsect<imatrix_subv,ivector,ivector>(rv2,rv1); }
751 INLINE ivector operator &(
const ivector_slice &sl,
const imatrix_subv &mv)
757 {
return _mvvsect<imatrix_subv,ivector,ivector>(mv,ivector(sl)); }
758 INLINE ivector operator &(
const imatrix_subv &mv,
const ivector_slice &sl)
764 {
return _mvvsect<imatrix_subv,ivector,ivector>(mv,ivector(sl)); }
771 {
return _mvvsectassign(*
this,rv); }
778 {
return _mvvsectassign(*
this,
ivector(rv)); }
787 {
return _mvvplusassign(*
this,rv); }
794 {
return _mvvplusassign(*
this,
rvector(rv)); }
801 {
return _mvvminusassign(*
this,rv); }
808 {
return _mvvminusassign(*
this,
rvector(rv)); }
815 {
return _mvvconvassign(*
this,rv); }
822 {
return _mvvconvassign(*
this,
rvector(rv)); }
829 {
return _mvvsectassign(*
this,rv); }
836 {
return _mvvsectassign(*
this,
rvector(rv)); }
867 {
return _mlb(rm,i); }
874 {
return _mub(rm,i); }
881 {
return _mslb(rm,i); }
888 {
return _msub(rm,i); }
895 {
return _msetlb(m,i,j); }
902 {
return _msetub(m,i,j); }
905 {
return Ub(A,2)-
Lb(A,2)+1; }
908 {
return Ub(A,1)-
Lb(A,1)+1; }
911 {
return Ub(A,2)-
Lb(A,2)+1; }
914 {
return Ub(A,1)-
Lb(A,1)+1; }
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)
930 { _mresize<imatrix,interval>(A,m1,m2,n1,n2); }
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]);
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]);
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]);
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]);
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); }
975 {
return _mmsetinf<imatrix,rmatrix>(cm,rm); }
982 {
return _msmsetinf<imatrix_slice,rmatrix>(cm,rm); }
989 {
return _mmssetinf<imatrix,rmatrix_slice>(cm,rm); }
996 {
return _msmssetinf<imatrix_slice,rmatrix_slice>(cm,rm); }
1003 {
return _mmsetsup<imatrix,rmatrix>(cm,rm); }
1005#if(CXSC_INDEX_CHECK)
1010 {
return _msmsetsup<imatrix_slice,rmatrix>(cm,rm); }
1012#if(CXSC_INDEX_CHECK)
1017 {
return _mmssetsup<imatrix,rmatrix_slice>(cm,rm); }
1019#if(CXSC_INDEX_CHECK)
1024 {
return _msmssetsup<imatrix_slice,rmatrix_slice>(cm,rm); }
1026#if(CXSC_INDEX_CHECK)
1031 {
return _mmusetinf<imatrix,rmatrix>(cm,rm); }
1033#if(CXSC_INDEX_CHECK)
1038 {
return _msmusetinf<imatrix_slice,rmatrix>(cm,rm); }
1040#if(CXSC_INDEX_CHECK)
1045 {
return _mmsusetinf<imatrix,rmatrix_slice>(cm,rm); }
1047#if(CXSC_INDEX_CHECK)
1052 {
return _msmsusetinf<imatrix_slice,rmatrix_slice>(cm,rm); }
1054#if(CXSC_INDEX_CHECK)
1059 {
return _mmusetsup<imatrix,rmatrix>(cm,rm); }
1061#if(CXSC_INDEX_CHECK)
1066 {
return _msmusetsup<imatrix_slice,rmatrix>(cm,rm); }
1068#if(CXSC_INDEX_CHECK)
1073 {
return _mmsusetsup<imatrix,rmatrix_slice>(cm,rm); }
1075#if(CXSC_INDEX_CHECK)
1080 {
return _msmsusetsup<imatrix_slice,rmatrix_slice>(cm,rm); }
1082#if(CXSC_INDEX_CHECK)
1087 { _smconstr(*
this,m); }
1095#if(CXSC_INDEX_CHECK)
1100 {
return (*
this=*
this*m); }
1102#if(CXSC_INDEX_CHECK)
1107 {
return (*
this=*
this*m); }
1119#if(CXSC_INDEX_CHECK)
1124 {
return (*
this=*
this*m); }
1126#if(CXSC_INDEX_CHECK)
1131 {
return (*
this=*
this*m); }
1146#if(CXSC_INDEX_CHECK)
1151 { _vmconstr<ivector,imatrix,interval>(*
this,sl); }
1153#if(CXSC_INDEX_CHECK)
1158 { _vmsconstr<ivector,imatrix_slice,interval>(*
this,sl); }
1160#if(CXSC_INDEX_CHECK)
1165 {
return _vmassign<ivector,imatrix,interval>(*
this,m); }
1167#if(CXSC_INDEX_CHECK)
1172 {
return _vmassign<ivector,imatrix,interval>(*
this,
imatrix(m)); }
1174#if(CXSC_INDEX_CHECK)
1181#if(CXSC_INDEX_CHECK)
1186 {
return _mvvassign(*
this,
ivector(m)); }
1188#if(CXSC_INDEX_CHECK)
1195#if(CXSC_INDEX_CHECK)
1200 {
return _mvimult<imatrix,ivector,ivector>(m,v); }
1202#if(CXSC_INDEX_CHECK)
1207 {
return _msvimult<imatrix_slice,ivector,ivector>(ms,v); }
1209#if(CXSC_INDEX_CHECK)
1214 {
return _vmimult<ivector,imatrix,ivector>(v,m); }
1216#if(CXSC_INDEX_CHECK)
1221 {
return _vmsimult<ivector,imatrix_slice,ivector>(v,ms); }
1223#if(CXSC_INDEX_CHECK)
1228 {
return _vmimultassign<ivector,imatrix,interval>(v,m); }
1230#if(CXSC_INDEX_CHECK)
1235 {
return _vmsimultassign<ivector,imatrix_slice,interval>(v,ms); }
1237#if(CXSC_INDEX_CHECK)
1242 {
return _vsmimultassign<ivector_slice,imatrix,interval>(*
this,m); }
1244#if(CXSC_INDEX_CHECK)
1249 {
return _vmimult<ivector,imatrix,ivector>(
ivector(v),m); }
1251#if(CXSC_INDEX_CHECK)
1256 {
return _vmsimult<ivector,imatrix_slice,ivector>(
ivector(v),m); }
1258#if(CXSC_INDEX_CHECK)
1263 {
return _mvvassign(*
this,
rvector(m)); }
1265#if(CXSC_INDEX_CHECK)
1272#if(CXSC_INDEX_CHECK)
1277 {
return _vmimult<rvector,imatrix,ivector>(v,m); }
1279#if(CXSC_INDEX_CHECK)
1284 {
return _vmsimult<rvector,imatrix_slice,ivector>(v,ms); }
1286#if(CXSC_INDEX_CHECK)
1291 {
return _vmimult<ivector,imatrix,ivector>(
ivector(v),m); }
1293#if(CXSC_INDEX_CHECK)
1298 {
return _mvimult<imatrix,rvector,ivector>(m,v); }
1300#if(CXSC_INDEX_CHECK)
1305 {
return _msvimult<imatrix_slice,rvector,ivector>(ms,v); }
1311#if(CXSC_INDEX_CHECK)
1316 {
return _mmplus<imatrix,imatrix,imatrix>(m1,m2); }
1318#if(CXSC_INDEX_CHECK)
1323 {
return _mmsplus<imatrix,imatrix_slice,imatrix>(m,ms); }
1325#if(CXSC_INDEX_CHECK)
1330 {
return _mmsplus<imatrix,imatrix_slice,imatrix>(m,ms); }
1332#if(CXSC_INDEX_CHECK)
1337 {
return _msmsplus<imatrix_slice,imatrix_slice,imatrix>(m1,m2); }
1339#if(CXSC_INDEX_CHECK)
1344 {
return _mmplusassign(m1,m2); }
1346#if(CXSC_INDEX_CHECK)
1351 {
return _mmsplusassign(m1,ms); }
1353#if(CXSC_INDEX_CHECK)
1358 {
return _msmplusassign(*
this,m1); }
1360#if(CXSC_INDEX_CHECK)
1365 {
return _msmsplusassign(*
this,ms2); }
1369#if(CXSC_INDEX_CHECK)
1374 {
return _mmminus<imatrix,imatrix,imatrix>(m1,m2); }
1376#if(CXSC_INDEX_CHECK)
1381 {
return _mmsminus<imatrix,imatrix_slice,imatrix>(m,ms); }
1383#if(CXSC_INDEX_CHECK)
1388 {
return _msmminus<imatrix_slice,imatrix,imatrix>(ms,m); }
1390#if(CXSC_INDEX_CHECK)
1395 {
return _msmsminus<imatrix_slice,imatrix_slice,imatrix>(ms1,ms2); }
1397#if(CXSC_INDEX_CHECK)
1402 {
return _mmminusassign(m1,m2); }
1404#if(CXSC_INDEX_CHECK)
1409 {
return _mmsminusassign(m1,ms); }
1411#if(CXSC_INDEX_CHECK)
1416 {
return _msmminusassign(*
this,m1); }
1418#if(CXSC_INDEX_CHECK)
1423 {
return _msmsminusassign(*
this,ms2); }
1425#if(CXSC_INDEX_CHECK)
1430 {
return _mmimult<imatrix,imatrix,imatrix>(m1,m2); }
1432#if(CXSC_INDEX_CHECK)
1437 {
return _mmsimult<imatrix,imatrix_slice,imatrix>(m1,ms); }
1439#if(CXSC_INDEX_CHECK)
1444 {
return _msmimult<imatrix_slice,imatrix,imatrix>(ms,m1); }
1446#if(CXSC_INDEX_CHECK)
1451 {
return _msmsimult<imatrix_slice,imatrix_slice,imatrix>(ms1,ms2); }
1453#if(CXSC_INDEX_CHECK)
1458 {
return _mmimultassign<imatrix,imatrix,interval>(m1,m2); }
1460#if(CXSC_INDEX_CHECK)
1465 {
return _mmsimultassign<imatrix,imatrix_slice,interval>(m1,ms); }
1467#if(CXSC_INDEX_CHECK)
1472 {
return _mmconv<imatrix,imatrix,imatrix>(m1,m2); }
1474#if(CXSC_INDEX_CHECK)
1479 {
return _mmsconv<imatrix,imatrix_slice,imatrix>(m,ms); }
1481#if(CXSC_INDEX_CHECK)
1486 {
return _mmsconv<imatrix,imatrix_slice,imatrix>(m,ms); }
1488#if(CXSC_INDEX_CHECK)
1493 {
return _msmsconv<imatrix_slice,imatrix_slice,imatrix>(m1,m2); }
1495#if(CXSC_INDEX_CHECK)
1500 {
return _mmconvassign(m1,m2); }
1502#if(CXSC_INDEX_CHECK)
1507 {
return _mmsconvassign(m1,ms); }
1509#if(CXSC_INDEX_CHECK)
1514 {
return _msmconvassign(*
this,m1); }
1516#if(CXSC_INDEX_CHECK)
1521 {
return _msmsconvassign(*
this,ms2); }
1523#if(CXSC_INDEX_CHECK)
1528 {
return _mmsect<imatrix,imatrix,imatrix>(m1,m2); }
1530#if(CXSC_INDEX_CHECK)
1535 {
return _mmssect<imatrix,imatrix_slice,imatrix>(m,ms); }
1537#if(CXSC_INDEX_CHECK)
1542 {
return _mmssect<imatrix,imatrix_slice,imatrix>(m,ms); }
1544#if(CXSC_INDEX_CHECK)
1549 {
return _msmssect<imatrix_slice,imatrix_slice,imatrix>(m1,m2); }
1551#if(CXSC_INDEX_CHECK)
1556 {
return _mmsectassign(m1,m2); }
1558#if(CXSC_INDEX_CHECK)
1563 {
return _mmssectassign(m1,ms); }
1565#if(CXSC_INDEX_CHECK)
1570 {
return _msmsectassign(*
this,m1); }
1572#if(CXSC_INDEX_CHECK)
1577 {
return _msmssectassign(*
this,ms2); }
1579#if(CXSC_INDEX_CHECK)
1584 {
return _mmplus<rmatrix,imatrix,imatrix>(m1,m2); }
1586#if(CXSC_INDEX_CHECK)
1591 {
return _mmplus<rmatrix,imatrix,imatrix>(m2,m1); }
1593#if(CXSC_INDEX_CHECK)
1598 {
return _mmsplus<rmatrix,imatrix_slice,imatrix>(m,ms); }
1600#if(CXSC_INDEX_CHECK)
1605 {
return _mmsplus<imatrix,rmatrix_slice,imatrix>(m,ms); }
1607#if(CXSC_INDEX_CHECK)
1612 {
return _mmsplus<imatrix,rmatrix_slice,imatrix>(m,ms); }
1614#if(CXSC_INDEX_CHECK)
1619 {
return _mmsplus<rmatrix,imatrix_slice,imatrix>(m,ms); }
1621#if(CXSC_INDEX_CHECK)
1626 {
return _msmsplus<rmatrix_slice,imatrix_slice,imatrix>(m1,m2); }
1628#if(CXSC_INDEX_CHECK)
1633 {
return _msmsplus<rmatrix_slice,imatrix_slice,imatrix>(m2,m1); }
1635#if(CXSC_INDEX_CHECK)
1640 {
return _mmplusassign(m1,m2); }
1642#if(CXSC_INDEX_CHECK)
1647 {
return _mmsplusassign(m1,ms); }
1649#if(CXSC_INDEX_CHECK)
1654 {
return _msmplusassign(*
this,m1); }
1656#if(CXSC_INDEX_CHECK)
1661 {
return _msmsplusassign(*
this,ms2); }
1663#if(CXSC_INDEX_CHECK)
1668 {
return _mmminus<rmatrix,imatrix,imatrix>(m1,m2); }
1670#if(CXSC_INDEX_CHECK)
1675 {
return _mmminus<imatrix,rmatrix,imatrix>(m1,m2); }
1677#if(CXSC_INDEX_CHECK)
1682 {
return _mmsminus<rmatrix,imatrix_slice,imatrix>(m,ms); }
1684#if(CXSC_INDEX_CHECK)
1689 {
return _mmsminus<imatrix,rmatrix_slice,imatrix>(m,ms); }
1691#if(CXSC_INDEX_CHECK)
1696 {
return _msmminus<rmatrix_slice,imatrix,imatrix>(ms,m); }
1698#if(CXSC_INDEX_CHECK)
1703 {
return _msmminus<imatrix_slice,rmatrix,imatrix>(ms,m); }
1705#if(CXSC_INDEX_CHECK)
1710 {
return _msmsminus<rmatrix_slice,imatrix_slice,imatrix>(ms1,ms2); }
1712#if(CXSC_INDEX_CHECK)
1717 {
return _msmsminus<imatrix_slice,rmatrix_slice,imatrix>(ms1,ms2); }
1719#if(CXSC_INDEX_CHECK)
1724 {
return _mmminusassign(m1,m2); }
1726#if(CXSC_INDEX_CHECK)
1731 {
return _mmsminusassign(m1,ms); }
1733#if(CXSC_INDEX_CHECK)
1738 {
return _msmminusassign(*
this,m1); }
1740#if(CXSC_INDEX_CHECK)
1745 {
return _msmsminusassign(*
this,ms2); }
1747#if(CXSC_INDEX_CHECK)
1752 {
return _mmimult<rmatrix,imatrix,imatrix>(m1,m2); }
1754#if(CXSC_INDEX_CHECK)
1759 {
return _mmimult<imatrix,rmatrix,imatrix>(m1,m2); }
1761#if(CXSC_INDEX_CHECK)
1766 {
return _mmsimult<rmatrix,imatrix_slice,imatrix>(m1,ms); }
1768#if(CXSC_INDEX_CHECK)
1773 {
return _mmsimult<imatrix,rmatrix_slice,imatrix>(m1,ms); }
1775#if(CXSC_INDEX_CHECK)
1780 {
return _msmimult<rmatrix_slice,imatrix,imatrix>(ms,m1); }
1782#if(CXSC_INDEX_CHECK)
1787 {
return _msmimult<imatrix_slice,rmatrix,imatrix>(ms,m1); }
1789#if(CXSC_INDEX_CHECK)
1794 {
return _msmsimult<rmatrix_slice,imatrix_slice,imatrix>(ms1,ms2); }
1796#if(CXSC_INDEX_CHECK)
1801 {
return _msmsimult<imatrix_slice,rmatrix_slice,imatrix>(ms1,ms2); }
1803#if(CXSC_INDEX_CHECK)
1808 {
return _mmimultassign<imatrix,rmatrix,interval>(m1,m2); }
1810#if(CXSC_INDEX_CHECK)
1815 {
return _mmsimultassign<imatrix,rmatrix_slice,interval>(m1,ms); }
1817#if(CXSC_INDEX_CHECK)
1822 {
return _mmconv<rmatrix,rmatrix,imatrix>(m1,m2); }
1824#if(CXSC_INDEX_CHECK)
1829 {
return _mmsconv<rmatrix,rmatrix_slice,imatrix>(m,ms); }
1831#if(CXSC_INDEX_CHECK)
1836 {
return _mmsconv<rmatrix,rmatrix_slice,imatrix>(m,ms); }
1838#if(CXSC_INDEX_CHECK)
1843 {
return _msmsconv<rmatrix_slice,rmatrix_slice,imatrix>(m1,m2); }
1845#if(CXSC_INDEX_CHECK)
1850 {
return _mmconv<rmatrix,imatrix,imatrix>(m1,m2); }
1852#if(CXSC_INDEX_CHECK)
1857 {
return _mmconv<rmatrix,imatrix,imatrix>(m2,m1); }
1859#if(CXSC_INDEX_CHECK)
1864 {
return _mmsconv<rmatrix,imatrix_slice,imatrix>(m,ms); }
1866#if(CXSC_INDEX_CHECK)
1871 {
return _mmsconv<imatrix,rmatrix_slice,imatrix>(m,ms); }
1873#if(CXSC_INDEX_CHECK)
1878 {
return _mmsconv<imatrix,rmatrix_slice,imatrix>(m,ms); }
1880#if(CXSC_INDEX_CHECK)
1885 {
return _mmsconv<rmatrix,imatrix_slice,imatrix>(m,ms); }
1887#if(CXSC_INDEX_CHECK)
1892 {
return _msmsconv<rmatrix_slice,imatrix_slice,imatrix>(m1,m2); }
1894#if(CXSC_INDEX_CHECK)
1899 {
return _msmsconv<rmatrix_slice,imatrix_slice,imatrix>(m2,m1); }
1901#if(CXSC_INDEX_CHECK)
1906 {
return _mmconvassign(m1,m2); }
1908#if(CXSC_INDEX_CHECK)
1913 {
return _mmsconvassign(m1,ms); }
1915#if(CXSC_INDEX_CHECK)
1920 {
return _msmconvassign(*
this,m1); }
1922#if(CXSC_INDEX_CHECK)
1927 {
return _msmsconvassign(*
this,ms2); }
1929#if(CXSC_INDEX_CHECK)
1934 {
return _mmsect<rmatrix,imatrix,imatrix>(m1,m2); }
1936#if(CXSC_INDEX_CHECK)
1941 {
return _mmsect<rmatrix,imatrix,imatrix>(m2,m1); }
1943#if(CXSC_INDEX_CHECK)
1948 {
return _mmssect<rmatrix,imatrix_slice,imatrix>(m,ms); }
1950#if(CXSC_INDEX_CHECK)
1955 {
return _mmssect<imatrix,rmatrix_slice,imatrix>(m,ms); }
1957#if(CXSC_INDEX_CHECK)
1962 {
return _mmssect<imatrix,rmatrix_slice,imatrix>(m,ms); }
1964#if(CXSC_INDEX_CHECK)
1969 {
return _mmssect<rmatrix,imatrix_slice,imatrix>(m,ms); }
1971#if(CXSC_INDEX_CHECK)
1976 {
return _msmssect<rmatrix_slice,imatrix_slice,imatrix>(m1,m2); }
1978#if(CXSC_INDEX_CHECK)
1983 {
return _msmssect<rmatrix_slice,imatrix_slice,imatrix>(m2,m1); }
1985#if(CXSC_INDEX_CHECK)
1990 {
return _mmsectassign(m1,m2); }
1992#if(CXSC_INDEX_CHECK)
1997 {
return _mmssectassign(m1,ms); }
1999#if(CXSC_INDEX_CHECK)
2004 {
return _msmsectassign(*
this,m1); }
2006#if(CXSC_INDEX_CHECK)
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); }
2030 INLINE
bool operator !(
const imatrix &ms)
noexcept {
return _mnot(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); }
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)];
2049 for(
int i=0 ; i<
ColLen(A) ; i++)
2050 A[i+
Lb(A,1)] = (*this)[p[i+
Lb(p)]+
Lb(A,1)];
2064 return (*
this)(p,q);
The Data Type imatrix_slice.
imatrix_subv operator[](const int &i) noexcept
Operator for accessing a single row of the matrix.
imatrix_slice & operator+=(const imatrix &m1) noexcept
Implementation of addition and allocation operation.
imatrix_slice & operator=(const imatrix &m) noexcept
Implementation of standard assigning operator.
imatrix_slice & operator/=(const interval &c) noexcept
Implementation of division and allocation operation.
imatrix_slice & operator|=(const imatrix &m1) noexcept
Allocates the convex hull of the arguments to the first argument.
imatrix_slice & operator()() noexcept
Operator for accessing the whole matrix.
imatrix_slice & operator&=(const imatrix &m1) noexcept
Allocates the intersection of the arguments to the first argument.
imatrix_slice & operator-=(const imatrix &m1) noexcept
Implementation of subtraction and allocation operation.
imatrix_slice & operator*=(const imatrix &m) noexcept
Implementation of multiplication and allocation operation.
The Data Type imatrix_subv.
interval & operator[](const int &i) const noexcept
Operator for accessing the single elements of the vector (read-only)
imatrix_subv & operator*=(const interval &c) noexcept
Implementation of multiplication and allocation operation.
imatrix_subv & operator/=(const interval &c) noexcept
Implementation of division and allocation operation.
imatrix_subv & operator()() noexcept
Operator for accessing the whole vector.
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.
imatrix_subv & operator-=(const interval &c) noexcept
Implementation of subtraction and allocation operation.
imatrix_subv & operator&=(const sivector &rv)
Implementation of subtraction and allocation operation.
imatrix_subv & operator=(const simatrix_subv &rv)
Implementation of standard assigning operator.
imatrix & operator=(const interval &r) noexcept
Implementation of standard assigning operator.
imatrix() noexcept
Constructor of class imatrix.
imatrix_subv operator[](const int &i) const noexcept
Operator for accessing a single row of the matrix.
imatrix & operator()() noexcept
Operator for accessing the whole matrix.
The Scalar Type interval.
interval()
Constructor of class interval.
The Data Type ivector_slice.
ivector_slice & operator*=(const interval &r) noexcept
Implementation of multiplication and allocation operation.
ivector_slice & operator=(const sivector &sl)
Implementation of standard assigning operator.
ivector & operator=(const ivector &rv) noexcept
Implementation of standard assigning operator.
ivector & operator()() noexcept
Operator for accessing the whole vector.
ivector() noexcept
Constructor of class ivector.
The Data Type rmatrix_slice.
The Data Type rmatrix_subv.
The Data Type rvector_slice.
The namespace cxsc, providing all functionality of the class library C-XSC.
cdotprecision & operator+=(cdotprecision &cd, const l_complex &lc) noexcept
Implementation of standard algebraic addition and allocation operation.
cimatrix_subv Col(cimatrix &m, const int &i) noexcept
Returns one column of the matrix as a vector.
int ColLen(const cimatrix &)
Returns the column dimension.
civector operator/(const cimatrix_subv &rv, const cinterval &s) noexcept
Implementation of division operation.
cvector diam(const cimatrix_subv &mv) noexcept
Returns the diameter of the matrix.
rvector absmax(const imatrix_subv &mv) noexcept
Returns the absolute maximum value of the matrix.
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.
cimatrix_subv Row(cimatrix &m, const int &i) noexcept
Returns one row of the matrix as a vector.
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 .
ivector abs(const cimatrix_subv &mv) noexcept
Returns the absolute value of the matrix.
cvector mid(const cimatrix_subv &mv) noexcept
Returns the middle of the matrix.
civector operator*(const cimatrix_subv &rv, const cinterval &s) noexcept
Implementation of multiplication operation.
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.
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 .
cimatrix & operator/=(cimatrix &m, const cinterval &c) noexcept
Implementation of division and allocation operation.