26#ifndef _CXSC_CMATRIX_HPP_INCLUDED
27#define _CXSC_CMATRIX_HPP_INCLUDED
29#include "xscclass.hpp"
62 int size,start,offset;
93#ifdef _CXSC_FRIEND_TPL
95template <
class MV1,
class MV2>
friend MV1 &_mvmvassign(MV1 &v,
const MV2 &rv)
101template <
class MV,
class S>
friend MV &_mvsassign(MV &v,
const S &r)
noexcept;
102template <
class MV,
class V>
friend MV &_mvvassign(MV &v,
const V &rv)
108template <
class V,
class MV2,
class S>
friend V &_vmvassign(V &v,
const MV2 &rv)
noexcept;
109template <
class MV,
class V>
friend V _mvabs(
const MV &mv)
noexcept;
110template <
class MV,
class V>
friend V _mvim(
const MV &mv)
noexcept;
111template <
class MV,
class V>
friend V _mvre(
const MV &mv)
noexcept;
112template <
class MV,
class V>
friend MV &_mvvsetim(MV &v,
const V &rv)
118template <
class MV,
class V>
friend MV &_mvvsetre(MV &v,
const V &rv)
124 template <
class MV,
class S>
friend MV &_mvssetim(MV &mv,
const S &s)
noexcept;
125 template <
class MV,
class S>
friend MV &_mvssetre(MV &mv,
const S &s)
noexcept;
126template <
class DP,
class V,
class SV>
friend void _vmvaccu(DP &dp,
const V & rv1,
const SV &rv2)
132template <
class DP,
class MV1,
class MV2>
friend void _mvmvaccu(DP &dp,
const MV1 & rv1,
const MV2 &rv2)
139 template <
class MV1,
class MV2,
class S>
friend S _mvmvcmult(
const MV1 & rv1,
const MV2 &rv2)
145 template <
class MV1,
class MV2,
class S>
friend S _mvmvcimult(
const MV1 & rv1,
const MV2 &rv2)
151 template <
class V,
class MV,
class S>
friend S _vmvcmult(
const V &rv1,
const MV &rv2)
157 template <
class V,
class MV,
class S>
friend S _vmvcimult(
const V &rv1,
const MV &rv2)
163 template <
class MV,
class S,
class E>
friend E _mvsmult(
const MV &rv,
const S &s)
noexcept;
164 template <
class MV1,
class MV2,
class E>
friend E _mvmvplus(
const MV1 &rv1,
const MV2 &rv2)
170 template <
class MV1,
class MV2,
class E>
friend E _mvmvminus(
const MV1 &rv1,
const MV2 &rv2)
176 template <
class MV,
class V,
class E>
friend E _mvvplus(
const MV &rv1,
const V &rv2)
182 template <
class MV,
class V,
class E>
friend E _mvvminus(
const MV &rv1,
const V &rv2)
188 template <
class V,
class MV,
class E>
friend E _vmvminus(
const V &rv1,
const MV &rv2)
194 template <
class MV,
class S,
class E>
friend E _mvsdiv(
const MV &rv,
const S &s)
noexcept;
195template <
class MV,
class S>
friend MV &_mvsmultassign(MV &v,
const S &r)
noexcept;
196template <
class MV,
class S>
friend MV &_mvsplusassign(MV &v,
const S &r)
noexcept;
197template <
class MV,
class S>
friend MV &_mvsminusassign(MV &v,
const S &r)
noexcept;
198template <
class MV,
class S>
friend MV &_mvsdivassign(MV &v,
const S &r)
noexcept;
199template <
class MV,
class V>
friend MV &_mvvplusassign(MV &v,
const V &rv)
205template <
class V,
class MV>
friend V &_vmvplusassign(V &rv,
const MV &v)
211template <
class MV,
class V>
friend MV &_mvvminusassign(MV &v,
const V &rv)
217template <
class V,
class MV>
friend V &_vmvminusassign(V &rv,
const MV &v)
228template <
class V,
class MV>
friend V &_vmvsetinf(V &rv,
const MV &v)
234template <
class V,
class MV>
friend V &_vmvsetsup(V &rv,
const MV &v)
240template <
class V,
class MV>
friend V &_vmvusetinf(V &rv,
const MV &v)
246template <
class V,
class MV>
friend V &_vmvusetsup(V &rv,
const MV &v)
258 explicit INLINE
cmatrix_subv (
complex *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) { }
520 int lb1,ub1,lb2,ub2,xsize,ysize;
523 double* to_blas_array()
const {
return (
double*)dat; }
525#ifdef _CXSC_FRIEND_TPL
527template <
class S,
class M>
friend void _smconstr(S &s,
const M &m)
533template <
class V,
class M,
class S>
friend void _vmconstr(V &v,
const M &m)
539 template <
class M1,
class M2,
class S>
friend M1 &_mmassign(M1 &m1,
const M2 &m,S ms)
noexcept;
540 template <
class M,
class MS2,
class S>
friend M &_mmsassign(M &m,
const MS2 &ms)
noexcept;
541 template <
class MS,
class M>
friend MS &_msmassign(MS &ms,
const M &m)
547 template <
class M,
class S>
friend M &_msassign(M &m,
const S &r)
noexcept;
548template <
class V,
class M,
class S>
friend V &_vmassign(V &v,
const M &m)
554template <
class M,
class V,
class S>
friend M &_mvassign(M &m,
const V &v)
noexcept;
555 template <
class M>
friend int _mlb(
const M &m,
const int &i)
561 template <
class M>
friend int _mub(
const M &m,
const int &i)
567 template <
class M>
friend M &_msetlb(M &m,
const int &i,
const int &j)
573 template <
class M>
friend M &_msetub(M &m,
const int &i,
const int &j)
579 template <
class M,
class E>
friend E _mre(
const M &m)
noexcept;
580 template <
class M,
class E>
friend E _mim(
const M &m)
noexcept;
581 template <
class M1,
class M2>
friend M1 &_mmsetre(M1 &m1,
const M2 &m2)
587 template <
class M1,
class M2>
friend M1 &_mmsetim(M1 &m1,
const M2 &m2)
593 template <
class M1,
class MS2>
friend M1 &_mmssetre(M1 &m1,
const MS2 &ms2)
599 template <
class M1,
class MS2>
friend M1 &_mmssetim(M1 &m1,
const MS2 &ms2)
605 template <
class M>
friend void _mresize(M &A)
noexcept;
606 template <
class M,
class S>
friend void _mresize(M &A,
const int &m,
const int &n)
612 template <
class M,
class S>
friend void _mresize(M &A,
const int &m1,
const int &m2,
const int &n1,
const int &n2)
618 template <
class M,
class E>
friend E _mabs(
const M &m)
noexcept;
620 template <
class M1,
class M2,
class E>
friend E _mmplus(
const M1 &m1,
const M2 &m2)
626 template <
class M,
class MS,
class E>
friend E _mmsplus(
const M &m,
const MS &ms)
632 template <
class M>
friend M _mminus(
const M &m)
noexcept;
633 template <
class MS,
class E>
friend E _msminus(
const MS &ms)
noexcept;
634 template <
class M1,
class M2,
class E>
friend E _mmminus(
const M1 &m1,
const M2 &m2)
640 template <
class M1,
class M2>
friend M1 &_mmplusassign(M1 &m1,
const M2 &m2)
646 template <
class M,
class MS>
friend M &_mmsplusassign(M &m1,
const MS &ms)
652 template <
class MS,
class M>
friend MS &_msmplusassign(MS &ms,
const M &m1)
658 template <
class MS1,
class MS2,
class E>
friend E _msmsplus(
const MS1 &m1,
const MS2 &m2)
664 template <
class M,
class MS,
class E>
friend E _mmsminus(
const M &m,
const MS &ms)
670 template <
class MS,
class M,
class E>
friend E _msmminus(
const MS &ms,
const M &m)
676 template <
class MS1,
class MS2,
class E>
friend E _msmsminus(
const MS1 &ms1,
const MS2 &ms2)
682 template <
class M1,
class M2>
friend M1 &_mmminusassign(M1 &m1,
const M2 &m2)
688 template <
class M,
class MS>
friend M &_mmsminusassign(M &m1,
const MS &ms)
694 template <
class MS,
class M>
friend MS &_msmminusassign(MS &ms,
const M &m1)
700 template <
class M1,
class M2,
class E>
friend E _mmcmult(
const M1 &m1,
const M2 &m2)
706 template <
class M1,
class M2,
class E>
friend E _mmcimult(
const M1 &m1,
const M2 &m2)
712 template <
class M1,
class M2,
class S>
friend M1 &_mmcmultassign(M1 &m1,
const M2 &m2)
718 template <
class M1,
class M2,
class S>
friend M1 &_mmcimultassign(M1 &m1,
const M2 &m2)
724 template <
class M,
class MS,
class E>
friend E _mmscmult(
const M &m1,
const MS &ms)
730 template <
class M,
class MS,
class E>
friend E _mmscimult(
const M &m1,
const MS &ms)
736 template <
class MS,
class M,
class E>
friend E _msmcmult(
const MS &ms,
const M &m2)
742 template <
class MS,
class M,
class E>
friend E _msmcimult(
const MS &ms,
const M &m2)
748 template <
class M,
class MS,
class S>
friend M &_mmscmultassign(M &m1,
const MS &ms)
754 template <
class M,
class MS,
class S>
friend M &_mmscimultassign(M &m1,
const MS &ms)
760 template <
class MS1,
class MS2,
class E>
friend E _msmscmult(
const MS1 &ms1,
const MS2 &ms2)
766 template <
class MS1,
class MS2,
class E>
friend E _msmscimult(
const MS1 &ms1,
const MS2 &ms2)
772 template <
class M1,
class M2,
class E>
friend E _mmconv(
const M1 &m1,
const M2 &m2)
778 template <
class M,
class MS,
class E>
friend E _mmsconv(
const M &m,
const MS &ms)
785 template <
class S,
class M,
class E>
friend E _smmult(
const S &c,
const M &m)
noexcept;
786 template <
class M,
class S>
friend M &_msmultassign(M &m,
const S &c)
noexcept;
787 template <
class S,
class MS,
class E>
friend E _smsmult(
const S &c,
const MS &ms)
noexcept;
788 template <
class M,
class S,
class E>
friend E _msdiv(
const M &m,
const S &c)
noexcept;
789 template <
class M,
class S>
friend M &_msdivassign(M &m,
const S &c)
noexcept;
790 template <
class MS,
class S,
class E>
friend E _mssdiv(
const MS &ms,
const S &c)
noexcept;
792 template <
class M,
class V,
class E>
friend E _mvcmult(
const M &m,
const V &v)
798 template <
class M,
class V,
class E>
friend E _mvcimult(
const M &m,
const V &v)
804 template <
class V,
class M,
class E>
friend E _vmcmult(
const V &v,
const M &m)
810 template <
class V,
class M,
class E>
friend E _vmcimult(
const V &v,
const M &m)
816 template <
class V,
class M,
class S>
friend V &_vmcmultassign(V &v,
const M &m)
822 template <
class V,
class M,
class S>
friend V &_vmcimultassign(V &v,
const M &m)
828 template <
class VS,
class M,
class S>
friend VS &_vsmcmultassign(VS &v,
const M &m)
834 template <
class VS,
class M,
class S>
friend VS &_vsmcimultassign(VS &v,
const M &m)
841 template <
class M>
friend void *_mvoid(
const M &m)
noexcept;
842 template <
class M>
friend bool _mnot(
const M &m)
noexcept;
843 template <
class MS>
friend void *_msvoid(
const MS &ms)
noexcept;
844 template <
class MS>
friend bool _msnot(
const MS &ms)
noexcept;
845 template <
class M1,
class M2>
friend bool _mmeq(
const M1 &m1,
const M2 &m2)
noexcept;
846 template <
class M1,
class M2>
friend bool _mmneq(
const M1 &m1,
const M2 &m2)
noexcept;
847 template <
class M1,
class M2>
friend bool _mmless(
const M1 &m1,
const M2 &m2)
noexcept;
848 template <
class M1,
class M2>
friend bool _mmleq(
const M1 &m1,
const M2 &m2)
noexcept;
849 template <
class M,
class MS>
friend bool _mmseq(
const M &m1,
const MS &ms)
noexcept;
850 template <
class M,
class MS>
friend bool _mmsneq(
const M &m1,
const MS &ms)
noexcept;
851 template <
class M,
class MS>
friend bool _mmsless(
const M &m1,
const MS &ms)
noexcept;
852 template <
class M,
class MS>
friend bool _mmsleq(
const M &m1,
const MS &ms)
noexcept;
853 template <
class MS,
class M>
friend bool _msmless(
const MS &ms,
const M &m1)
noexcept;
854 template <
class MS,
class M>
friend bool _msmleq(
const MS &ms,
const M &m1)
noexcept;
855 template <
class M>
friend std::ostream &_mout(std::ostream &s,
const M &r)
noexcept;
856 template <
class M>
friend std::istream &_min(std::istream &s,M &r)
noexcept;
865 template <
class MS,
class V,
class E>
friend E _msvcmult(
const MS &ms,
const V &v)
871 template <
class MS,
class V,
class E>
friend E _msvcimult(
const MS &ms,
const V &v)
877 template <
class V,
class MS,
class E>
friend E _vmscmult(
const V &v,
const MS &ms)
883 template <
class V,
class MS,
class E>
friend E _vmscimult(
const V &v,
const MS &ms)
893 template <
class MS1,
class MS2,
class E>
friend E _msmsconv(
const MS1 &m1,
const MS2 &m2)
899 template <
class M1,
class M2,
class E>
friend E _mmsect(
const M1 &m1,
const M2 &m2)
905 template <
class M,
class MS,
class E>
friend E _mmssect(
const M &m,
const MS &ms)
912 template <
class MS1,
class MS2,
class E>
friend E _msmssect(
const MS1 &m1,
const MS2 &m2)
924 template <
class M,
class E>
friend E _mdiam(
const M &m)
noexcept;
925 template <
class M,
class E>
friend E _mmid(
const M &m)
noexcept;
926 template <
class MS,
class E>
friend E _msdiam(
const MS &ms)
noexcept;
927 template <
class MS,
class E>
friend E _msmid(
const MS &ms)
noexcept;
928 template <
class M,
class E>
friend E _minf(
const M &m)
noexcept;
929 template <
class MS,
class E>
friend E _msinf(
const MS &ms)
noexcept;
930 template <
class M,
class E>
friend E _msup(
const M &m)
noexcept;
931 template <
class MS,
class E>
friend E _mssup(
const MS &ms)
noexcept;
932 template <
class M1,
class M2>
friend M1 &_mmsetinf(M1 &m1,
const M2 &m2)
938 template <
class M1,
class M2>
friend M1 &_mmsetsup(M1 &m1,
const M2 &m2)
944 template <
class M1,
class M2>
friend M1 &_mmusetinf(M1 &m1,
const M2 &m2)
950 template <
class M1,
class M2>
friend M1 &_mmusetsup(M1 &m1,
const M2 &m2)
956 template <
class MS1,
class M2>
friend MS1 &_msmsetinf(MS1 &ms1,
const M2 &m2)
962 template <
class MS1,
class M2>
friend MS1 &_msmsetsup(MS1 &ms1,
const M2 &m2)
968 template <
class MS1,
class M2>
friend MS1 &_msmusetinf(MS1 &ms1,
const M2 &m2)
974 template <
class MS1,
class M2>
friend MS1 &_msmusetsup(MS1 &ms1,
const M2 &m2)
983 template <
class M1,
class M2>
friend M1 &_mmconvassign(M1 &m1,
const M2 &m2)
989 template <
class M,
class MS>
friend M &_mmsconvassign(M &m1,
const MS &ms)
995 template <
class MS,
class M>
friend MS &_msmconvassign(MS &ms,
const M &m1)
1002 template <
class M1,
class M2>
friend M1 &_mmsectassign(M1 &m1,
const M2 &m2)
1003#if(CXSC_INDEX_CHECK)
1008 template <
class M,
class MS>
friend M &_mmssectassign(M &m1,
const MS &ms)
1009#if(CXSC_INDEX_CHECK)
1014 template <
class MS,
class M>
friend MS &_msmsectassign(MS &ms,
const M &m1)
1015#if(CXSC_INDEX_CHECK)
1040 explicit INLINE
cmatrix(
const int &m,
const int &n)
1041#if(CXSC_INDEX_CHECK)
1047 explicit INLINE
cmatrix(
const int &m1,
const int &n1,
const int &m2,
const int &n2)
1048#if(CXSC_INDEX_CHECK)
1105 INLINE
~cmatrix()
noexcept {
delete [] dat; }
1148#if(CXSC_INDEX_CHECK)
1155#if(CXSC_INDEX_CHECK)
1162#if(CXSC_INDEX_CHECK)
1169#if(CXSC_INDEX_CHECK)
1178#if(CXSC_INDEX_CHECK)
1185#if(CXSC_INDEX_CHECK)
1190 INLINE
operator void*()
noexcept;
1208 int offset1,offset2,mxsize,mysize;
1209 int start1,end1,start2,end2,sxsize,sysize;
1213#ifdef _CXSC_FRIEND_TPL
1215template <
class V,
class MS,
class S>
friend void _vmsconstr(V &v,
const MS &m)
1216#if(CXSC_INDEX_CHECK)
1221 template <
class MS,
class M>
friend MS &_msmassign(MS &ms,
const M &m)
1222#if(CXSC_INDEX_CHECK)
1227 template <
class MS1,
class MS2>
friend MS1 &_msmsassign(MS1 &ms1,
const MS2 &ms)
1228#if(CXSC_INDEX_CHECK)
1233 template <
class M,
class MS2,
class S>
friend M &_mmsassign(M &m,
const MS2 &ms)
noexcept;
1234 template <
class MS,
class S>
friend MS &_mssassign(MS &ms,
const S &r)
noexcept;
1236 template <
class MS>
friend int _mslb(
const MS &ms,
const int &i)
1237#if(CXSC_INDEX_CHECK)
1242 template <
class MS>
friend int _msub(
const MS &ms,
const int &i)
1243#if(CXSC_INDEX_CHECK)
1248 template <
class MS,
class E>
friend E _msre(
const MS &ms)
noexcept;
1249 template <
class MS,
class E>
friend E _msim(
const MS &ms)
noexcept;
1250 template <
class MS1,
class M2>
friend MS1 &_msmsetre(MS1 &ms1,
const M2 &m2)
1251#if(CXSC_INDEX_CHECK)
1256 template <
class MS1,
class M2>
friend MS1 &_msmsetim(MS1 &ms1,
const M2 &m2)
1257#if(CXSC_INDEX_CHECK)
1262 template <
class MS1,
class MS2>
friend MS1 &_msmssetre(MS1 &ms1,
const MS2 &ms2)
1263#if(CXSC_INDEX_CHECK)
1268 template <
class MS1,
class MS2>
friend MS1 &_msmssetim(MS1 &ms1,
const MS2 &ms2)
1269#if(CXSC_INDEX_CHECK)
1274 template <
class MS,
class E>
friend E _msabs(
const MS &ms)
noexcept;
1276 template <
class MS,
class E>
friend E _msminus(
const MS &ms)
noexcept;
1277 template <
class M,
class MS,
class E>
friend E _mmsplus(
const M &m,
const MS &ms)
1278#if(CXSC_INDEX_CHECK)
1283 template <
class MS1,
class MS2,
class E>
friend E _msmsplus(
const MS1 &m1,
const MS2 &m2)
1284#if(CXSC_INDEX_CHECK)
1289 template <
class M,
class MS>
friend M &_mmsplusassign(M &m1,
const MS &ms)
1290#if(CXSC_INDEX_CHECK)
1295 template <
class MS,
class M>
friend MS &_msmplusassign(MS &ms,
const M &m1)
1296#if(CXSC_INDEX_CHECK)
1301 template <
class MS1,
class MS2>
friend MS1 &_msmsplusassign(MS1 &ms1,
const MS2 &ms2)
1302#if(CXSC_INDEX_CHECK)
1307 template <
class M,
class MS,
class E>
friend E _mmsminus(
const M &m,
const MS &ms)
1308#if(CXSC_INDEX_CHECK)
1313 template <
class MS,
class M,
class E>
friend E _msmminus(
const MS &ms,
const M &m)
1314#if(CXSC_INDEX_CHECK)
1319 template <
class MS1,
class MS2,
class E>
friend E _msmsminus(
const MS1 &ms1,
const MS2 &ms2)
1320#if(CXSC_INDEX_CHECK)
1325 template <
class M,
class MS>
friend M &_mmsminusassign(M &m1,
const MS &ms)
1326#if(CXSC_INDEX_CHECK)
1331 template <
class MS,
class M>
friend MS &_msmminusassign(MS &ms,
const M &m1)
1332#if(CXSC_INDEX_CHECK)
1337 template <
class MS1,
class MS2>
friend MS1 &_msmsminusassign(MS1 &ms1,
const MS2 &ms2)
1338#if(CXSC_INDEX_CHECK)
1343 template <
class M,
class MS,
class E>
friend E _mmscmult(
const M &m1,
const MS &ms)
1344#if(CXSC_INDEX_CHECK)
1349 template <
class M,
class MS,
class E>
friend E _mmscimult(
const M &m1,
const MS &ms)
1350#if(CXSC_INDEX_CHECK)
1355 template <
class MS,
class M,
class E>
friend E _msmcmult(
const MS &ms,
const M &m2)
1356#if(CXSC_INDEX_CHECK)
1361 template <
class MS,
class M,
class E>
friend E _msmcimult(
const MS &ms,
const M &m2)
1362#if(CXSC_INDEX_CHECK)
1367 template <
class M,
class MS,
class S>
friend M &_mmscmultassign(M &m1,
const MS &ms)
1368#if(CXSC_INDEX_CHECK)
1373 template <
class M,
class MS,
class S>
friend M &_mmscimultassign(M &m1,
const MS &ms)
1374#if(CXSC_INDEX_CHECK)
1379 template <
class MS1,
class MS2,
class E>
friend E _msmscmult(
const MS1 &ms1,
const MS2 &ms2)
1380#if(CXSC_INDEX_CHECK)
1385 template <
class MS1,
class MS2,
class E>
friend E _msmscimult(
const MS1 &ms1,
const MS2 &ms2)
1386#if(CXSC_INDEX_CHECK)
1391 template <
class M,
class MS,
class E>
friend E _mmsconv(
const M &m,
const MS &ms)
1392#if(CXSC_INDEX_CHECK)
1397 template <
class MS1,
class MS2,
class E>
friend E _msmsconv(
const MS1 &m1,
const MS2 &m2)
1398#if(CXSC_INDEX_CHECK)
1404 template <
class MS,
class V,
class E>
friend E _msvcmult(
const MS &ms,
const V &v)
1405#if(CXSC_INDEX_CHECK)
1410 template <
class MS,
class V,
class E>
friend E _msvcimult(
const MS &ms,
const V &v)
1411#if(CXSC_INDEX_CHECK)
1416 template <
class V,
class MS,
class E>
friend E _vmscmult(
const V &v,
const MS &ms)
1417#if(CXSC_INDEX_CHECK)
1422 template <
class V,
class MS,
class E>
friend E _vmscimult(
const V &v,
const MS &ms)
1423#if(CXSC_INDEX_CHECK)
1428 template <
class V,
class MS,
class S>
friend V &_vmscmultassign(V &v,
const MS &ms)
1429#if(CXSC_INDEX_CHECK)
1434 template <
class V,
class MS,
class S>
friend V &_vmscimultassign(V &v,
const MS &ms)
1435#if(CXSC_INDEX_CHECK)
1441 template <
class S,
class MS,
class E>
friend E _smsmult(
const S &c,
const MS &ms)
noexcept;
1442 template <
class MS,
class S>
friend MS &_mssmultassign(MS &ms,
const S &c)
noexcept;
1443 template <
class MS,
class S,
class E>
friend E _mssdiv(
const MS &ms,
const S &c)
noexcept;
1444 template <
class MS,
class S>
friend MS &_mssdivassign(MS &ms,
const S &c)
noexcept;
1446 template <
class MS>
friend void *_msvoid(
const MS &ms)
noexcept;
1447 template <
class MS>
friend bool _msnot(
const MS &ms)
noexcept;
1448 template <
class M,
class MS>
friend bool _mmseq(
const M &m1,
const MS &ms)
noexcept;
1449 template <
class M,
class MS>
friend bool _mmsneq(
const M &m1,
const MS &ms)
noexcept;
1450 template <
class M,
class MS>
friend bool _mmsless(
const M &m1,
const MS &ms)
noexcept;
1451 template <
class M,
class MS>
friend bool _mmsleq(
const M &m1,
const MS &ms)
noexcept;
1452 template <
class MS,
class M>
friend bool _msmless(
const MS &ms,
const M &m1)
noexcept;
1453 template <
class MS,
class M>
friend bool _msmleq(
const MS &ms,
const M &m1)
noexcept;
1454 template <
class MS1,
class MS2>
friend bool _msmseq(
const MS1 &ms1,
const MS2 &ms2)
noexcept;
1455 template <
class MS1,
class MS2>
friend bool _msmsneq(
const MS1 &ms1,
const MS2 &ms2)
noexcept;
1456 template <
class MS1,
class MS2>
friend bool _msmsless(
const MS1 &ms1,
const MS2 &ms2)
noexcept;
1457 template <
class MS1,
class MS2>
friend bool _msmsleq(
const MS1 &ms1,
const MS2 &ms2)
noexcept;
1458 template <
class MS>
friend std::ostream &_msout(std::ostream &s,
const MS &r)
noexcept;
1459 template <
class MS>
friend std::istream &_msin(std::istream &s,MS &r)
noexcept;
1469 template <
class M,
class MS,
class E>
friend E _mmssect(
const M &m,
const MS &ms)
1470#if(CXSC_INDEX_CHECK)
1475 template <
class MS1,
class MS2,
class E>
friend E _msmssect(
const MS1 &m1,
const MS2 &m2)
1476#if(CXSC_INDEX_CHECK)
1486 template <
class M1,
class MS2>
friend M1 &_mmssetinf(M1 &m1,
const MS2 &ms2)
1487#if(CXSC_INDEX_CHECK)
1492 template <
class M1,
class MS2>
friend M1 &_mmssetsup(M1 &m1,
const MS2 &ms2)
1493#if(CXSC_INDEX_CHECK)
1498 template <
class M1,
class MS2>
friend M1 &_mmsusetinf(M1 &m1,
const MS2 &ms2)
1499#if(CXSC_INDEX_CHECK)
1504 template <
class M1,
class MS2>
friend M1 &_mmsusetsup(M1 &m1,
const MS2 &ms2)
1505#if(CXSC_INDEX_CHECK)
1510 template <
class MS1,
class MS2>
friend MS1 &_msmssetinf(MS1 &ms1,
const MS2 &ms2)
1511#if(CXSC_INDEX_CHECK)
1516 template <
class MS1,
class MS2>
friend MS1 &_msmssetsup(MS1 &ms1,
const MS2 &ms2)
1517#if(CXSC_INDEX_CHECK)
1522 template <
class MS1,
class MS2>
friend MS1 &_msmsusetinf(MS1 &ms1,
const MS2 &ms2)
1523#if(CXSC_INDEX_CHECK)
1528 template <
class MS1,
class MS2>
friend MS1 &_msmsusetsup(MS1 &ms1,
const MS2 &ms2)
1529#if(CXSC_INDEX_CHECK)
1537 template <
class M,
class MS>
friend M &_mmsconvassign(M &m1,
const MS &ms)
1538#if(CXSC_INDEX_CHECK)
1543 template <
class MS1,
class MS2>
friend MS1 &_msmsconvassign(MS1 &ms1,
const MS2 &ms2)
1544#if(CXSC_INDEX_CHECK)
1550 template <
class M,
class MS>
friend M &_mmssectassign(M &m1,
const MS &ms)
1551#if(CXSC_INDEX_CHECK)
1556 template <
class MS1,
class MS2>
friend MS1 &_msmssectassign(MS1 &ms1,
const MS2 &ms2)
1557#if(CXSC_INDEX_CHECK)
1579 explicit INLINE
cmatrix_slice(
cmatrix &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) { }
1581 explicit INLINE
cmatrix_slice(
cmatrix_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) { }
1584 INLINE
cmatrix_slice(
const cmatrix_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) { }
1590#if(CXSC_INDEX_CHECK)
1598#if(CXSC_INDEX_CHECK)
1617#if(CXSC_INDEX_CHECK)
1626#if(CXSC_INDEX_CHECK)
1633#if(CXSC_INDEX_CHECK)
1640#if(CXSC_INDEX_CHECK)
1647#if(CXSC_INDEX_CHECK)
1656#if(CXSC_INDEX_CHECK)
1663#if(CXSC_INDEX_CHECK)
1670#if(CXSC_INDEX_CHECK)
1677#if(CXSC_INDEX_CHECK)
1685#if(CXSC_INDEX_CHECK)
1692#if(CXSC_INDEX_CHECK)
1701#if(CXSC_INDEX_CHECK)
1708#if(CXSC_INDEX_CHECK)
1742#if(CXSC_INDEX_CHECK)
1749#if(CXSC_INDEX_CHECK)
1756#if(CXSC_INDEX_CHECK)
1763#if(CXSC_INDEX_CHECK)
1770#if(CXSC_INDEX_CHECK)
1777#if(CXSC_INDEX_CHECK)
1784#if(CXSC_INDEX_CHECK)
1791#if(CXSC_INDEX_CHECK)
1798#if(CXSC_INDEX_CHECK)
1805#if(CXSC_INDEX_CHECK)
1812#if(CXSC_INDEX_CHECK)
1819#if(CXSC_INDEX_CHECK)
1826#if(CXSC_INDEX_CHECK)
1833#if(CXSC_INDEX_CHECK)
1840#if(CXSC_INDEX_CHECK)
1847#if(CXSC_INDEX_CHECK)
1860 INLINE
operator void*()
noexcept;
1887#if(CXSC_INDEX_CHECK)
1894#if(CXSC_INDEX_CHECK)
1907#if(CXSC_INDEX_CHECK)
1918#if(CXSC_INDEX_CHECK)
1929#if(CXSC_INDEX_CHECK)
1940#if(CXSC_INDEX_CHECK)
1951#if(CXSC_INDEX_CHECK)
1963#if(CXSC_INDEX_CHECK)
1970#if(CXSC_INDEX_CHECK)
1977#if(CXSC_INDEX_CHECK)
1984#if(CXSC_INDEX_CHECK)
1991#if(CXSC_INDEX_CHECK)
1999#if(CXSC_INDEX_CHECK)
2006#if(CXSC_INDEX_CHECK)
2013#if(CXSC_INDEX_CHECK)
2020#if(CXSC_INDEX_CHECK)
2027#if(CXSC_INDEX_CHECK)
2035#if(CXSC_INDEX_CHECK)
2042#if(CXSC_INDEX_CHECK)
2049#if(CXSC_INDEX_CHECK)
2056#if(CXSC_INDEX_CHECK)
2063#if(CXSC_INDEX_CHECK)
2071#if(CXSC_INDEX_CHECK)
2078#if(CXSC_INDEX_CHECK)
2085#if(CXSC_INDEX_CHECK)
2092#if(CXSC_INDEX_CHECK)
2099#if(CXSC_INDEX_CHECK)
2118 INLINE
int Lb(
const cmatrix &rm,
const int &i)
2119#if(CXSC_INDEX_CHECK)
2125 INLINE
int Ub(
const cmatrix &rm,
const int &i)
2126#if(CXSC_INDEX_CHECK)
2133#if(CXSC_INDEX_CHECK)
2140#if(CXSC_INDEX_CHECK)
2147#if(CXSC_INDEX_CHECK)
2154#if(CXSC_INDEX_CHECK)
2163#if(CXSC_INDEX_CHECK)
2169 INLINE
void Resize(
cmatrix &A,
const int &m1,
const int &m2,
const int &n1,
const int &n2)
2170#if(CXSC_INDEX_CHECK)
2190#if(CXSC_INDEX_CHECK)
2197#if(CXSC_INDEX_CHECK)
2204#if(CXSC_INDEX_CHECK)
2211#if(CXSC_INDEX_CHECK)
2218#if(CXSC_INDEX_CHECK)
2225#if(CXSC_INDEX_CHECK)
2232#if(CXSC_INDEX_CHECK)
2239#if(CXSC_INDEX_CHECK)
2303#if(CXSC_INDEX_CHECK)
2310#if(CXSC_INDEX_CHECK)
2317#if(CXSC_INDEX_CHECK)
2324#if(CXSC_INDEX_CHECK)
2331#if(CXSC_INDEX_CHECK)
2338#if(CXSC_INDEX_CHECK)
2346#if(CXSC_INDEX_CHECK)
2353#if(CXSC_INDEX_CHECK)
2363#if(CXSC_INDEX_CHECK)
2370#if(CXSC_INDEX_CHECK)
2377#if(CXSC_INDEX_CHECK)
2385#if(CXSC_INDEX_CHECK)
2392#if(CXSC_INDEX_CHECK)
2407#if(CXSC_INDEX_CHECK)
2414#if(CXSC_INDEX_CHECK)
2421#if(CXSC_INDEX_CHECK)
2428#if(CXSC_INDEX_CHECK)
2435#if(CXSC_INDEX_CHECK)
2442#if(CXSC_INDEX_CHECK)
2454#if(CXSC_INDEX_CHECK)
2461#if(CXSC_INDEX_CHECK)
2468#if(CXSC_INDEX_CHECK)
2475#if(CXSC_INDEX_CHECK)
2482#if(CXSC_INDEX_CHECK)
2489#if(CXSC_INDEX_CHECK)
2497#if(CXSC_INDEX_CHECK)
2504#if(CXSC_INDEX_CHECK)
2511#if(CXSC_INDEX_CHECK)
2518#if(CXSC_INDEX_CHECK)
2525#if(CXSC_INDEX_CHECK)
2532#if(CXSC_INDEX_CHECK)
2542#if(CXSC_INDEX_CHECK)
2549#if(CXSC_INDEX_CHECK)
2556#if(CXSC_INDEX_CHECK)
2563#if(CXSC_INDEX_CHECK)
2570#if(CXSC_INDEX_CHECK)
2577#if(CXSC_INDEX_CHECK)
2584#if(CXSC_INDEX_CHECK)
2591#if(CXSC_INDEX_CHECK)
2598#if(CXSC_INDEX_CHECK)
2605#if(CXSC_INDEX_CHECK)
2613#if(CXSC_INDEX_CHECK)
2620#if(CXSC_INDEX_CHECK)
2627#if(CXSC_INDEX_CHECK)
2634#if(CXSC_INDEX_CHECK)
2641#if(CXSC_INDEX_CHECK)
2648#if(CXSC_INDEX_CHECK)
2655#if(CXSC_INDEX_CHECK)
2662#if(CXSC_INDEX_CHECK)
2669#if(CXSC_INDEX_CHECK)
2676#if(CXSC_INDEX_CHECK)
2684#if(CXSC_INDEX_CHECK)
2691#if(CXSC_INDEX_CHECK)
2698#if(CXSC_INDEX_CHECK)
2705#if(CXSC_INDEX_CHECK)
2712#if(CXSC_INDEX_CHECK)
2719#if(CXSC_INDEX_CHECK)
2726#if(CXSC_INDEX_CHECK)
2733#if(CXSC_INDEX_CHECK)
2740#if(CXSC_INDEX_CHECK)
2747#if(CXSC_INDEX_CHECK)
2759 INLINE
bool operator ==(
const cmatrix &m1,
const cmatrix &m2)
noexcept;
2761 INLINE
bool operator !=(
const cmatrix &m1,
const cmatrix &m2)
noexcept;
2789 INLINE
bool operator !(
const cmatrix &ms)
noexcept;
2796 INLINE std::ostream &operator <<(std::ostream &s,
const cmatrix &r)
noexcept;
2798 INLINE std::ostream &operator <<(std::ostream &s,
const cmatrix_slice &r)
noexcept;
2800 INLINE std::istream &operator >>(std::istream &s,
cmatrix &r)
noexcept;
2802 INLINE std::istream &operator >>(std::istream &s,
cmatrix_slice &r)
noexcept;
2824#ifdef _CXSC_INCL_INL
2825#include "matrix.inl"
2826#include "cmatrix.inl"
2829#ifdef _CXSC_CIVECTOR_HPP_INCLUDED
2830# ifdef _CXSC_INCL_INL
2831# include "civeccmat.inl"
2833# include "civeccmat.hpp"
2837#ifdef _CXSC_IVECTOR_HPP_INCLUDED
2838# ifdef _CXSC_INCL_INL
2839# include "iveccmat.inl"
2841# include "iveccmat.hpp"
2845#ifdef _CXSC_IMATRIX_HPP_INCLUDED
2846# ifdef _CXSC_INCL_INL
2847# include "cmatimat.inl"
2849# include "cmatimat.hpp"
2855#define _CXSC_BLAS_CMATRIX
2856#include "cxsc_blas.inl"
The Data Type cdotprecision.
The Data Type cidotprecision.
The Data Type cmatrix_slice.
cmatrix_slice & operator=(const cmatrix &m) noexcept
Implementation of standard assigning operator.
cmatrix_slice & operator-=(const srmatrix &m)
Implementation of addition and assignment operator.
cmatrix_slice(const cmatrix_slice &ms) noexcept
Constructor of class cmatrix_slice.
cmatrix_subv operator[](const int &i) noexcept
Operator for accessing a single row of the matrix.
cmatrix_slice(cmatrix_slice &a, const int &l1, const int &u1, const int &l2, const int &u2) noexcept
Constructor of class cmatrix_slice.
cmatrix_slice & operator/=(const complex &c) noexcept
Implementation of division and allocation operation.
cmatrix_slice & operator*=(const srmatrix &m)
Implementation of addition and assignment operator.
cmatrix_slice & operator()() noexcept
Operator for accessing the whole matrix.
cmatrix_slice(cmatrix &a, const int &l1, const int &u1, const int &l2, const int &u2) noexcept
Constructor of class cmatrix_slice.
cmatrix_slice & operator+=(const srmatrix &m)
Implementation of addition and assignment operator.
cmatrix_slice & operator|=(const cmatrix &m1) noexcept
Allocates the convex hull of the arguments to the first argument.
The Data Type cmatrix_subv.
friend int VecLen(const cmatrix_subv &rv) noexcept
Returns the size of the vector.
friend int Lb(const cmatrix_subv &rv) noexcept
Returns the lower bound of the vector.
cmatrix_subv(complex *d, const int &l, const int &u, const int &s, const int &st, const int &o) noexcept
Constructor of class cmatrix_subv.
cmatrix_subv & operator=(const scmatrix_subv &rv)
Implementation of standard assigning operator.
cmatrix_subv & operator/=(const complex &c) noexcept
Implementation of division and allocation operation.
cmatrix_subv(const cmatrix_subv &v) noexcept
Constructor of class cmatrix_subv.
cmatrix_subv & operator-=(const scmatrix_subv &rv)
Implementation of standard assigning operator.
cmatrix_subv & operator+=(const scmatrix_subv &rv)
Implementation of standard assigning operator.
complex & operator[](const int &i) const noexcept
Operator for accessing the single elements of the vector (read-only)
cmatrix_subv & operator*=(const complex &c) noexcept
Implementation of multiplication and allocation operation.
cmatrix_subv & operator()() noexcept
Operator for accessing the whole vector.
friend int Ub(const cmatrix_subv &rv) noexcept
Returns the upper bound of the vector.
friend cmatrix_subv Col(cmatrix &m, const int &i) noexcept
Returns one column of the matrix as a vector.
friend cmatrix_subv Row(cmatrix &m, const int &i) noexcept
Returns one row of the matrix as a vector.
cmatrix() noexcept
Constructor of class cmatrix.
cmatrix & operator()() noexcept
Operator for accessing the whole matrix.
cmatrix & operator+=(const srmatrix &m)
Implementation of addition and assignment operator.
cmatrix & operator*=(const srmatrix &m)
Implementation of addition and assignment operator.
cmatrix & operator-=(const srmatrix &m)
Implementation of addition and assignment operator.
cmatrix_subv operator[](const int &i) const noexcept
Operator for accessing a single row of the matrix.
cmatrix & operator=(const complex &r) noexcept
Implementation of standard assigning operator.
The Data Type cvector_slice.
cvector() noexcept
Constructor of class cvector.
The Data Type rmatrix_slice.
The Data Type rmatrix_subv.
The Data Type rvector_slice.
A slice of a sparse complex matrix.
Represents a row or column vector of a sparse matrix.
Helper class for slices of sparse vectors.
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.
cdotprecision & operator+=(cdotprecision &cd, const l_complex &lc) noexcept
Implementation of standard algebraic addition and allocation operation.
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...
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.
rmatrix CompMat(const cimatrix &A)
Returns Ostrowski's comparison matrix.
civector operator/(const cimatrix_subv &rv, const cinterval &s) noexcept
Implementation of division operation.
cimatrix transp(const cimatrix &A)
Returns the transposed matrix.
cmatrix _cmatrix(const cmatrix &rm) noexcept
Deprecated typecast, which only exist for the reason of compatibility with older versions of C-XSC.
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.
cimatrix_subv Row(cimatrix &m, const int &i) noexcept
Returns one row of the matrix as a vector.
void DoubleSize(cimatrix &A)
Doubles the size of the matrix.
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.