26 #ifndef _CXSC_RMATRIX_HPP_INCLUDED
27 #define _CXSC_RMATRIX_HPP_INCLUDED
29 #include "xscclass.hpp"
34 #include "rvector.hpp"
66 int size,start,offset;
101 #ifdef _CXSC_FRIEND_TPL
103 template <
class MV1,
class MV2>
friend MV1 &_mvmvassign(MV1 &v,
const MV2 &rv)
104 #if(CXSC_INDEX_CHECK)
109 template <
class MV,
class S>
friend MV &_mvsassign(MV &v,
const S &r) noexcept;
110 template <
class MV,
class V>
friend MV &_mvvassign(MV &v,
const V &rv)
111 #if(CXSC_INDEX_CHECK)
116 template <
class V,
class MV2,
class S>
friend V &_vmvassign(V &v,
const MV2 &rv) noexcept;
117 template <
class MV,
class V>
friend V _mvabs(
const MV &mv) noexcept;
118 template <
class DP,
class V,
class SV>
friend void _vmvaccu(DP &dp,
const V & rv1,
const SV &rv2)
119 #if(CXSC_INDEX_CHECK)
125 template <
class DP,
class MV1,
class MV2>
friend void _mvmvaccu(DP &dp,
const MV1 & rv1,
const MV2 &rv2)
126 #if(CXSC_INDEX_CHECK)
132 template <
class MV1,
class MV2,
class S>
friend S _mvmvmult(
const MV1 & rv1,
const MV2 &rv2)
133 #if(CXSC_INDEX_CHECK)
138 template <
class V,
class MV,
class S>
friend S _vmvmult(
const V &rv1,
const MV &rv2)
139 #if(CXSC_INDEX_CHECK)
144 template <
class MV,
class S,
class E>
friend E _mvsmult(
const MV &rv,
const S &s) noexcept;
145 template <
class MV1,
class MV2,
class E>
friend E _mvmvplus(
const MV1 &rv1,
const MV2 &rv2)
146 #if(CXSC_INDEX_CHECK)
151 template <
class MV1,
class MV2,
class E>
friend E _mvmvminus(
const MV1 &rv1,
const MV2 &rv2)
152 #if(CXSC_INDEX_CHECK)
157 template <
class MV,
class V,
class E>
friend E _mvvplus(
const MV &rv1,
const V &rv2)
158 #if(CXSC_INDEX_CHECK)
163 template <
class MV,
class V,
class E>
friend E _mvvminus(
const MV &rv1,
const V &rv2)
164 #if(CXSC_INDEX_CHECK)
169 template <
class V,
class MV,
class E>
friend E _vmvminus(
const V &rv1,
const MV &rv2)
170 #if(CXSC_INDEX_CHECK)
175 template <
class MV,
class S,
class E>
friend E _mvsdiv(
const MV &rv,
const S &s) noexcept;
176 template <
class MV,
class S>
friend MV &_mvsmultassign(MV &v,
const S &r) noexcept;
177 template <
class MV,
class S>
friend MV &_mvsplusassign(MV &v,
const S &r) noexcept;
178 template <
class MV,
class S>
friend MV &_mvsminusassign(MV &v,
const S &r) noexcept;
179 template <
class MV,
class S>
friend MV &_mvsdivassign(MV &v,
const S &r) noexcept;
180 template <
class MV,
class V>
friend MV &_mvvplusassign(MV &v,
const V &rv)
181 #if(CXSC_INDEX_CHECK)
186 template <
class V,
class MV>
friend V &_vmvplusassign(V &rv,
const MV &v)
187 #if(CXSC_INDEX_CHECK)
192 template <
class MV,
class V>
friend MV &_mvvminusassign(MV &v,
const V &rv)
193 #if(CXSC_INDEX_CHECK)
198 template <
class V,
class MV>
friend V &_vmvminusassign(V &rv,
const MV &v)
199 #if(CXSC_INDEX_CHECK)
204 template <
class MV1,
class MV2,
class E>
friend E _mvmvconv(
const MV1 &rv1,
const MV2 &rv2)
205 #if(CXSC_INDEX_CHECK)
210 template <
class MV,
class V,
class E>
friend E _mvvconv(
const MV &rv1,
const V &rv2)
211 #if(CXSC_INDEX_CHECK)
220 template <
class V,
class MV>
friend V &_vmvsetinf(V &rv,
const MV &v)
221 #if(CXSC_INDEX_CHECK)
226 template <
class V,
class MV>
friend V &_vmvsetsup(V &rv,
const MV &v)
227 #if(CXSC_INDEX_CHECK)
232 template <
class V,
class MV>
friend V &_vmvusetinf(V &rv,
const MV &v)
233 #if(CXSC_INDEX_CHECK)
238 template <
class V,
class MV>
friend V &_vmvusetsup(V &rv,
const MV &v)
239 #if(CXSC_INDEX_CHECK)
248 template <
class V,
class MV>
friend V &_vmvsetim(V &rv,
const MV &v)
249 #if(CXSC_INDEX_CHECK)
254 template <
class V,
class MV>
friend V &_vmvsetre(V &rv,
const MV &v)
255 #if(CXSC_INDEX_CHECK)
266 explicit INLINE
rmatrix_subv (
real *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) { }
287 #if(CXSC_INDEX_CHECK)
294 #if(CXSC_INDEX_CHECK)
301 #if(CXSC_INDEX_CHECK)
308 #if(CXSC_INDEX_CHECK)
322 #if(CXSC_INDEX_CHECK)
330 #if(CXSC_INDEX_CHECK)
340 #if(CXSC_INDEX_CHECK)
347 #if(CXSC_INDEX_CHECK)
378 #if(CXSC_INDEX_CHECK)
385 #if(CXSC_INDEX_CHECK)
392 #if(CXSC_INDEX_CHECK)
399 #if(CXSC_INDEX_CHECK)
412 #if(CXSC_INDEX_CHECK)
420 #if(CXSC_INDEX_CHECK)
428 #if(CXSC_INDEX_CHECK)
436 #if(CXSC_INDEX_CHECK)
481 int lb1,ub1,lb2,ub2,xsize,ysize;
484 double* to_blas_array()
const {
return (
double*)dat; }
486 #ifdef _CXSC_FRIEND_TPL
488 template <
class S,
class M>
friend void _smconstr(S &s,
const M &m)
489 #if(CXSC_INDEX_CHECK)
494 template <
class V,
class M,
class S>
friend void _vmconstr(V &v,
const M &m)
495 #if(CXSC_INDEX_CHECK)
500 template <
class M1,
class M2,
class S>
friend M1 &_mmassign(M1 &m1,
const M2 &m,S ms) noexcept;
501 template <
class M,
class MS2,
class S>
friend M &_mmsassign(M &m,
const MS2 &ms) noexcept;
502 template <
class MS,
class M>
friend MS &_msmassign(MS &ms,
const M &m)
503 #if(CXSC_INDEX_CHECK)
508 template <
class M,
class S>
friend M &_msassign(M &m,
const S &r) noexcept;
509 template <
class V,
class M,
class S>
friend V &_vmassign(V &v,
const M &m)
510 #if(CXSC_INDEX_CHECK)
515 template <
class M,
class V,
class S>
friend M &_mvassign(M &m,
const V &v) noexcept;
516 template <
class M>
friend int _mlb(
const M &m,
const int &i)
517 #if(CXSC_INDEX_CHECK)
522 template <
class M>
friend int _mub(
const M &m,
const int &i)
523 #if(CXSC_INDEX_CHECK)
528 template <
class M>
friend M &_msetlb(M &m,
const int &i,
const int &j)
529 #if(CXSC_INDEX_CHECK)
534 template <
class M>
friend M &_msetub(M &m,
const int &i,
const int &j)
535 #if(CXSC_INDEX_CHECK)
540 template <
class M>
friend void _mresize(M &A) noexcept;
541 template <
class M,
class S>
friend void _mresize(M &A,
const int &m,
const int &n)
542 #if(CXSC_INDEX_CHECK)
547 template <
class M,
class S>
friend void _mresize(M &A,
const int &m1,
const int &m2,
const int &n1,
const int &n2)
548 #if(CXSC_INDEX_CHECK)
553 template <
class M,
class E>
friend E _mabs(
const M &m) noexcept;
554 template <
class MS,
class E>
friend E _msabs(
const MS &ms) noexcept;
556 template <
class M1,
class M2,
class E>
friend E _mmplus(
const M1 &m1,
const M2 &m2)
557 #if(CXSC_INDEX_CHECK)
562 template <
class M,
class MS,
class E>
friend E _mmsplus(
const M &m,
const MS &ms)
563 #if(CXSC_INDEX_CHECK)
568 template <
class MS1,
class MS2,
class E>
friend E _msmsplus(
const MS1 &m1,
const MS2 &m2)
569 #if(CXSC_INDEX_CHECK)
574 template <
class M>
friend M _mminus(
const M &m) noexcept;
575 template <
class MS,
class E>
friend E _msminus(
const MS &ms) noexcept;
576 template <
class M1,
class M2,
class E>
friend E _mmminus(
const M1 &m1,
const M2 &m2)
577 #if(CXSC_INDEX_CHECK)
582 template <
class M1,
class M2>
friend M1 &_mmplusassign(M1 &m1,
const M2 &m2)
583 #if(CXSC_INDEX_CHECK)
588 template <
class M,
class MS>
friend M &_mmsplusassign(M &m1,
const MS &ms)
589 #if(CXSC_INDEX_CHECK)
594 template <
class MS,
class M>
friend MS &_msmplusassign(MS &ms,
const M &m1)
595 #if(CXSC_INDEX_CHECK)
600 template <
class M,
class MS,
class E>
friend E _mmsminus(
const M &m,
const MS &ms)
601 #if(CXSC_INDEX_CHECK)
606 template <
class MS,
class M,
class E>
friend E _msmminus(
const MS &ms,
const M &m)
607 #if(CXSC_INDEX_CHECK)
612 template <
class MS1,
class MS2,
class E>
friend E _msmsminus(
const MS1 &ms1,
const MS2 &ms2)
613 #if(CXSC_INDEX_CHECK)
618 template <
class M1,
class M2>
friend M1 &_mmminusassign(M1 &m1,
const M2 &m2)
619 #if(CXSC_INDEX_CHECK)
624 template <
class M,
class MS>
friend M &_mmsminusassign(M &m1,
const MS &ms)
625 #if(CXSC_INDEX_CHECK)
630 template <
class MS,
class M>
friend MS &_msmminusassign(MS &ms,
const M &m1)
631 #if(CXSC_INDEX_CHECK)
636 template <
class M1,
class M2,
class E>
friend E _mmmult(
const M1 &m1,
const M2 &m2)
637 #if(CXSC_INDEX_CHECK)
642 template <
class M1,
class M2,
class S>
friend M1 &_mmmultassign(M1 &m1,
const M2 &m2)
643 #if(CXSC_INDEX_CHECK)
648 template <
class M,
class MS,
class E>
friend E _mmsmult(
const M &m1,
const MS &ms)
649 #if(CXSC_INDEX_CHECK)
654 template <
class MS,
class M,
class E>
friend E _msmmult(
const MS &ms,
const M &m2)
655 #if(CXSC_INDEX_CHECK)
660 template <
class M,
class MS,
class S>
friend M &_mmsmultassign(M &m1,
const MS &ms)
661 #if(CXSC_INDEX_CHECK)
666 template <
class MS1,
class MS2,
class E>
friend E _msmsmult(
const MS1 &ms1,
const MS2 &ms2)
667 #if(CXSC_INDEX_CHECK)
672 template <
class M1,
class M2,
class E>
friend E _mmconv(
const M1 &m1,
const M2 &m2)
673 #if(CXSC_INDEX_CHECK)
678 template <
class M,
class MS,
class E>
friend E _mmsconv(
const M &m,
const MS &ms)
679 #if(CXSC_INDEX_CHECK)
685 template <
class S,
class M,
class E>
friend E _smmult(
const S &c,
const M &m) noexcept;
686 template <
class M,
class S>
friend M &_msmultassign(M &m,
const S &c) noexcept;
687 template <
class S,
class MS,
class E>
friend E _smsmult(
const S &c,
const MS &ms) noexcept;
688 template <
class M,
class S,
class E>
friend E _msdiv(
const M &m,
const S &c) noexcept;
689 template <
class M,
class S>
friend M &_msdivassign(M &m,
const S &c) noexcept;
690 template <
class MS,
class S,
class E>
friend E _mssdiv(
const MS &ms,
const S &c) noexcept;
692 template <
class M,
class V,
class E>
friend E _mvmult(
const M &m,
const V &v)
693 #if(CXSC_INDEX_CHECK)
698 template <
class V,
class M,
class E>
friend E _vmmult(
const V &v,
const M &m)
699 #if(CXSC_INDEX_CHECK)
704 template <
class V,
class M,
class S>
friend V &_vmmultassign(V &v,
const M &m)
705 #if(CXSC_INDEX_CHECK)
710 template <
class VS,
class M,
class S>
friend VS &_vsmmultassign(VS &v,
const M &m)
711 #if(CXSC_INDEX_CHECK)
717 template <
class M>
friend void *_mvoid(
const M &m) noexcept;
718 template <
class M>
friend bool _mnot(
const M &m) noexcept;
719 template <
class MS>
friend void *_msvoid(
const MS &ms) noexcept;
720 template <
class MS>
friend bool _msnot(
const MS &ms) noexcept;
721 template <
class M1,
class M2>
friend bool _mmeq(
const M1 &m1,
const M2 &m2) noexcept;
722 template <
class M1,
class M2>
friend bool _mmneq(
const M1 &m1,
const M2 &m2) noexcept;
723 template <
class M1,
class M2>
friend bool _mmless(
const M1 &m1,
const M2 &m2) noexcept;
724 template <
class M1,
class M2>
friend bool _mmleq(
const M1 &m1,
const M2 &m2) noexcept;
725 template <
class M,
class MS>
friend bool _mmseq(
const M &m1,
const MS &ms) noexcept;
726 template <
class M,
class MS>
friend bool _mmsneq(
const M &m1,
const MS &ms) noexcept;
727 template <
class M,
class MS>
friend bool _mmsless(
const M &m1,
const MS &ms) noexcept;
728 template <
class M,
class MS>
friend bool _mmsleq(
const M &m1,
const MS &ms) noexcept;
729 template <
class MS,
class M>
friend bool _msmless(
const MS &ms,
const M &m1) noexcept;
730 template <
class MS,
class M>
friend bool _msmleq(
const MS &ms,
const M &m1) noexcept;
731 template <
class M>
friend std::ostream &_mout(std::ostream &s,
const M &r) noexcept;
732 template <
class M>
friend std::istream &_min(std::istream &s,M &r) noexcept;
736 template <
class MV,
class V>
friend MV &_mvvassign(MV &v,
const V &rv)
737 #if(CXSC_INDEX_CHECK)
743 template <
class M,
class E>
friend E _mdiam(
const M &m) noexcept;
744 template <
class M,
class E>
friend E _mmid(
const M &m) noexcept;
745 template <
class MS,
class E>
friend E _msdiam(
const MS &ms) noexcept;
746 template <
class MS,
class E>
friend E _msmid(
const MS &ms) noexcept;
747 template <
class M,
class E>
friend E _minf(
const M &m) noexcept;
748 template <
class M,
class E>
friend E _msup(
const M &m) noexcept;
749 template <
class M1,
class M2>
friend M1 &_mmsetinf(M1 &m1,
const M2 &m2)
750 #if(CXSC_INDEX_CHECK)
755 template <
class M1,
class M2>
friend M1 &_mmsetsup(M1 &m1,
const M2 &m2)
756 #if(CXSC_INDEX_CHECK)
761 template <
class M1,
class M2>
friend M1 &_mmusetinf(M1 &m1,
const M2 &m2)
762 #if(CXSC_INDEX_CHECK)
767 template <
class M1,
class M2>
friend M1 &_mmusetsup(M1 &m1,
const M2 &m2)
768 #if(CXSC_INDEX_CHECK)
773 template <
class MS,
class E>
friend E _msinf(
const MS &ms) noexcept;
774 template <
class MS,
class E>
friend E _mssup(
const MS &ms) noexcept;
775 template <
class MS1,
class M2>
friend MS1 &_msmsetinf(MS1 &ms1,
const M2 &m2)
776 #if(CXSC_INDEX_CHECK)
781 template <
class MS1,
class M2>
friend MS1 &_msmsetsup(MS1 &ms1,
const M2 &m2)
782 #if(CXSC_INDEX_CHECK)
787 template <
class MS1,
class M2>
friend MS1 &_msmusetinf(MS1 &ms1,
const M2 &m2)
788 #if(CXSC_INDEX_CHECK)
793 template <
class MS1,
class M2>
friend MS1 &_msmusetsup(MS1 &ms1,
const M2 &m2)
794 #if(CXSC_INDEX_CHECK)
801 template <
class M1,
class M2,
class E>
friend E _mmimult(
const M1 &m1,
const M2 &m2)
802 #if(CXSC_INDEX_CHECK)
808 template <
class M1,
class M2,
class S>
friend M1 &_mmimultassign(M1 &m1,
const M2 &m2)
809 #if(CXSC_INDEX_CHECK)
814 template <
class M,
class MS,
class E>
friend E _mmsimult(
const M &m1,
const MS &ms)
815 #if(CXSC_INDEX_CHECK)
821 template <
class MS,
class M,
class E>
friend E _msmimult(
const MS &ms,
const M &m2)
822 #if(CXSC_INDEX_CHECK)
828 template <
class M,
class MS,
class S>
friend M &_mmsimultassign(M &m1,
const MS &ms)
829 #if(CXSC_INDEX_CHECK)
834 template <
class MS1,
class MS2,
class E>
friend E _msmsimult(
const MS1 &ms1,
const MS2 &ms2)
835 #if(CXSC_INDEX_CHECK)
841 template <
class M1,
class M2>
friend M1 &_mmconvassign(M1 &m1,
const M2 &m2)
842 #if(CXSC_INDEX_CHECK)
847 template <
class M,
class MS>
friend M &_mmsconvassign(M &m1,
const MS &ms)
848 #if(CXSC_INDEX_CHECK)
853 template <
class MS,
class M>
friend MS &_msmconvassign(MS &ms,
const M &m1)
854 #if(CXSC_INDEX_CHECK)
859 template <
class MS1,
class MS2,
class E>
friend E _msmsconv(
const MS1 &m1,
const MS2 &m2)
860 #if(CXSC_INDEX_CHECK)
865 template <
class M1,
class M2,
class E>
friend E _mmsect(
const M1 &m1,
const M2 &m2)
866 #if(CXSC_INDEX_CHECK)
871 template <
class M,
class MS,
class E>
friend E _mmssect(
const M &m,
const MS &ms)
872 #if(CXSC_INDEX_CHECK)
878 template <
class M1,
class M2>
friend M1 &_mmsectassign(M1 &m1,
const M2 &m2)
879 #if(CXSC_INDEX_CHECK)
884 template <
class M,
class MS>
friend M &_mmssectassign(M &m1,
const MS &ms)
885 #if(CXSC_INDEX_CHECK)
890 template <
class MS,
class M>
friend MS &_msmsectassign(MS &ms,
const M &m1)
891 #if(CXSC_INDEX_CHECK)
896 template <
class MS1,
class MS2,
class E>
friend E _msmssect(
const MS1 &m1,
const MS2 &m2)
897 #if(CXSC_INDEX_CHECK)
903 template <
class M,
class V,
class E>
friend E _mvimult(
const M &m,
const V &v)
904 #if(CXSC_INDEX_CHECK)
909 template <
class MS,
class V,
class E>
friend E _msvimult(
const MS &ms,
const V &v)
910 #if(CXSC_INDEX_CHECK)
915 template <
class V,
class MS,
class E>
friend E _vmsimult(
const V &v,
const MS &ms)
916 #if(CXSC_INDEX_CHECK)
923 template <
class V,
class M,
class E>
friend E _vmimult(
const V &v,
const M &m)
924 #if(CXSC_INDEX_CHECK)
929 template <
class V,
class M,
class S>
friend V &_vmimultassign(V &v,
const M &m)
930 #if(CXSC_INDEX_CHECK)
935 template <
class VS,
class M,
class S>
friend VS &_vsmimultassign(VS &v,
const M &m)
936 #if(CXSC_INDEX_CHECK)
945 template <
class M,
class E>
friend E _mre(
const M &m) noexcept;
946 template <
class M,
class E>
friend E _mim(
const M &m) noexcept;
947 template <
class M1,
class M2>
friend M1 &_mmsetre(M1 &m1,
const M2 &m2)
948 #if(CXSC_INDEX_CHECK)
953 template <
class M1,
class M2>
friend M1 &_mmsetim(M1 &m1,
const M2 &m2)
954 #if(CXSC_INDEX_CHECK)
959 template <
class MS,
class E>
friend E _msre(
const MS &ms) noexcept;
960 template <
class MS,
class E>
friend E _msim(
const MS &ms) noexcept;
961 template <
class MS1,
class M2>
friend MS1 &_msmsetre(MS1 &ms1,
const M2 &m2)
962 #if(CXSC_INDEX_CHECK)
967 template <
class MS1,
class M2>
friend MS1 &_msmsetim(MS1 &ms1,
const M2 &m2)
968 #if(CXSC_INDEX_CHECK)
975 template <
class M1,
class M2,
class E>
friend E _mmcmult(
const M1 &m1,
const M2 &m2)
976 #if(CXSC_INDEX_CHECK)
982 template <
class M1,
class M2,
class S>
friend M1 &_mmcmultassign(M1 &m1,
const M2 &m2)
983 #if(CXSC_INDEX_CHECK)
988 template <
class M,
class MS,
class E>
friend E _mmscmult(
const M &m1,
const MS &ms)
989 #if(CXSC_INDEX_CHECK)
995 template <
class MS,
class M,
class E>
friend E _msmcmult(
const MS &ms,
const M &m2)
996 #if(CXSC_INDEX_CHECK)
1002 template <
class M,
class MS,
class S>
friend M &_mmscmultassign(M &m1,
const MS &ms)
1003 #if(CXSC_INDEX_CHECK)
1008 template <
class MS1,
class MS2,
class E>
friend E _msmscmult(
const MS1 &ms1,
const MS2 &ms2)
1009 #if(CXSC_INDEX_CHECK)
1016 template <
class M,
class V,
class E>
friend E _mvcmult(
const M &m,
const V &v)
1017 #if(CXSC_INDEX_CHECK)
1022 template <
class MS,
class V,
class E>
friend E _msvcmult(
const MS &ms,
const V &v)
1023 #if(CXSC_INDEX_CHECK)
1028 template <
class V,
class MS,
class E>
friend E _vmscmult(
const V &v,
const MS &ms)
1029 #if(CXSC_INDEX_CHECK)
1035 template <
class V,
class M,
class E>
friend E _vmcmult(
const V &v,
const M &m)
1036 #if(CXSC_INDEX_CHECK)
1041 template <
class V,
class M,
class S>
friend V &_vmcmultassign(V &v,
const M &m)
1042 #if(CXSC_INDEX_CHECK)
1047 template <
class VS,
class M,
class S>
friend VS &_vsmcmultassign(VS &v,
const M &m)
1048 #if(CXSC_INDEX_CHECK)
1076 template <
class M1,
class M2,
class E>
friend E _mmcimult(
const M1 &m1,
const M2 &m2)
1077 #if(CXSC_INDEX_CHECK)
1082 template <
class M1,
class M2,
class S>
friend M1 &_mmcimultassign(M1 &m1,
const M2 &m2)
1083 #if(CXSC_INDEX_CHECK)
1088 template <
class M,
class MS,
class E>
friend E _mmscimult(
const M &m1,
const MS &ms)
1089 #if(CXSC_INDEX_CHECK)
1094 template <
class MS,
class M,
class E>
friend E _msmcimult(
const MS &ms,
const M &m2)
1095 #if(CXSC_INDEX_CHECK)
1100 template <
class M,
class MS,
class S>
friend M &_mmscimultassign(M &m1,
const MS &ms)
1101 #if(CXSC_INDEX_CHECK)
1106 template <
class MS1,
class MS2,
class E>
friend E _msmscimult(
const MS1 &ms1,
const MS2 &ms2)
1107 #if(CXSC_INDEX_CHECK)
1114 template <
class M,
class V,
class E>
friend E _mvcimult(
const M &m,
const V &v)
1115 #if(CXSC_INDEX_CHECK)
1120 template <
class MS,
class V,
class E>
friend E _msvcimult(
const MS &ms,
const V &v)
1121 #if(CXSC_INDEX_CHECK)
1126 template <
class V,
class MS,
class E>
friend E _vmscimult(
const V &v,
const MS &ms)
1127 #if(CXSC_INDEX_CHECK)
1133 template <
class V,
class M,
class E>
friend E _vmcimult(
const V &v,
const M &m)
1134 #if(CXSC_INDEX_CHECK)
1139 template <
class V,
class M,
class S>
friend V &_vmcimultassign(V &v,
const M &m)
1140 #if(CXSC_INDEX_CHECK)
1145 template <
class VS,
class M,
class S>
friend VS &_vsmcimultassign(VS &v,
const M &m)
1146 #if(CXSC_INDEX_CHECK)
1154 template <
class M1,
class M2,
class E>
friend E _mmlmult(
const M1 &m1,
const M2 &m2)
1155 #if(CXSC_INDEX_CHECK)
1160 template <
class M1,
class M2,
class S>
friend M1 &_mmlmultassign(M1 &m1,
const M2 &m2)
1161 #if(CXSC_INDEX_CHECK)
1166 template <
class M,
class MS,
class E>
friend E _mmslmult(
const M &m1,
const MS &ms)
1167 #if(CXSC_INDEX_CHECK)
1173 template <
class MS,
class M,
class E>
friend E _msmlmult(
const MS &ms,
const M &m2)
1174 #if(CXSC_INDEX_CHECK)
1180 template <
class M,
class MS,
class S>
friend M &_mmslmultassign(M &m1,
const MS &ms)
1181 #if(CXSC_INDEX_CHECK)
1186 template <
class MS1,
class MS2,
class E>
friend E _msmslmult(
const MS1 &ms1,
const MS2 &ms2)
1187 #if(CXSC_INDEX_CHECK)
1193 template <
class M,
class V,
class E>
friend E _mvlmult(
const M &m,
const V &v)
1194 #if(CXSC_INDEX_CHECK)
1199 template <
class MS,
class V,
class E>
friend E _msvlmult(
const MS &ms,
const V &v)
1200 #if(CXSC_INDEX_CHECK)
1205 template <
class V,
class MS,
class E>
friend E _vmslmult(
const V &v,
const MS &ms)
1206 #if(CXSC_INDEX_CHECK)
1212 template <
class V,
class M,
class E>
friend E _vmlmult(
const V &v,
const M &m)
1213 #if(CXSC_INDEX_CHECK)
1218 template <
class V,
class M,
class S>
friend V &_vmlmultassign(V &v,
const M &m)
1219 #if(CXSC_INDEX_CHECK)
1227 template <
class M1,
class M2,
class E>
friend E _mmlimult(
const M1 &m1,
const M2 &m2)
1228 #if(CXSC_INDEX_CHECK)
1234 template <
class M1,
class M2,
class S>
friend M1 &_mmlimultassign(M1 &m1,
const M2 &m2)
1235 #if(CXSC_INDEX_CHECK)
1240 template <
class M,
class MS,
class E>
friend E _mmslimult(
const M &m1,
const MS &ms)
1241 #if(CXSC_INDEX_CHECK)
1247 template <
class MS,
class M,
class E>
friend E _msmlimult(
const MS &ms,
const M &m2)
1248 #if(CXSC_INDEX_CHECK)
1254 template <
class M,
class MS,
class S>
friend M &_mmslimultassign(M &m1,
const MS &ms)
1255 #if(CXSC_INDEX_CHECK)
1260 template <
class MS1,
class MS2,
class E>
friend E _msmslimult(
const MS1 &ms1,
const MS2 &ms2)
1261 #if(CXSC_INDEX_CHECK)
1269 template <
class M,
class V,
class E>
friend E _mvlimult(
const M &m,
const V &v)
1270 #if(CXSC_INDEX_CHECK)
1275 template <
class MS,
class V,
class E>
friend E _msvlimult(
const MS &ms,
const V &v)
1276 #if(CXSC_INDEX_CHECK)
1281 template <
class V,
class MS,
class E>
friend E _vmslimult(
const V &v,
const MS &ms)
1282 #if(CXSC_INDEX_CHECK)
1288 template <
class V,
class M,
class E>
friend E _vmlimult(
const V &v,
const M &m)
1289 #if(CXSC_INDEX_CHECK)
1294 template <
class V,
class M,
class S>
friend V &_vmlimultassign(V &v,
const M &m)
1295 #if(CXSC_INDEX_CHECK)
1300 template <
class VS,
class M,
class S>
friend VS &_vsmlimultassign(VS &v,
const M &m)
1301 #if(CXSC_INDEX_CHECK)
1318 explicit INLINE
rmatrix(
const int &m,
const int &n)
1319 #if(CXSC_INDEX_CHECK)
1325 explicit INLINE
rmatrix(
const int &m1,
const int &n1,
const int &m2,
const int &n2)
1326 #if(CXSC_INDEX_CHECK)
1385 INLINE ~
rmatrix() noexcept {
delete [] dat; }
1390 #if(CXSC_INDEX_CHECK)
1396 #if(CXSC_INDEX_CHECK)
1403 #if(CXSC_INDEX_CHECK)
1410 #if(CXSC_INDEX_CHECK)
1419 #if(CXSC_INDEX_CHECK)
1426 #if(CXSC_INDEX_CHECK)
1431 INLINE
operator void*() noexcept;
1452 int offset1,offset2,mxsize,mysize;
1453 int start1,end1,start2,end2,sxsize,sysize;
1457 #ifdef _CXSC_FRIEND_TPL
1459 template <
class V,
class MS,
class S>
friend void _vmsconstr(V &v,
const MS &m)
1460 #if(CXSC_INDEX_CHECK)
1465 template <
class MS,
class M>
friend MS &_msmassign(MS &ms,
const M &m)
1466 #if(CXSC_INDEX_CHECK)
1471 template <
class MS1,
class MS2>
friend MS1 &_msmsassign(MS1 &ms1,
const MS2 &ms)
1472 #if(CXSC_INDEX_CHECK)
1477 template <
class M,
class MS2,
class S>
friend M &_mmsassign(M &m,
const MS2 &ms) noexcept;
1478 template <
class MS,
class S>
friend MS &_mssassign(MS &ms,
const S &r) noexcept;
1479 template <
class MS>
friend int _mslb(
const MS &ms,
const int &i)
1480 #if(CXSC_INDEX_CHECK)
1485 template <
class MS>
friend int _msub(
const MS &ms,
const int &i)
1486 #if(CXSC_INDEX_CHECK)
1491 template <
class MS,
class E>
friend E _msabs(
const MS &ms) noexcept;
1493 template <
class MS,
class E>
friend E _msminus(
const MS &ms) noexcept;
1494 template <
class M,
class MS,
class E>
friend E _mmsplus(
const M &m,
const MS &ms)
1495 #if(CXSC_INDEX_CHECK)
1500 template <
class MS1,
class MS2,
class E>
friend E _msmsplus(
const MS1 &m1,
const MS2 &m2)
1501 #if(CXSC_INDEX_CHECK)
1506 template <
class M,
class MS>
friend M &_mmsplusassign(M &m1,
const MS &ms)
1507 #if(CXSC_INDEX_CHECK)
1512 template <
class MS,
class M>
friend MS &_msmplusassign(MS &ms,
const M &m1)
1513 #if(CXSC_INDEX_CHECK)
1518 template <
class MS1,
class MS2>
friend MS1 &_msmsplusassign(MS1 &ms1,
const MS2 &ms2)
1519 #if(CXSC_INDEX_CHECK)
1524 template <
class M,
class MS,
class E>
friend E _mmsminus(
const M &m,
const MS &ms)
1525 #if(CXSC_INDEX_CHECK)
1530 template <
class MS,
class M,
class E>
friend E _msmminus(
const MS &ms,
const M &m)
1531 #if(CXSC_INDEX_CHECK)
1536 template <
class MS1,
class MS2,
class E>
friend E _msmsminus(
const MS1 &ms1,
const MS2 &ms2)
1537 #if(CXSC_INDEX_CHECK)
1542 template <
class M,
class MS>
friend M &_mmsminusassign(M &m1,
const MS &ms)
1543 #if(CXSC_INDEX_CHECK)
1548 template <
class MS,
class M>
friend MS &_msmminusassign(MS &ms,
const M &m1)
1549 #if(CXSC_INDEX_CHECK)
1554 template <
class MS1,
class MS2>
friend MS1 &_msmsminusassign(MS1 &ms1,
const MS2 &ms2)
1555 #if(CXSC_INDEX_CHECK)
1560 template <
class M,
class MS,
class E>
friend E _mmsmult(
const M &m1,
const MS &ms)
1561 #if(CXSC_INDEX_CHECK)
1566 template <
class MS,
class M,
class E>
friend E _msmmult(
const MS &ms,
const M &m2)
1567 #if(CXSC_INDEX_CHECK)
1572 template <
class M,
class MS,
class S>
friend M &_mmsmultassign(M &m1,
const MS &ms)
1573 #if(CXSC_INDEX_CHECK)
1578 template <
class MS1,
class MS2,
class E>
friend E _msmsmult(
const MS1 &ms1,
const MS2 &ms2)
1579 #if(CXSC_INDEX_CHECK)
1584 template <
class M,
class MS,
class E>
friend E _mmsconv(
const M &m,
const MS &ms)
1585 #if(CXSC_INDEX_CHECK)
1590 template <
class MS1,
class MS2,
class E>
friend E _msmsconv(
const MS1 &m1,
const MS2 &m2)
1591 #if(CXSC_INDEX_CHECK)
1597 template <
class MS,
class V,
class E>
friend E _msvmult(
const MS &ms,
const V &v)
1598 #if(CXSC_INDEX_CHECK)
1603 template <
class V,
class MS,
class E>
friend E _vmsmult(
const V &v,
const MS &ms)
1604 #if(CXSC_INDEX_CHECK)
1609 template <
class V,
class MS,
class S>
friend V &_vmsmultassign(V &v,
const MS &ms)
1610 #if(CXSC_INDEX_CHECK)
1616 template <
class S,
class MS,
class E>
friend E _smsmult(
const S &c,
const MS &ms) noexcept;
1617 template <
class MS,
class S>
friend MS &_mssmultassign(MS &ms,
const S &c) noexcept;
1618 template <
class MS,
class S,
class E>
friend E _mssdiv(
const MS &ms,
const S &c) noexcept;
1619 template <
class MS,
class S>
friend MS &_mssdivassign(MS &ms,
const S &c) noexcept;
1621 template <
class MS>
friend void *_msvoid(
const MS &ms) noexcept;
1622 template <
class MS>
friend bool _msnot(
const MS &ms) noexcept;
1623 template <
class M,
class MS>
friend bool _mmseq(
const M &m1,
const MS &ms) noexcept;
1624 template <
class M,
class MS>
friend bool _mmsneq(
const M &m1,
const MS &ms) noexcept;
1625 template <
class M,
class MS>
friend bool _mmsless(
const M &m1,
const MS &ms) noexcept;
1626 template <
class M,
class MS>
friend bool _mmsleq(
const M &m1,
const MS &ms) noexcept;
1627 template <
class MS,
class M>
friend bool _msmless(
const MS &ms,
const M &m1) noexcept;
1628 template <
class MS,
class M>
friend bool _msmleq(
const MS &ms,
const M &m1) noexcept;
1629 template <
class MS1,
class MS2>
friend bool _msmseq(
const MS1 &ms1,
const MS2 &ms2) noexcept;
1630 template <
class MS1,
class MS2>
friend bool _msmsneq(
const MS1 &ms1,
const MS2 &ms2) noexcept;
1631 template <
class MS1,
class MS2>
friend bool _msmsless(
const MS1 &ms1,
const MS2 &ms2) noexcept;
1632 template <
class MS1,
class MS2>
friend bool _msmsleq(
const MS1 &ms1,
const MS2 &ms2) noexcept;
1633 template <
class MS>
friend std::ostream &_msout(std::ostream &s,
const MS &r) noexcept;
1634 template <
class MS>
friend std::istream &_msin(std::istream &s,MS &r) noexcept;
1637 template <
class M1,
class MS2>
friend M1 &_mmssetinf(M1 &m1,
const MS2 &ms2)
1638 #if(CXSC_INDEX_CHECK)
1643 template <
class M1,
class MS2>
friend M1 &_mmssetsup(M1 &m1,
const MS2 &ms2)
1644 #if(CXSC_INDEX_CHECK)
1649 template <
class M1,
class MS2>
friend M1 &_mmsusetinf(M1 &m1,
const MS2 &ms2)
1650 #if(CXSC_INDEX_CHECK)
1655 template <
class M1,
class MS2>
friend M1 &_mmsusetsup(M1 &m1,
const MS2 &ms2)
1656 #if(CXSC_INDEX_CHECK)
1661 template <
class MS1,
class MS2>
friend MS1 &_msmssetinf(MS1 &ms1,
const MS2 &ms2)
1662 #if(CXSC_INDEX_CHECK)
1667 template <
class MS1,
class MS2>
friend MS1 &_msmssetsup(MS1 &ms1,
const MS2 &ms2)
1668 #if(CXSC_INDEX_CHECK)
1673 template <
class MS1,
class MS2>
friend MS1 &_msmsusetinf(MS1 &ms1,
const MS2 &ms2)
1674 #if(CXSC_INDEX_CHECK)
1679 template <
class MS1,
class MS2>
friend MS1 &_msmsusetsup(MS1 &ms1,
const MS2 &ms2)
1680 #if(CXSC_INDEX_CHECK)
1686 template <
class MS,
class V,
class E>
friend E _msvimult(
const MS &ms,
const V &v)
1687 #if(CXSC_INDEX_CHECK)
1692 template <
class V,
class MS,
class E>
friend E _vmsimult(
const V &v,
const MS &ms)
1693 #if(CXSC_INDEX_CHECK)
1698 template <
class V,
class MS,
class S>
friend V &_vmsimultassign(V &v,
const MS &ms)
1699 #if(CXSC_INDEX_CHECK)
1707 template <
class M,
class MS,
class E>
friend E _mmsimult(
const M &m1,
const MS &ms)
1708 #if(CXSC_INDEX_CHECK)
1713 template <
class MS,
class M,
class E>
friend E _msmimult(
const MS &ms,
const M &m2)
1714 #if(CXSC_INDEX_CHECK)
1720 template <
class M,
class MS,
class S>
friend M &_mmsimultassign(M &m1,
const MS &ms)
1721 #if(CXSC_INDEX_CHECK)
1727 template <
class MS1,
class MS2,
class E>
friend E _msmsimult(
const MS1 &ms1,
const MS2 &ms2)
1728 #if(CXSC_INDEX_CHECK)
1734 template <
class M,
class MS>
friend M &_mmsconvassign(M &m1,
const MS &ms)
1735 #if(CXSC_INDEX_CHECK)
1740 template <
class MS1,
class MS2>
friend MS1 &_msmsconvassign(MS1 &ms1,
const MS2 &ms2)
1741 #if(CXSC_INDEX_CHECK)
1746 template <
class M,
class MS,
class E>
friend E _mmssect(
const M &m,
const MS &ms)
1747 #if(CXSC_INDEX_CHECK)
1752 template <
class M,
class MS>
friend M &_mmssectassign(M &m1,
const MS &ms)
1753 #if(CXSC_INDEX_CHECK)
1758 template <
class MS1,
class MS2>
friend MS1 &_msmssectassign(MS1 &ms1,
const MS2 &ms2)
1759 #if(CXSC_INDEX_CHECK)
1764 template <
class MS1,
class MS2,
class E>
friend E _msmssect(
const MS1 &m1,
const MS2 &m2)
1765 #if(CXSC_INDEX_CHECK)
1773 template <
class MS1,
class MS2>
friend MS1 &_msmssetre(MS1 &ms1,
const MS2 &ms2)
1774 #if(CXSC_INDEX_CHECK)
1779 template <
class MS1,
class MS2>
friend MS1 &_msmssetim(MS1 &ms1,
const MS2 &ms2)
1780 #if(CXSC_INDEX_CHECK)
1785 template <
class M1,
class MS2>
friend M1 &_mmssetre(M1 &m1,
const MS2 &ms2)
1786 #if(CXSC_INDEX_CHECK)
1791 template <
class M1,
class MS2>
friend M1 &_mmssetim(M1 &m1,
const MS2 &ms2)
1792 #if(CXSC_INDEX_CHECK)
1798 template <
class MS,
class V,
class E>
friend E _msvcmult(
const MS &ms,
const V &v)
1799 #if(CXSC_INDEX_CHECK)
1804 template <
class V,
class MS,
class E>
friend E _vmscmult(
const V &v,
const MS &ms)
1805 #if(CXSC_INDEX_CHECK)
1810 template <
class V,
class MS,
class S>
friend V &_vmscmultassign(V &v,
const MS &ms)
1811 #if(CXSC_INDEX_CHECK)
1819 template <
class M,
class MS,
class E>
friend E _mmscmult(
const M &m1,
const MS &ms)
1820 #if(CXSC_INDEX_CHECK)
1825 template <
class MS,
class M,
class E>
friend E _msmcmult(
const MS &ms,
const M &m2)
1826 #if(CXSC_INDEX_CHECK)
1832 template <
class M,
class MS,
class S>
friend M &_mmscmultassign(M &m1,
const MS &ms)
1833 #if(CXSC_INDEX_CHECK)
1838 template <
class MS1,
class MS2,
class E>
friend E _msmscmult(
const MS1 &ms1,
const MS2 &ms2)
1839 #if(CXSC_INDEX_CHECK)
1846 template <
class MS,
class V,
class E>
friend E _msvcimult(
const MS &ms,
const V &v)
1847 #if(CXSC_INDEX_CHECK)
1852 template <
class V,
class MS,
class E>
friend E _vmscimult(
const V &v,
const MS &ms)
1853 #if(CXSC_INDEX_CHECK)
1858 template <
class V,
class MS,
class S>
friend V &_vmscimultassign(V &v,
const MS &ms)
1859 #if(CXSC_INDEX_CHECK)
1885 template <
class M,
class MS,
class E>
friend E _mmscimult(
const M &m1,
const MS &ms)
1886 #if(CXSC_INDEX_CHECK)
1891 template <
class MS,
class M,
class E>
friend E _msmcimult(
const MS &ms,
const M &m2)
1892 #if(CXSC_INDEX_CHECK)
1897 template <
class M,
class MS,
class S>
friend M &_mmscimultassign(M &m1,
const MS &ms)
1898 #if(CXSC_INDEX_CHECK)
1904 template <
class MS1,
class MS2,
class E>
friend E _msmscimult(
const MS1 &ms1,
const MS2 &ms2)
1905 #if(CXSC_INDEX_CHECK)
1912 template <
class MS,
class V,
class E>
friend E _msvlmult(
const MS &ms,
const V &v)
1913 #if(CXSC_INDEX_CHECK)
1918 template <
class V,
class MS,
class E>
friend E _vmslmult(
const V &v,
const MS &ms)
1919 #if(CXSC_INDEX_CHECK)
1924 template <
class V,
class MS,
class S>
friend V &_vmslmultassign(V &v,
const MS &ms)
1925 #if(CXSC_INDEX_CHECK)
1932 template <
class M,
class MS,
class E>
friend E _mmslmult(
const M &m1,
const MS &ms)
1933 #if(CXSC_INDEX_CHECK)
1938 template <
class MS,
class M,
class E>
friend E _msmlmult(
const MS &ms,
const M &m2)
1939 #if(CXSC_INDEX_CHECK)
1945 template <
class M,
class MS,
class S>
friend M &_mmslmultassign(M &m1,
const MS &ms)
1946 #if(CXSC_INDEX_CHECK)
1951 template <
class MS1,
class MS2,
class E>
friend E _msmslmult(
const MS1 &ms1,
const MS2 &ms2)
1952 #if(CXSC_INDEX_CHECK)
1959 template <
class MS,
class V,
class E>
friend E _msvlimult(
const MS &ms,
const V &v)
1960 #if(CXSC_INDEX_CHECK)
1965 template <
class V,
class MS,
class E>
friend E _vmslimult(
const V &v,
const MS &ms)
1966 #if(CXSC_INDEX_CHECK)
1971 template <
class V,
class MS,
class S>
friend V &_vmslimultassign(V &v,
const MS &ms)
1972 #if(CXSC_INDEX_CHECK)
1998 template <
class M,
class MS,
class E>
friend E _mmslimult(
const M &m1,
const MS &ms)
1999 #if(CXSC_INDEX_CHECK)
2004 template <
class MS,
class M,
class E>
friend E _msmlimult(
const MS &ms,
const M &m2)
2005 #if(CXSC_INDEX_CHECK)
2011 template <
class M,
class MS,
class S>
friend M &_mmslimultassign(M &m1,
const MS &ms)
2012 #if(CXSC_INDEX_CHECK)
2018 template <
class MS1,
class MS2,
class E>
friend E _msmslimult(
const MS1 &ms1,
const MS2 &ms2)
2019 #if(CXSC_INDEX_CHECK)
2032 explicit INLINE
rmatrix_slice(
rmatrix &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) { }
2034 explicit INLINE
rmatrix_slice(
rmatrix_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) { }
2037 INLINE
rmatrix_slice(
const rmatrix_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) { }
2043 #if(CXSC_INDEX_CHECK)
2056 #if(CXSC_INDEX_CHECK)
2063 #if(CXSC_INDEX_CHECK)
2072 #if(CXSC_INDEX_CHECK)
2079 #if(CXSC_INDEX_CHECK)
2086 #if(CXSC_INDEX_CHECK)
2093 #if(CXSC_INDEX_CHECK)
2100 #if(CXSC_INDEX_CHECK)
2109 #if(CXSC_INDEX_CHECK)
2116 #if(CXSC_INDEX_CHECK)
2129 #if(CXSC_INDEX_CHECK)
2136 #if(CXSC_INDEX_CHECK)
2149 #if(CXSC_INDEX_CHECK)
2156 #if(CXSC_INDEX_CHECK)
2169 #if(CXSC_INDEX_CHECK)
2176 #if(CXSC_INDEX_CHECK)
2185 INLINE
operator void*() noexcept;
2196 INLINE rvector
operator /(
const rmatrix_subv &rv,
const real &s) noexcept;
2198 INLINE rvector
operator *(
const rmatrix_subv &rv,
const real &s) noexcept;
2200 INLINE rvector
operator *(
const real &s,
const rmatrix_subv &rv) noexcept;
2202 INLINE rvector
abs(
const rmatrix_subv &mv) noexcept;
2207 void accumulate(dotprecision &dp,
const rmatrix_subv & rv1,
const rmatrix_subv &rv2)
2208 #if(CXSC_INDEX_CHECK)
2215 void accumulate_approx(dotprecision &dp,
const rmatrix_subv & rv1,
const rmatrix_subv &rv2);
2218 void accumulate(dotprecision &dp,
const rvector & rv1,
const rmatrix_subv &rv2)
2219 #if(CXSC_INDEX_CHECK)
2226 void accumulate_approx(dotprecision &dp,
const rvector & rv1,
const rmatrix_subv &rv2);
2229 void accumulate(dotprecision &dp,
const rmatrix_subv & rv1,
const rvector &rv2)
2230 #if(CXSC_INDEX_CHECK)
2237 void accumulate_approx(dotprecision &dp,
const rmatrix_subv & rv1,
const rvector &rv2);
2240 void accumulate(cdotprecision &dp,
const rmatrix_subv & rv1,
const rmatrix_subv &rv2)
2241 #if(CXSC_INDEX_CHECK)
2248 void accumulate_approx(cdotprecision &dp,
const rmatrix_subv & rv1,
const rmatrix_subv &rv2);
2251 void accumulate(cdotprecision &dp,
const rvector & rv1,
const rmatrix_subv &rv2)
2252 #if(CXSC_INDEX_CHECK)
2259 void accumulate_approx(cdotprecision &dp,
const rvector & rv1,
const rmatrix_subv &rv2);
2262 void accumulate(cdotprecision &dp,
const rmatrix_subv & rv1,
const rvector &rv2)
2263 #if(CXSC_INDEX_CHECK)
2270 void accumulate_approx(cdotprecision &dp,
const rmatrix_subv & rv1,
const rvector &rv2);
2273 void accumulate(idotprecision &dp,
const rmatrix_subv & rv1,
const rmatrix_subv &rv2)
2274 #if(CXSC_INDEX_CHECK)
2280 void accumulate(idotprecision &dp,
const rvector & rv1,
const rmatrix_subv &rv2)
2281 #if(CXSC_INDEX_CHECK)
2287 void accumulate(idotprecision &dp,
const rmatrix_subv & rv1,
const rvector &rv2)
2288 #if(CXSC_INDEX_CHECK)
2294 void accumulate(cidotprecision &dp,
const rmatrix_subv & rv1,
const rmatrix_subv &rv2)
2295 #if(CXSC_INDEX_CHECK)
2301 void accumulate(cidotprecision &dp,
const rvector & rv1,
const rmatrix_subv &rv2)
2302 #if(CXSC_INDEX_CHECK)
2308 void accumulate(cidotprecision &dp,
const rmatrix_subv & rv1,
const rvector &rv2)
2309 #if(CXSC_INDEX_CHECK)
2315 void accumulate(dotprecision &dp,
const rvector_slice &sl,
const rmatrix_subv &sv)
2316 #if(CXSC_INDEX_CHECK)
2323 void accumulate_approx(dotprecision &dp,
const rvector_slice &sl,
const rmatrix_subv &sv);
2327 void accumulate(cdotprecision &dp,
const rvector_slice & sl1,
const rmatrix_subv &rv2)
2328 #if(CXSC_INDEX_CHECK)
2335 void accumulate_approx(cdotprecision &dp,
const rvector_slice & sl1,
const rmatrix_subv &rv2);
2338 void accumulate(idotprecision &dp,
const rvector_slice & sl1,
const rmatrix_subv &rv2)
2339 #if(CXSC_INDEX_CHECK)
2346 void accumulate(cidotprecision &dp,
const rvector_slice & sl1,
const rmatrix_subv &rv2)
2347 #if(CXSC_INDEX_CHECK)
2354 void accumulate(dotprecision &dp,
const rmatrix_subv &mv,
const rvector_slice &vs)
2355 #if(CXSC_INDEX_CHECK)
2362 void accumulate_approx(dotprecision &dp,
const rmatrix_subv &mv,
const rvector_slice &vs);
2366 void accumulate(cdotprecision &dp,
const rmatrix_subv & rv1,
const rvector_slice &sl2)
2367 #if(CXSC_INDEX_CHECK)
2374 void accumulate_approx(cdotprecision &dp,
const rmatrix_subv & rv1,
const rvector_slice &sl2);
2377 void accumulate(idotprecision &dp,
const rmatrix_subv & rv1,
const rvector_slice &sl2)
2378 #if(CXSC_INDEX_CHECK)
2385 void accumulate(cidotprecision &dp,
const rmatrix_subv & rv1,
const rvector_slice &sl2)
2386 #if(CXSC_INDEX_CHECK)
2393 INLINE real
operator *(
const rmatrix_subv & rv1,
const rmatrix_subv &rv2)
2394 #if(CXSC_INDEX_CHECK)
2400 INLINE real
operator *(
const rvector & rv1,
const rmatrix_subv &rv2)
2401 #if(CXSC_INDEX_CHECK)
2407 INLINE real
operator *(
const rmatrix_subv &rv1,
const rvector &rv2)
2408 #if(CXSC_INDEX_CHECK)
2414 INLINE real
operator *(
const rvector_slice &sl,
const rmatrix_subv &sv)
2415 #if(CXSC_INDEX_CHECK)
2421 INLINE real
operator *(
const rmatrix_subv &mv,
const rvector_slice &vs)
2422 #if(CXSC_INDEX_CHECK)
2429 INLINE rvector operator +(
const rmatrix_subv & rv1,
const rmatrix_subv &rv2)
2430 #if(CXSC_INDEX_CHECK)
2436 INLINE rvector operator +(
const rmatrix_subv &rv1,
const rvector &rv2)
2437 #if(CXSC_INDEX_CHECK)
2443 INLINE rvector operator +(
const rvector & rv1,
const rmatrix_subv &rv2)
2444 #if(CXSC_INDEX_CHECK)
2450 INLINE rvector operator +(
const rvector_slice &sl,
const rmatrix_subv &mv)
2451 #if(CXSC_INDEX_CHECK)
2457 INLINE rvector operator +(
const rmatrix_subv &mv,
const rvector_slice &sl)
2458 #if(CXSC_INDEX_CHECK)
2465 INLINE rvector operator -(
const rmatrix_subv & rv1,
const rmatrix_subv &rv2)
2466 #if(CXSC_INDEX_CHECK)
2472 INLINE rvector operator -(
const rvector & rv1,
const rmatrix_subv &rv2)
2473 #if(CXSC_INDEX_CHECK)
2479 INLINE rvector operator -(
const rmatrix_subv &rv1,
const rvector &rv2)
2480 #if(CXSC_INDEX_CHECK)
2486 INLINE rvector operator -(
const rvector_slice &sl,
const rmatrix_subv &mv)
2487 #if(CXSC_INDEX_CHECK)
2493 INLINE rvector operator -(
const rmatrix_subv &mv,
const rvector_slice &sl)
2494 #if(CXSC_INDEX_CHECK)
2504 INLINE rmatrix
_rmatrix(
const rmatrix &rm) noexcept;
2506 INLINE rmatrix
_rmatrix(
const rvector &v) noexcept;
2508 INLINE rmatrix
_rmatrix(
const rvector_slice &v) noexcept;
2510 INLINE rmatrix
_rmatrix(
const real &r) noexcept;
2513 INLINE
int Lb(
const rmatrix &rm,
const int &i)
2514 #if(CXSC_INDEX_CHECK)
2520 INLINE
int Ub(
const rmatrix &rm,
const int &i)
2521 #if(CXSC_INDEX_CHECK)
2527 INLINE
int Lb(
const rmatrix_slice &rm,
const int &i)
2528 #if(CXSC_INDEX_CHECK)
2534 INLINE
int Ub(
const rmatrix_slice &rm,
const int &i)
2535 #if(CXSC_INDEX_CHECK)
2541 INLINE rmatrix &
SetLb(rmatrix &m,
const int &i,
const int &j)
2542 #if(CXSC_INDEX_CHECK)
2548 INLINE rmatrix &
SetUb(rmatrix &m,
const int &i,
const int &j)
2549 #if(CXSC_INDEX_CHECK)
2555 INLINE
void Resize(rmatrix &A) noexcept;
2557 INLINE
void Resize(rmatrix &A,
const int &m,
const int &n)
2558 #if(CXSC_INDEX_CHECK)
2564 INLINE
void Resize(rmatrix &A,
const int &m1,
const int &m2,
const int &n1,
const int &n2)
2565 #if(CXSC_INDEX_CHECK)
2572 INLINE rmatrix
abs(
const rmatrix &m) noexcept;
2574 INLINE rmatrix
abs(
const rmatrix_slice &ms) noexcept;
2576 INLINE rmatrix
CompMat(
const rmatrix &m) noexcept;
2581 INLINE rmatrix
operator *(
const real &c,
const rmatrix &m) noexcept;
2583 INLINE rmatrix
operator *(
const real &c,
const rmatrix_slice &ms) noexcept;
2585 INLINE rmatrix
operator *(
const rmatrix &m,
const real &c) noexcept;
2587 INLINE rmatrix
operator *(
const rmatrix_slice &ms,
const real &c) noexcept;
2589 INLINE rmatrix &
operator *=(rmatrix &m,
const real &c) noexcept;
2591 INLINE rmatrix
operator /(
const rmatrix &m,
const real &c) noexcept;
2593 INLINE rmatrix
operator /(
const rmatrix_slice &ms,
const real &c) noexcept;
2595 INLINE rmatrix &
operator /=(rmatrix &m,
const real &c) noexcept;
2602 INLINE rvector
operator *(
const rmatrix &m,
const rvector &v)
2603 #if(CXSC_INDEX_CHECK)
2609 INLINE rvector
operator *(
const rmatrix_slice &ms,
const rvector &v)
2610 #if(CXSC_INDEX_CHECK)
2616 INLINE rvector
operator *(
const rvector &v,
const rmatrix &m)
2617 #if(CXSC_INDEX_CHECK)
2623 INLINE rvector
operator *(
const rvector &v,
const rmatrix_slice &ms)
2624 #if(CXSC_INDEX_CHECK)
2630 INLINE rvector &
operator *=(rvector &v,
const rmatrix &m)
2631 #if(CXSC_INDEX_CHECK)
2637 INLINE rvector &
operator *=(rvector &v,
const rmatrix_slice &ms)
2638 #if(CXSC_INDEX_CHECK)
2646 INLINE rvector
operator *(
const rvector_slice &v,
const rmatrix &m)
2647 #if(CXSC_INDEX_CHECK)
2658 INLINE
const rmatrix &operator +(
const rmatrix &m1) noexcept;
2660 INLINE rmatrix operator +(
const rmatrix_slice &ms) noexcept;
2662 INLINE rmatrix operator +(
const rmatrix &m1,
const rmatrix &m2)
2663 #if(CXSC_INDEX_CHECK)
2669 INLINE rmatrix operator +(
const rmatrix &m,
const rmatrix_slice &ms)
2670 #if(CXSC_INDEX_CHECK)
2676 INLINE rmatrix operator +(
const rmatrix_slice &ms,
const rmatrix &m)
2677 #if(CXSC_INDEX_CHECK)
2683 INLINE rmatrix operator +(
const rmatrix_slice &m1,
const rmatrix_slice &m2)
2684 #if(CXSC_INDEX_CHECK)
2690 INLINE rmatrix &
operator +=(rmatrix &m1,
const rmatrix &m2)
2691 #if(CXSC_INDEX_CHECK)
2697 INLINE rmatrix &
operator +=(rmatrix &m1,
const rmatrix_slice &ms)
2698 #if(CXSC_INDEX_CHECK)
2705 INLINE rmatrix operator -(
const rmatrix &m) noexcept;
2707 INLINE rmatrix operator -(
const rmatrix_slice &ms) noexcept;
2709 INLINE rmatrix operator -(
const rmatrix &m1,
const rmatrix &m2)
2710 #if(CXSC_INDEX_CHECK)
2716 INLINE rmatrix operator -(
const rmatrix &m,
const rmatrix_slice &ms)
2717 #if(CXSC_INDEX_CHECK)
2723 INLINE rmatrix operator -(
const rmatrix_slice &ms,
const rmatrix &m)
2724 #if(CXSC_INDEX_CHECK)
2730 INLINE rmatrix operator -(
const rmatrix_slice &ms1,
const rmatrix_slice &ms2)
2731 #if(CXSC_INDEX_CHECK)
2737 INLINE rmatrix &operator -=(rmatrix &m1,
const rmatrix &m2)
2738 #if(CXSC_INDEX_CHECK)
2744 INLINE rmatrix &operator -=(rmatrix &m1,
const rmatrix_slice &ms)
2745 #if(CXSC_INDEX_CHECK)
2752 INLINE rmatrix
operator *(
const rmatrix &m1,
const rmatrix &m2)
2753 #if(CXSC_INDEX_CHECK)
2759 INLINE rmatrix
operator *(
const rmatrix &m1,
const rmatrix_slice &ms)
2760 #if(CXSC_INDEX_CHECK)
2766 INLINE rmatrix
operator *(
const rmatrix_slice &ms,
const rmatrix &m1)
2767 #if(CXSC_INDEX_CHECK)
2773 INLINE rmatrix
operator *(
const rmatrix_slice &ms1,
const rmatrix_slice &ms2)
2774 #if(CXSC_INDEX_CHECK)
2780 INLINE rmatrix &
operator *=(rmatrix &m1,
const rmatrix &m2)
2781 #if(CXSC_INDEX_CHECK)
2787 INLINE rmatrix &
operator *=(rmatrix &m1,
const rmatrix_slice &ms)
2788 #if(CXSC_INDEX_CHECK)
2801 INLINE
bool operator ==(
const rmatrix &m1,
const rmatrix &m2) noexcept;
2803 INLINE
bool operator !=(
const rmatrix &m1,
const rmatrix &m2) noexcept;
2805 INLINE
bool operator <(
const rmatrix &m1,
const rmatrix &m2) noexcept;
2807 INLINE
bool operator <=(
const rmatrix &m1,
const rmatrix &m2) noexcept;
2809 INLINE
bool operator >(
const rmatrix &m1,
const rmatrix &m2) noexcept;
2811 INLINE
bool operator >=(
const rmatrix &m1,
const rmatrix &m2) noexcept;
2813 INLINE
bool operator ==(
const rmatrix &m1,
const rmatrix_slice &ms) noexcept;
2815 INLINE
bool operator !=(
const rmatrix &m1,
const rmatrix_slice &ms) noexcept;
2817 INLINE
bool operator <(
const rmatrix &m1,
const rmatrix_slice &ms) noexcept;
2819 INLINE
bool operator <=(
const rmatrix &m1,
const rmatrix_slice &ms) noexcept;
2821 INLINE
bool operator >(
const rmatrix &m1,
const rmatrix_slice &ms) noexcept;
2823 INLINE
bool operator >=(
const rmatrix &m1,
const rmatrix_slice &ms) noexcept;
2828 INLINE
bool operator ==(
const rmatrix_slice &m1,
const rmatrix_slice &m2) noexcept;
2830 INLINE
bool operator !=(
const rmatrix_slice &m1,
const rmatrix_slice &m2) noexcept;
2832 INLINE
bool operator <(
const rmatrix_slice &m1,
const rmatrix_slice &m2) noexcept;
2834 INLINE
bool operator <=(
const rmatrix_slice &m1,
const rmatrix_slice &m2) noexcept;
2836 INLINE
bool operator >(
const rmatrix_slice &m1,
const rmatrix_slice &m2) noexcept;
2838 INLINE
bool operator >=(
const rmatrix_slice &m1,
const rmatrix_slice &m2) noexcept;
2843 INLINE
bool operator !(
const rmatrix &ms) noexcept;
2845 INLINE
bool operator !(
const rmatrix_slice &ms) noexcept;
2850 INLINE std::ostream &operator <<(std::ostream &s,
const rmatrix &r) noexcept;
2852 INLINE std::ostream &operator <<(std::ostream &s,
const rmatrix_slice &r) noexcept;
2854 INLINE std::istream &operator >>(std::istream &s,rmatrix &r) noexcept;
2856 INLINE std::istream &operator >>(std::istream &s,rmatrix_slice &r) noexcept;
2861 INLINE
int RowLen (
const rmatrix& );
2863 INLINE
int ColLen (
const rmatrix& );
2865 INLINE
int RowLen (
const rmatrix_slice& );
2867 INLINE
int ColLen (
const rmatrix_slice& );
2869 rmatrix
Id (
const rmatrix& );
2871 rmatrix
transp (
const rmatrix& );
2879 #ifdef _CXSC_INCL_INL
2880 # include "matrix.inl"
2881 # include "rmatrix.inl"
2884 #ifdef _CXSC_IVECTOR_HPP_INCLUDED
2885 # ifdef _CXSC_INCL_INL
2886 # include "ivecrmat.inl"
2888 # include "ivecrmat.hpp"
2892 #ifdef _CXSC_CVECTOR_HPP_INCLUDED
2893 # ifdef _CXSC_INCL_INL
2894 # include "cvecrmat.inl"
2896 # include "cvecrmat.hpp"
2900 #ifdef _CXSC_CIVECTOR_HPP_INCLUDED
2901 # ifdef _CXSC_INCL_INL
2902 # include "civecrmat.inl"
2904 # include "civecrmat.hpp"
2908 #ifdef _CXSC_LIVECTOR_HPP_INCLUDED
2909 # ifdef _CXSC_INCL_INL
2910 # include "livecrmat.inl"
2912 # include "livecrmat.hpp"
2916 #ifdef _CXSC_LRVECTOR_HPP_INCLUDED
2917 # ifdef _CXSC_INCL_INL
2918 # include "lrvecrmat.inl"
2920 # include "lrvecrmat.hpp"
2924 #ifdef CXSC_USE_BLAS
2925 #define _CXSC_BLAS_RMATRIX
2926 #include "cxsc_blas.inl"
The Data Type cimatrix_slice.
The Multiple-Precision Data Type l_imatrix.
The Multiple-Precision Data Type l_ivector.
The Multiple-Precision Data Type l_rmatrix.
The Multiple-Precision Data Type l_rvector.
real(void) noexcept
Constructor of class real.
The Data Type rmatrix_slice.
rmatrix_slice & operator=(const srmatrix &m)
Implementation of standard assigning operator.
rmatrix_subv operator[](const int &i) const noexcept
Operator for accessing a single row of the matrix.
rmatrix_slice & operator-=(const srmatrix &m)
Implementation of multiplication and allocation operation.
rmatrix_slice & operator*=(const srmatrix &m)
Implementation of multiplication and allocation operation.
rmatrix_slice & operator+=(const srmatrix &m)
Implementation of multiplication and allocation operation.
rmatrix_slice & operator/=(const real &c) noexcept
Implementation of division and allocation operation.
rmatrix_slice & operator()() noexcept
Operator for accessing the whole matrix.
rmatrix_slice(const rmatrix_slice &ms) noexcept
Constructor of class rmatrix_slice.
rmatrix_slice(rmatrix_slice &a, const int &l1, const int &u1, const int &l2, const int &u2) noexcept
Constructor of class rmatrix_slice.
rmatrix_slice(rmatrix &a, const int &l1, const int &u1, const int &l2, const int &u2) noexcept
Constructor of class rmatrix_slice.
The Data Type rmatrix_subv.
rmatrix_subv & operator()() noexcept
Operator for accessing the whole vector.
rmatrix_subv(const rmatrix_subv &v) noexcept
Constructor of class rmatrix_subv.
friend int VecLen(const rmatrix_subv &rv) noexcept
Returns the size of the vector.
rmatrix_subv & operator+=(const real &c) noexcept
Implementation of addition and allocation operation.
rmatrix_subv & operator=(const rmatrix_subv &rv) noexcept
Implementation of standard assigning operator.
friend rmatrix_subv Row(rmatrix &m, const int &i) noexcept
Returns one row of the matrix as a vector.
rmatrix_subv(real *d, const int &l, const int &u, const int &s, const int &st, const int &o) noexcept
Constructor of class rmatrix_subv.
friend int Lb(const rmatrix_subv &rv) noexcept
Returns the lower bound of the vector.
rmatrix_subv & operator/=(const real &c) noexcept
Implementation of division and allocation operation.
rmatrix_subv & operator*=(const real &c) noexcept
Implementation of multiplication and allocation operation.
real & operator[](const int &i) const noexcept
Operator for accessing the single elements of the vector (read-only)
friend int Ub(const rmatrix_subv &rv) noexcept
Returns the upper bound of the vector.
rmatrix_subv & operator-=(const real &c) noexcept
Implementation of subtraction and allocation operation.
friend rmatrix_subv Col(rmatrix &m, const int &i) noexcept
Returns one column of the matrix as a vector.
friend rmatrix SupRe(const cimatrix &v) noexcept
Returns componentwise the supremum of the real part.
friend rmatrix InfIm(const cimatrix &v) noexcept
Returns componentwise the infimum of the imaginary part.
rmatrix_subv operator[](const int &i) const noexcept
Operator for accessing a single row of the matrix.
rmatrix & operator=(const real &r) noexcept
Implementation of standard assigning operator.
rmatrix & operator-=(const srmatrix &m)
Implementation of substraction and allocation operation.
friend rmatrix SupIm(const cimatrix &v) noexcept
Returns componentwise the supremum of the imaginary part.
rmatrix() noexcept
Constructor of class rmatrix.
friend rmatrix InfRe(const cimatrix &v) noexcept
Returns componentwise the infimum of the real part.
rmatrix & operator()() noexcept
Operator for accessing the whole matrix.
rmatrix & operator*=(const srmatrix &m)
Implementation of multiplication and allocation operation.
rmatrix & operator+=(const srmatrix &m)
Implementation of addition and allocation operation.
The Data Type rvector_slice.
rvector() noexcept
Constructor of class rvector.
A slice of a sparse real matrix.
Represents a row or column vector of a sparse matrix.
Helper class for slices of sparse vectors.
The namespace cxsc, providing all functionality of the class library C-XSC.
cimatrix_subv Col(cimatrix &m, const int &i) noexcept
Returns one column of the matrix as a vector.
void accumulate_approx(cdotprecision &dp, const cmatrix_subv &rv1, const cmatrix_subv &rv2)
The accurate scalar product of the last two arguments added to the value of the first argument (witho...
int ColLen(const cimatrix &)
Returns the column dimension.
rmatrix CompMat(const cimatrix &A)
Returns Ostrowski's comparison matrix.
rmatrix _rmatrix(const rmatrix &rm) noexcept
Deprecated typecast, which only exist for the reason of compatibility with older versions of C-XSC.
civector operator/(const cimatrix_subv &rv, const cinterval &s) noexcept
Implementation of division operation.
cimatrix transp(const cimatrix &A)
Returns the transposed matrix.
cimatrix_subv Row(cimatrix &m, const int &i) noexcept
Returns one row of the matrix as a vector.
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.
void DoubleSize(cimatrix &A)
Doubles the size of the matrix.
cdotprecision & operator+=(cdotprecision &cd, const l_complex &lc) noexcept
Implementation of standard algebraic addition and allocation operation.
cimatrix Id(const cimatrix &A)
Returns the Identity matrix.
cimatrix & operator*=(cimatrix &m, const cinterval &c) noexcept
Implementation of multiplication and allocation operation.
ivector abs(const cimatrix_subv &mv) noexcept
Returns the absolute value 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 & 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.
cimatrix & operator/=(cimatrix &m, const cinterval &c) noexcept
Implementation of division and allocation operation.