26 #ifndef _CXSC_INTMATRIX_HPP_INCLUDED
27 #define _CXSC_INTMATRIX_HPP_INCLUDED
29 #include "xscclass.hpp"
32 #include "intvector.hpp"
39 class intmatrix_slice;
53 int size,start,offset;
84 #ifdef _CXSC_FRIEND_TPL
86 template <
class MV1,
class MV2>
friend MV1 &_mvmvassign(MV1 &v,
const MV2 &rv)
92 template <
class MV,
class S>
friend MV &_mvsassign(MV &v,
const S &r) noexcept;
93 template <
class MV,
class V>
friend MV &_mvvassign(MV &v,
const V &rv)
99 template <
class V,
class MV2,
class S>
friend V &_vmvassign(V &v,
const MV2 &rv) noexcept;
100 template <
class MV,
class V>
friend V _mvabs(
const MV &mv) noexcept;
101 template <
class DP,
class V,
class SV>
friend void _vmvaccu(DP &dp,
const V & rv1,
const SV &rv2)
102 #if(CXSC_INDEX_CHECK)
107 template <
class DP,
class MV1,
class MV2>
friend void _mvmvaccu(DP &dp,
const MV1 & rv1,
const MV2 &rv2)
108 #if(CXSC_INDEX_CHECK)
113 template <
class MV,
class S,
class E>
friend E _mvsmult(
const MV &rv,
const S &s) noexcept;
114 template <
class MV1,
class MV2,
class E>
friend E _mvmvplus(
const MV1 &rv1,
const MV2 &rv2)
115 #if(CXSC_INDEX_CHECK)
120 template <
class MV1,
class MV2,
class E>
friend E _mvmvminus(
const MV1 &rv1,
const MV2 &rv2)
121 #if(CXSC_INDEX_CHECK)
126 template <
class MV,
class V,
class E>
friend E _mvvplus(
const MV &rv1,
const V &rv2)
127 #if(CXSC_INDEX_CHECK)
132 template <
class MV,
class V,
class E>
friend E _mvvminus(
const MV &rv1,
const V &rv2)
133 #if(CXSC_INDEX_CHECK)
138 template <
class V,
class MV,
class E>
friend E _vmvminus(
const V &rv1,
const MV &rv2)
139 #if(CXSC_INDEX_CHECK)
144 template <
class MV,
class S,
class E>
friend E _mvsdiv(
const MV &rv,
const S &s) noexcept;
145 template <
class MV,
class S>
friend MV &_mvsmultassign(MV &v,
const S &r) noexcept;
146 template <
class MV,
class S>
friend MV &_mvsplusassign(MV &v,
const S &r) noexcept;
147 template <
class MV,
class S>
friend MV &_mvsminusassign(MV &v,
const S &r) noexcept;
148 template <
class MV,
class S>
friend MV &_mvsdivassign(MV &v,
const S &r) noexcept;
149 template <
class MV,
class V>
friend MV &_mvvplusassign(MV &v,
const V &rv)
150 #if(CXSC_INDEX_CHECK)
155 template <
class V,
class MV>
friend V &_vmvplusassign(V &rv,
const MV &v)
156 #if(CXSC_INDEX_CHECK)
161 template <
class MV,
class V>
friend MV &_mvvminusassign(MV &v,
const V &rv)
162 #if(CXSC_INDEX_CHECK)
167 template <
class V,
class MV>
friend V &_vmvminusassign(V &rv,
const MV &v)
168 #if(CXSC_INDEX_CHECK)
179 explicit INLINE
intmatrix_subv (
int *d,
const int &l,
const int &u,
const int &s,
const int &st,
const int &o) noexcept:dat(d),lb(l),ub(u),size(s),start(st),offset(o) { }
194 #if(CXSC_INDEX_CHECK)
201 #if(CXSC_INDEX_CHECK)
208 #if(CXSC_INDEX_CHECK)
215 #if(CXSC_INDEX_CHECK)
226 #if(CXSC_INDEX_CHECK)
235 #if(CXSC_INDEX_CHECK)
242 #if(CXSC_INDEX_CHECK)
258 #if(CXSC_INDEX_CHECK)
265 #if(CXSC_INDEX_CHECK)
272 #if(CXSC_INDEX_CHECK)
279 #if(CXSC_INDEX_CHECK)
291 INLINE intmatrix_subv
Row(intmatrix &m,
const int &i)
292 #if(CXSC_INDEX_CHECK)
297 INLINE intmatrix_subv
Col(intmatrix &m,
const int &i)
299 #if(CXSC_INDEX_CHECK)
308 class intmatrix_slice;
319 int lb1,ub1,lb2,ub2,xsize,ysize;
323 #ifdef _CXSC_FRIEND_TPL
325 template <
class S,
class M>
friend void _smconstr(S &s,
const M &m)
326 #if(CXSC_INDEX_CHECK)
331 template <
class V,
class M,
class S>
friend void _vmconstr(V &v,
const M &m)
332 #if(CXSC_INDEX_CHECK)
337 template <
class M1,
class M2,
class S>
friend M1 &_mmassign(M1 &m1,
const M2 &m,S ms) noexcept;
338 template <
class M,
class MS2,
class S>
friend M &_mmsassign(M &m,
const MS2 &ms) noexcept;
339 template <
class MS,
class M>
friend MS &_msmassign(MS &ms,
const M &m)
340 #if(CXSC_INDEX_CHECK)
345 template <
class M,
class S>
friend M &_msassign(M &m,
const S &r) noexcept;
346 template <
class V,
class M,
class S>
friend V &_vmassign(V &v,
const M &m)
347 #if(CXSC_INDEX_CHECK)
352 template <
class M,
class V,
class S>
friend M &_mvassign(M &m,
const V &v) noexcept;
353 template <
class M>
friend int _mlb(
const M &m,
const int &i)
354 #if(CXSC_INDEX_CHECK)
359 template <
class M>
friend int _mub(
const M &m,
const int &i)
360 #if(CXSC_INDEX_CHECK)
365 template <
class M>
friend M &_msetlb(M &m,
const int &i,
const int &j)
366 #if(CXSC_INDEX_CHECK)
371 template <
class M>
friend M &_msetub(M &m,
const int &i,
const int &j)
372 #if(CXSC_INDEX_CHECK)
377 template <
class M>
friend void _mresize(M &A) noexcept;
378 template <
class M,
class S>
friend void _mresize(M &A,
const int &m,
const int &n)
379 #if(CXSC_INDEX_CHECK)
384 template <
class M,
class S>
friend void _mresize(M &A,
const int &m1,
const int &m2,
const int &n1,
const int &n2)
385 #if(CXSC_INDEX_CHECK)
390 template <
class M,
class E>
friend E _mabs(
const M &m) noexcept;
391 template <
class MS,
class E>
friend E _msabs(
const MS &ms) noexcept;
393 template <
class M1,
class M2,
class E>
friend E _mmplus(
const M1 &m1,
const M2 &m2)
394 #if(CXSC_INDEX_CHECK)
399 template <
class M,
class MS,
class E>
friend E _mmsplus(
const M &m,
const MS &ms)
400 #if(CXSC_INDEX_CHECK)
405 template <
class MS1,
class MS2,
class E>
friend E _msmsplus(
const MS1 &m1,
const MS2 &m2)
406 #if(CXSC_INDEX_CHECK)
411 template <
class M>
friend M _mminus(
const M &m) noexcept;
412 template <
class MS,
class E>
friend E _msminus(
const MS &ms) noexcept;
413 template <
class M1,
class M2,
class E>
friend E _mmminus(
const M1 &m1,
const M2 &m2)
414 #if(CXSC_INDEX_CHECK)
419 template <
class M1,
class M2>
friend M1 &_mmplusassign(M1 &m1,
const M2 &m2)
420 #if(CXSC_INDEX_CHECK)
425 template <
class M,
class MS>
friend M &_mmsplusassign(M &m1,
const MS &ms)
426 #if(CXSC_INDEX_CHECK)
431 template <
class MS,
class M>
friend MS &_msmplusassign(MS &ms,
const M &m1)
432 #if(CXSC_INDEX_CHECK)
437 template <
class M,
class MS,
class E>
friend E _mmsminus(
const M &m,
const MS &ms)
438 #if(CXSC_INDEX_CHECK)
443 template <
class MS,
class M,
class E>
friend E _msmminus(
const MS &ms,
const M &m)
444 #if(CXSC_INDEX_CHECK)
449 template <
class MS1,
class MS2,
class E>
friend E _msmsminus(
const MS1 &ms1,
const MS2 &ms2)
450 #if(CXSC_INDEX_CHECK)
455 template <
class M1,
class M2>
friend M1 &_mmminusassign(M1 &m1,
const M2 &m2)
456 #if(CXSC_INDEX_CHECK)
461 template <
class M,
class MS>
friend M &_mmsminusassign(M &m1,
const MS &ms)
462 #if(CXSC_INDEX_CHECK)
467 template <
class MS,
class M>
friend MS &_msmminusassign(MS &ms,
const M &m1)
468 #if(CXSC_INDEX_CHECK)
474 template <
class S,
class M,
class E>
friend E _smmult(
const S &c,
const M &m) noexcept;
475 template <
class M,
class S>
friend M &_msmultassign(M &m,
const S &c) noexcept;
476 template <
class S,
class MS,
class E>
friend E _smsmult(
const S &c,
const MS &ms) noexcept;
477 template <
class M,
class S,
class E>
friend E _msdiv(
const M &m,
const S &c) noexcept;
478 template <
class M,
class S>
friend M &_msdivassign(M &m,
const S &c) noexcept;
479 template <
class MS,
class S,
class E>
friend E _mssdiv(
const MS &ms,
const S &c) noexcept;
482 template <
class M>
friend void *_mvoid(
const M &m) noexcept;
483 template <
class M>
friend bool _mnot(
const M &m) noexcept;
484 template <
class MS>
friend void *_msvoid(
const MS &ms) noexcept;
485 template <
class MS>
friend bool _msnot(
const MS &ms) noexcept;
486 template <
class M1,
class M2>
friend bool _mmeq(
const M1 &m1,
const M2 &m2) noexcept;
487 template <
class M1,
class M2>
friend bool _mmneq(
const M1 &m1,
const M2 &m2) noexcept;
488 template <
class M1,
class M2>
friend bool _mmless(
const M1 &m1,
const M2 &m2) noexcept;
489 template <
class M1,
class M2>
friend bool _mmleq(
const M1 &m1,
const M2 &m2) noexcept;
490 template <
class M,
class MS>
friend bool _mmseq(
const M &m1,
const MS &ms) noexcept;
491 template <
class M,
class MS>
friend bool _mmsneq(
const M &m1,
const MS &ms) noexcept;
492 template <
class M,
class MS>
friend bool _mmsless(
const M &m1,
const MS &ms) noexcept;
493 template <
class M,
class MS>
friend bool _mmsleq(
const M &m1,
const MS &ms) noexcept;
494 template <
class MS,
class M>
friend bool _msmless(
const MS &ms,
const M &m1) noexcept;
495 template <
class MS,
class M>
friend bool _msmleq(
const MS &ms,
const M &m1) noexcept;
496 template <
class M>
friend std::ostream &_mout(std::ostream &s,
const M &r) noexcept;
497 template <
class M>
friend std::istream &_min(std::istream &s,M &r) noexcept;
510 explicit INLINE
intmatrix(
const int &m,
const int &n)
511 #if(CXSC_INDEX_CHECK)
516 explicit INLINE
intmatrix(
const int &m1,
const int &n1,
const int &m2,
const int &n2)
518 #if(CXSC_INDEX_CHECK)
528 explicit INLINE
intmatrix(
const int &r) noexcept;
542 INLINE ~
intmatrix() noexcept {
delete [] dat; }
547 #if(CXSC_INDEX_CHECK)
554 #if(CXSC_INDEX_CHECK)
561 #if(CXSC_INDEX_CHECK)
570 #if(CXSC_INDEX_CHECK)
577 #if(CXSC_INDEX_CHECK)
582 INLINE
operator void*() noexcept;
598 int offset1,offset2,mxsize,mysize;
599 int start1,end1,start2,end2,sxsize,sysize;
603 #ifdef _CXSC_FRIEND_TPL
605 template <
class V,
class MS,
class S>
friend void _vmsconstr(V &v,
const MS &m)
606 #if(CXSC_INDEX_CHECK)
611 template <
class MS,
class M>
friend MS &_msmassign(MS &ms,
const M &m)
612 #if(CXSC_INDEX_CHECK)
617 template <
class MS1,
class MS2>
friend MS1 &_msmsassign(MS1 &ms1,
const MS2 &ms)
618 #if(CXSC_INDEX_CHECK)
623 template <
class M,
class MS2,
class S>
friend M &_mmsassign(M &m,
const MS2 &ms) noexcept;
624 template <
class MS,
class S>
friend MS &_mssassign(MS &ms,
const S &r) noexcept;
625 template <
class MS>
friend int _mslb(
const MS &ms,
const int &i)
626 #if(CXSC_INDEX_CHECK)
631 template <
class MS>
friend int _msub(
const MS &ms,
const int &i)
632 #if(CXSC_INDEX_CHECK)
637 template <
class MS,
class E>
friend E _msabs(
const MS &ms) noexcept;
639 template <
class MS,
class E>
friend E _msminus(
const MS &ms) noexcept;
640 template <
class M,
class MS,
class E>
friend E _mmsplus(
const M &m,
const MS &ms)
641 #if(CXSC_INDEX_CHECK)
646 template <
class MS1,
class MS2,
class E>
friend E _msmsplus(
const MS1 &m1,
const MS2 &m2)
647 #if(CXSC_INDEX_CHECK)
652 template <
class M,
class MS>
friend M &_mmsplusassign(M &m1,
const MS &ms)
653 #if(CXSC_INDEX_CHECK)
658 template <
class MS,
class M>
friend MS &_msmplusassign(MS &ms,
const M &m1)
659 #if(CXSC_INDEX_CHECK)
664 template <
class MS1,
class MS2>
friend MS1 &_msmsplusassign(MS1 &ms1,
const MS2 &ms2)
665 #if(CXSC_INDEX_CHECK)
670 template <
class M,
class MS,
class E>
friend E _mmsminus(
const M &m,
const MS &ms)
671 #if(CXSC_INDEX_CHECK)
676 template <
class MS,
class M,
class E>
friend E _msmminus(
const MS &ms,
const M &m)
677 #if(CXSC_INDEX_CHECK)
682 template <
class MS1,
class MS2,
class E>
friend E _msmsminus(
const MS1 &ms1,
const MS2 &ms2)
683 #if(CXSC_INDEX_CHECK)
688 template <
class M,
class MS>
friend M &_mmsminusassign(M &m1,
const MS &ms)
689 #if(CXSC_INDEX_CHECK)
694 template <
class MS,
class M>
friend MS &_msmminusassign(MS &ms,
const M &m1)
695 #if(CXSC_INDEX_CHECK)
700 template <
class MS1,
class MS2>
friend MS1 &_msmsminusassign(MS1 &ms1,
const MS2 &ms2)
701 #if(CXSC_INDEX_CHECK)
707 template <
class S,
class MS,
class E>
friend E _smsmult(
const S &c,
const MS &ms) noexcept;
708 template <
class MS,
class S>
friend MS &_mssmultassign(MS &ms,
const S &c) noexcept;
709 template <
class MS,
class S,
class E>
friend E _mssdiv(
const MS &ms,
const S &c) noexcept;
710 template <
class MS,
class S>
friend MS &_mssdivassign(MS &ms,
const S &c) noexcept;
712 template <
class MS>
friend void *_msvoid(
const MS &ms) noexcept;
713 template <
class MS>
friend bool _msnot(
const MS &ms) noexcept;
714 template <
class M,
class MS>
friend bool _mmseq(
const M &m1,
const MS &ms) noexcept;
715 template <
class M,
class MS>
friend bool _mmsneq(
const M &m1,
const MS &ms) noexcept;
716 template <
class M,
class MS>
friend bool _mmsless(
const M &m1,
const MS &ms) noexcept;
717 template <
class M,
class MS>
friend bool _mmsleq(
const M &m1,
const MS &ms) noexcept;
718 template <
class MS,
class M>
friend bool _msmless(
const MS &ms,
const M &m1) noexcept;
719 template <
class MS,
class M>
friend bool _msmleq(
const MS &ms,
const M &m1) noexcept;
720 template <
class MS1,
class MS2>
friend bool _msmseq(
const MS1 &ms1,
const MS2 &ms2) noexcept;
721 template <
class MS1,
class MS2>
friend bool _msmsneq(
const MS1 &ms1,
const MS2 &ms2) noexcept;
722 template <
class MS1,
class MS2>
friend bool _msmsless(
const MS1 &ms1,
const MS2 &ms2) noexcept;
723 template <
class MS1,
class MS2>
friend bool _msmsleq(
const MS1 &ms1,
const MS2 &ms2) noexcept;
724 template <
class MS>
friend std::ostream &_msout(std::ostream &s,
const MS &r) noexcept;
725 template <
class MS>
friend std::istream &_msin(std::istream &s,MS &r) noexcept;
733 explicit INLINE
intmatrix_slice(
intmatrix &a,
const int &l1,
const int &u1,
const int &l2,
const int &u2) noexcept:dat(a.dat),offset1(l1-a.lb1),offset2(l2-a.lb2),mxsize(a.xsize),mysize(a.ysize),start1(l1),end1(u1),start2(l2),end2(u2),sxsize(u2-l2+1),sysize(u1-l1+1) { }
735 explicit INLINE
intmatrix_slice(
intmatrix_slice &a,
const int &l1,
const int &u1,
const int &l2,
const int &u2) noexcept:dat(a.dat),offset1(a.offset1+l1-a.start1),offset2(a.offset2+l2-a.start2),mxsize(a.mxsize),mysize(a.mysize),start1(l1),end1(u1),start2(l2),end2(u2),sxsize(u2-l2+1),sysize(u1-l1+1) { }
738 INLINE
intmatrix_slice(
const intmatrix_slice &ms) noexcept:dat(ms.dat),offset1(ms.offset1),offset2(ms.offset2),mxsize(ms.mxsize),mysize(ms.mysize),start1(ms.start1),end1(ms.end1),start2(ms.start2),end2(ms.end2),sxsize(ms.sxsize),sysize(ms.sysize) { }
744 #if(CXSC_INDEX_CHECK)
752 #if(CXSC_INDEX_CHECK)
759 #if(CXSC_INDEX_CHECK)
768 #if(CXSC_INDEX_CHECK)
775 #if(CXSC_INDEX_CHECK)
782 #if(CXSC_INDEX_CHECK)
789 #if(CXSC_INDEX_CHECK)
796 #if(CXSC_INDEX_CHECK)
805 #if(CXSC_INDEX_CHECK)
812 #if(CXSC_INDEX_CHECK)
819 #if(CXSC_INDEX_CHECK)
826 #if(CXSC_INDEX_CHECK)
833 #if(CXSC_INDEX_CHECK)
840 #if(CXSC_INDEX_CHECK)
849 INLINE
operator void*() noexcept;
860 INLINE intvector
operator /(
const intmatrix_subv &rv,
const int &s) noexcept;
862 INLINE intvector
operator *(
const intmatrix_subv &rv,
const int &s) noexcept;
864 INLINE intvector
operator *(
const int &s,
const intmatrix_subv &rv) noexcept;
866 INLINE intvector
abs(
const intmatrix_subv &mv) noexcept;
871 INLINE
void accumulate(dotprecision &dp,
const intmatrix_subv & rv1,
const intmatrix_subv &rv2)
872 #if(CXSC_INDEX_CHECK)
877 INLINE
void accumulate(dotprecision &dp,
const intvector & rv1,
const intmatrix_subv &rv2)
879 #if(CXSC_INDEX_CHECK)
884 INLINE
void accumulate(dotprecision &dp,
const intmatrix_subv & rv1,
const intvector &rv2)
886 #if(CXSC_INDEX_CHECK)
891 INLINE
void accumulate(dotprecision &dp,
const intvector_slice &sl,
const intmatrix_subv &sv)
893 #if(CXSC_INDEX_CHECK)
898 INLINE
void accumulate(dotprecision &dp,
const intmatrix_subv &mv,
const intvector_slice &vs)
900 #if(CXSC_INDEX_CHECK)
907 INLINE intvector operator +(
const intmatrix_subv & rv1,
const intmatrix_subv &rv2)
908 #if(CXSC_INDEX_CHECK)
913 INLINE intvector operator +(
const intmatrix_subv &rv1,
const intvector &rv2)
915 #if(CXSC_INDEX_CHECK)
920 INLINE intvector operator +(
const intvector & rv1,
const intmatrix_subv &rv2)
922 #if(CXSC_INDEX_CHECK)
927 INLINE intvector operator +(
const intvector_slice &sl,
const intmatrix_subv &mv)
929 #if(CXSC_INDEX_CHECK)
934 INLINE intvector operator +(
const intmatrix_subv &mv,
const intvector_slice &sl)
936 #if(CXSC_INDEX_CHECK)
943 INLINE intvector operator -(
const intmatrix_subv & rv1,
const intmatrix_subv &rv2)
944 #if(CXSC_INDEX_CHECK)
949 INLINE intvector operator -(
const intvector & rv1,
const intmatrix_subv &rv2)
951 #if(CXSC_INDEX_CHECK)
956 INLINE intvector operator -(
const intmatrix_subv &rv1,
const intvector &rv2)
958 #if(CXSC_INDEX_CHECK)
963 INLINE intvector operator -(
const intvector_slice &sl,
const intmatrix_subv &mv)
965 #if(CXSC_INDEX_CHECK)
970 INLINE intvector operator -(
const intmatrix_subv &mv,
const intvector_slice &sl)
972 #if(CXSC_INDEX_CHECK)
982 INLINE intmatrix
_intmatrix(
const intmatrix &rm) noexcept;
984 INLINE intmatrix
_intmatrix(
const intvector &v) noexcept;
986 INLINE intmatrix
_intmatrix(
const intvector_slice &v) noexcept;
988 INLINE intmatrix
_intmatrix(
const int &r) noexcept;
991 INLINE
int Lb(
const intmatrix &rm,
const int &i)
992 #if(CXSC_INDEX_CHECK)
997 INLINE
int Ub(
const intmatrix &rm,
const int &i)
999 #if(CXSC_INDEX_CHECK)
1004 INLINE
int Lb(
const intmatrix_slice &rm,
const int &i)
1006 #if(CXSC_INDEX_CHECK)
1011 INLINE
int Ub(
const intmatrix_slice &rm,
const int &i)
1013 #if(CXSC_INDEX_CHECK)
1018 INLINE intmatrix &
SetLb(intmatrix &m,
const int &i,
const int &j)
1020 #if(CXSC_INDEX_CHECK)
1025 INLINE intmatrix &
SetUb(intmatrix &m,
const int &i,
const int &j)
1027 #if(CXSC_INDEX_CHECK)
1032 INLINE
void Resize(intmatrix &A) noexcept;
1035 INLINE
void Resize(intmatrix &A,
const int &m,
const int &n)
1036 #if(CXSC_INDEX_CHECK)
1041 INLINE
void Resize(intmatrix &A,
const int &m1,
const int &m2,
const int &n1,
const int &n2)
1043 #if(CXSC_INDEX_CHECK)
1050 INLINE intmatrix
abs(
const intmatrix &m) noexcept;
1052 INLINE intmatrix
abs(
const intmatrix_slice &ms) noexcept;
1057 INLINE intmatrix
operator *(
const int &c,
const intmatrix &m) noexcept;
1059 INLINE intmatrix
operator *(
const int &c,
const intmatrix_slice &ms) noexcept;
1061 INLINE intmatrix
operator *(
const intmatrix &m,
const int &c) noexcept;
1063 INLINE intmatrix
operator *(
const intmatrix_slice &ms,
const int &c) noexcept;
1065 INLINE intmatrix &
operator *=(intmatrix &m,
const int &c) noexcept;
1067 INLINE intmatrix
operator /(
const intmatrix &m,
const int &c) noexcept;
1069 INLINE intmatrix
operator /(
const intmatrix_slice &ms,
const int &c) noexcept;
1071 INLINE intmatrix &
operator /=(intmatrix &m,
const int &c) noexcept;
1077 INLINE
const intmatrix &operator +(
const intmatrix &m1) noexcept;
1079 INLINE intmatrix operator +(
const intmatrix_slice &ms) noexcept;
1081 INLINE intmatrix operator +(
const intmatrix &m1,
const intmatrix &m2)
1082 #if(CXSC_INDEX_CHECK)
1087 INLINE intmatrix operator +(
const intmatrix &m,
const intmatrix_slice &ms)
1089 #if(CXSC_INDEX_CHECK)
1094 INLINE intmatrix operator +(
const intmatrix_slice &ms,
const intmatrix &m)
1096 #if(CXSC_INDEX_CHECK)
1101 INLINE intmatrix operator +(
const intmatrix_slice &m1,
const intmatrix_slice &m2)
1103 #if(CXSC_INDEX_CHECK)
1108 INLINE intmatrix &
operator +=(intmatrix &m1,
const intmatrix &m2)
1110 #if(CXSC_INDEX_CHECK)
1115 INLINE intmatrix &
operator +=(intmatrix &m1,
const intmatrix_slice &ms)
1117 #if(CXSC_INDEX_CHECK)
1124 INLINE intmatrix operator -(
const intmatrix &m) noexcept;
1126 INLINE intmatrix operator -(
const intmatrix_slice &ms) noexcept;
1128 INLINE intmatrix operator -(
const intmatrix &m1,
const intmatrix &m2)
1129 #if(CXSC_INDEX_CHECK)
1134 INLINE intmatrix operator -(
const intmatrix &m,
const intmatrix_slice &ms)
1136 #if(CXSC_INDEX_CHECK)
1141 INLINE intmatrix operator -(
const intmatrix_slice &ms,
const intmatrix &m)
1143 #if(CXSC_INDEX_CHECK)
1148 INLINE intmatrix operator -(
const intmatrix_slice &ms1,
const intmatrix_slice &ms2)
1150 #if(CXSC_INDEX_CHECK)
1155 INLINE intmatrix &operator -=(intmatrix &m1,
const intmatrix &m2)
1157 #if(CXSC_INDEX_CHECK)
1162 INLINE intmatrix &operator -=(intmatrix &m1,
const intmatrix_slice &ms)
1164 #if(CXSC_INDEX_CHECK)
1176 INLINE
bool operator ==(
const intmatrix &m1,
const intmatrix &m2) noexcept;
1178 INLINE
bool operator !=(
const intmatrix &m1,
const intmatrix &m2) noexcept;
1180 INLINE
bool operator <(
const intmatrix &m1,
const intmatrix &m2) noexcept;
1182 INLINE
bool operator <=(
const intmatrix &m1,
const intmatrix &m2) noexcept;
1184 INLINE
bool operator >(
const intmatrix &m1,
const intmatrix &m2) noexcept;
1186 INLINE
bool operator >=(
const intmatrix &m1,
const intmatrix &m2) noexcept;
1188 INLINE
bool operator ==(
const intmatrix &m1,
const intmatrix_slice &ms) noexcept;
1190 INLINE
bool operator !=(
const intmatrix &m1,
const intmatrix_slice &ms) noexcept;
1192 INLINE
bool operator <(
const intmatrix &m1,
const intmatrix_slice &ms) noexcept;
1194 INLINE
bool operator <=(
const intmatrix &m1,
const intmatrix_slice &ms) noexcept;
1196 INLINE
bool operator >(
const intmatrix &m1,
const intmatrix_slice &ms) noexcept;
1198 INLINE
bool operator >=(
const intmatrix &m1,
const intmatrix_slice &ms) noexcept;
1203 INLINE
bool operator ==(
const intmatrix_slice &m1,
const intmatrix_slice &m2) noexcept;
1205 INLINE
bool operator !=(
const intmatrix_slice &m1,
const intmatrix_slice &m2) noexcept;
1207 INLINE
bool operator <(
const intmatrix_slice &m1,
const intmatrix_slice &m2) noexcept;
1209 INLINE
bool operator <=(
const intmatrix_slice &m1,
const intmatrix_slice &m2) noexcept;
1211 INLINE
bool operator >(
const intmatrix_slice &m1,
const intmatrix_slice &m2) noexcept;
1213 INLINE
bool operator >=(
const intmatrix_slice &m1,
const intmatrix_slice &m2) noexcept;
1218 INLINE
bool operator !(
const intmatrix &ms) noexcept;
1220 INLINE
bool operator !(
const intmatrix_slice &ms) noexcept;
1225 INLINE std::ostream &operator <<(std::ostream &s,
const intmatrix &r) noexcept;
1227 INLINE std::ostream &operator <<(std::ostream &s,
const intmatrix_slice &r) noexcept;
1229 INLINE std::istream &operator >>(std::istream &s,intmatrix &r) noexcept;
1231 INLINE std::istream &operator >>(std::istream &s,intmatrix_slice &r) noexcept;
1234 INLINE
int RowLen (
const intmatrix& );
1236 INLINE
int ColLen (
const intmatrix& );
1239 INLINE
int RowLen (
const intmatrix_slice& );
1241 INLINE
int ColLen (
const intmatrix_slice& );
1243 intmatrix
Id (
const intmatrix& );
1245 intmatrix
transp (
const intmatrix& );
1251 INLINE intvector permvec(
const intmatrix&);
1252 INLINE intmatrix permmat(
const intvector&);
1253 INLINE intmatrix perminv(
const intmatrix&);
1257 #ifdef _CXSC_INCL_INL
1258 # include "matrix.inl"
1259 # include "intmatrix.inl"