26 #ifndef _CXSC_CMATRIX_HPP_INCLUDED 27 #define _CXSC_CMATRIX_HPP_INCLUDED 29 #include "xscclass.hpp" 32 #include "cvector.hpp" 35 #include "rmatrix.hpp" 62 int size,start,offset;
68 throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT);
75 throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT);
81 throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT);
88 throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT);
93 #ifdef _CXSC_FRIEND_TPL 95 template <
class MV1,
class MV2>
friend MV1 &_mvmvassign(MV1 &v,
const MV2 &rv)
97 throw(ERROR__OP_WITH_WRONG_DIM<MV1>);
101 template <
class MV,
class S>
friend MV &_mvsassign(MV &v,
const S &r)
throw();
102 template <
class MV,
class V>
friend MV &_mvvassign(MV &v,
const V &rv)
103 #if(CXSC_INDEX_CHECK) 104 throw(ERROR__OP_WITH_WRONG_DIM<MV>);
108 template <
class V,
class MV2,
class S>
friend V &_vmvassign(V &v,
const MV2 &rv)
throw();
109 template <
class MV,
class V>
friend V _mvabs(
const MV &mv)
throw();
110 template <
class MV,
class V>
friend V _mvim(
const MV &mv)
throw();
111 template <
class MV,
class V>
friend V _mvre(
const MV &mv)
throw();
112 template <
class MV,
class V>
friend MV &_mvvsetim(MV &v,
const V &rv)
113 #if(CXSC_INDEX_CHECK) 114 throw(ERROR__OP_WITH_WRONG_DIM<MV>);
118 template <
class MV,
class V>
friend MV &_mvvsetre(MV &v,
const V &rv)
119 #if(CXSC_INDEX_CHECK) 120 throw(ERROR__OP_WITH_WRONG_DIM<MV>);
124 template <
class MV,
class S>
friend MV &_mvssetim(MV &mv,
const S &s)
throw();
125 template <
class MV,
class S>
friend MV &_mvssetre(MV &mv,
const S &s)
throw();
126 template <
class DP,
class V,
class SV>
friend void _vmvaccu(DP &dp,
const V & rv1,
const SV &rv2)
127 #if(CXSC_INDEX_CHECK) 128 throw(OP_WITH_WRONG_DIM);
132 template <
class DP,
class MV1,
class MV2>
friend void _mvmvaccu(DP &dp,
const MV1 & rv1,
const MV2 &rv2)
133 #if(CXSC_INDEX_CHECK) 134 throw(OP_WITH_WRONG_DIM);
139 template <
class MV1,
class MV2,
class S>
friend S _mvmvcmult(
const MV1 & rv1,
const MV2 &rv2)
140 #if(CXSC_INDEX_CHECK) 141 throw(ERROR__OP_WITH_WRONG_DIM<MV1>);
145 template <
class MV1,
class MV2,
class S>
friend S _mvmvcimult(
const MV1 & rv1,
const MV2 &rv2)
146 #if(CXSC_INDEX_CHECK) 147 throw(ERROR__OP_WITH_WRONG_DIM<MV1>);
151 template <
class V,
class MV,
class S>
friend S _vmvcmult(
const V &rv1,
const MV &rv2)
152 #if(CXSC_INDEX_CHECK) 153 throw(ERROR__OP_WITH_WRONG_DIM<MV>);
157 template <
class V,
class MV,
class S>
friend S _vmvcimult(
const V &rv1,
const MV &rv2)
158 #if(CXSC_INDEX_CHECK) 159 throw(ERROR__OP_WITH_WRONG_DIM<MV>);
163 template <
class MV,
class S,
class E>
friend E _mvsmult(
const MV &rv,
const S &s)
throw();
164 template <
class MV1,
class MV2,
class E>
friend E _mvmvplus(
const MV1 &rv1,
const MV2 &rv2)
165 #if(CXSC_INDEX_CHECK) 166 throw(ERROR__OP_WITH_WRONG_DIM<E>);
170 template <
class MV1,
class MV2,
class E>
friend E _mvmvminus(
const MV1 &rv1,
const MV2 &rv2)
171 #if(CXSC_INDEX_CHECK) 172 throw(ERROR__OP_WITH_WRONG_DIM<E>);
176 template <
class MV,
class V,
class E>
friend E _mvvplus(
const MV &rv1,
const V &rv2)
177 #if(CXSC_INDEX_CHECK) 178 throw(ERROR__OP_WITH_WRONG_DIM<E>);
182 template <
class MV,
class V,
class E>
friend E _mvvminus(
const MV &rv1,
const V &rv2)
183 #if(CXSC_INDEX_CHECK) 184 throw(ERROR__OP_WITH_WRONG_DIM<E>);
188 template <
class V,
class MV,
class E>
friend E _vmvminus(
const V &rv1,
const MV &rv2)
189 #if(CXSC_INDEX_CHECK) 190 throw(ERROR__OP_WITH_WRONG_DIM<E>);
194 template <
class MV,
class S,
class E>
friend E _mvsdiv(
const MV &rv,
const S &s)
throw();
195 template <
class MV,
class S>
friend MV &_mvsmultassign(MV &v,
const S &r)
throw();
196 template <
class MV,
class S>
friend MV &_mvsplusassign(MV &v,
const S &r)
throw();
197 template <
class MV,
class S>
friend MV &_mvsminusassign(MV &v,
const S &r)
throw();
198 template <
class MV,
class S>
friend MV &_mvsdivassign(MV &v,
const S &r)
throw();
199 template <
class MV,
class V>
friend MV &_mvvplusassign(MV &v,
const V &rv)
200 #if(CXSC_INDEX_CHECK) 201 throw(ERROR__OP_WITH_WRONG_DIM<MV>);
205 template <
class V,
class MV>
friend V &_vmvplusassign(V &rv,
const MV &v)
206 #if(CXSC_INDEX_CHECK) 207 throw(ERROR__OP_WITH_WRONG_DIM<V>);
211 template <
class MV,
class V>
friend MV &_mvvminusassign(MV &v,
const V &rv)
212 #if(CXSC_INDEX_CHECK) 213 throw(ERROR__OP_WITH_WRONG_DIM<MV>);
217 template <
class V,
class MV>
friend V &_vmvminusassign(V &rv,
const MV &v)
218 #if(CXSC_INDEX_CHECK) 219 throw(ERROR__OP_WITH_WRONG_DIM<V>);
228 template <
class V,
class MV>
friend V &_vmvsetinf(V &rv,
const MV &v)
229 #if(CXSC_INDEX_CHECK) 230 throw(ERROR__OP_WITH_WRONG_DIM<V>);
234 template <
class V,
class MV>
friend V &_vmvsetsup(V &rv,
const MV &v)
235 #if(CXSC_INDEX_CHECK) 236 throw(ERROR__OP_WITH_WRONG_DIM<V>);
240 template <
class V,
class MV>
friend V &_vmvusetinf(V &rv,
const MV &v)
241 #if(CXSC_INDEX_CHECK) 242 throw(ERROR__OP_WITH_WRONG_DIM<V>);
246 template <
class V,
class MV>
friend V &_vmvusetsup(V &rv,
const MV &v)
247 #if(CXSC_INDEX_CHECK) 248 throw(ERROR__OP_WITH_WRONG_DIM<V>);
258 explicit INLINE
cmatrix_subv (
complex *d,
const int &l,
const int &u,
const int &s,
const int &st,
const int &o)
throw():dat(d),lb(l),ub(u),size(s),start(st),offset(o) { }
274 #if(CXSC_INDEX_CHECK) 275 throw(ERROR_CVECTOR_ELEMENT_NOT_IN_VEC);
282 #if(CXSC_INDEX_CHECK) 283 throw(ERROR_CVECTOR_ELEMENT_NOT_IN_VEC);
292 #if(CXSC_INDEX_CHECK) 293 throw(ERROR_CVECTOR_SUB_ARRAY_TOO_BIG);
299 #if(CXSC_INDEX_CHECK) 300 throw(ERROR_CVECTOR_SUB_ARRAY_TOO_BIG);
324 #if(CXSC_INDEX_CHECK) 325 throw(ERROR_CMATRIX_TYPE_CAST_OF_THICK_OBJ);
331 #if(CXSC_INDEX_CHECK) 332 throw(ERROR_CMATRIX_TYPE_CAST_OF_THICK_OBJ);
338 #if(CXSC_INDEX_CHECK) 339 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM);
345 #if(CXSC_INDEX_CHECK) 346 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM);
387 #if(CXSC_INDEX_CHECK) 388 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM);
394 #if(CXSC_INDEX_CHECK) 395 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM);
401 #if(CXSC_INDEX_CHECK) 402 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM);
408 #if(CXSC_INDEX_CHECK) 409 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM);
420 #if(CXSC_INDEX_CHECK) 421 throw(ERROR_CMATRIX_TYPE_CAST_OF_THICK_OBJ);
427 #if(CXSC_INDEX_CHECK) 428 throw(ERROR_CMATRIX_TYPE_CAST_OF_THICK_OBJ);
434 #if(CXSC_INDEX_CHECK) 435 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM);
441 #if(CXSC_INDEX_CHECK) 442 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM);
457 #if(CXSC_INDEX_CHECK) 458 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM);
464 #if(CXSC_INDEX_CHECK) 465 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM);
471 #if(CXSC_INDEX_CHECK) 472 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM);
478 #if(CXSC_INDEX_CHECK) 479 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM);
490 #if(CXSC_INDEX_CHECK) 491 throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT);
497 #if(CXSC_INDEX_CHECK) 498 throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT);
520 int lb1,ub1,lb2,ub2,xsize,ysize;
523 double* to_blas_array()
const {
return (
double*)dat; }
525 #ifdef _CXSC_FRIEND_TPL 527 template <
class S,
class M>
friend void _smconstr(S &s,
const M &m)
528 #if(CXSC_INDEX_CHECK) 529 throw(ERROR__TYPE_CAST_OF_THICK_OBJ<M>,ERROR__USE_OF_UNINITIALIZED_OBJ<M>);
533 template <
class V,
class M,
class S>
friend void _vmconstr(V &v,
const M &m)
534 #if(CXSC_INDEX_CHECK) 535 throw(ERROR__TYPE_CAST_OF_THICK_OBJ<M>);
539 template <
class M1,
class M2,
class S>
friend M1 &_mmassign(M1 &m1,
const M2 &m,S ms)
throw();
540 template <
class M,
class MS2,
class S>
friend M &_mmsassign(M &m,
const MS2 &ms)
throw();
541 template <
class MS,
class M>
friend MS &_msmassign(MS &ms,
const M &m)
542 #if(CXSC_INDEX_CHECK) 543 throw(ERROR__OP_WITH_WRONG_DIM<MS>);
547 template <
class M,
class S>
friend M &_msassign(M &m,
const S &r)
throw();
548 template <
class V,
class M,
class S>
friend V &_vmassign(V &v,
const M &m)
549 #if(CXSC_INDEX_CHECK) 550 throw(ERROR__TYPE_CAST_OF_THICK_OBJ<M>);
554 template <
class M,
class V,
class S>
friend M &_mvassign(M &m,
const V &v)
throw();
555 template <
class M>
friend int _mlb(
const M &m,
const int &i)
556 #if(CXSC_INDEX_CHECK) 557 throw(ERROR__WRONG_ROW_OR_COL<M>);
561 template <
class M>
friend int _mub(
const M &m,
const int &i)
562 #if(CXSC_INDEX_CHECK) 563 throw(ERROR__WRONG_ROW_OR_COL<M>);
567 template <
class M>
friend M &_msetlb(M &m,
const int &i,
const int &j)
568 #if(CXSC_INDEX_CHECK) 569 throw(ERROR__WRONG_ROW_OR_COL<M>);
573 template <
class M>
friend M &_msetub(M &m,
const int &i,
const int &j)
574 #if(CXSC_INDEX_CHECK) 575 throw(ERROR__WRONG_ROW_OR_COL<M>);
579 template <
class M,
class E>
friend E _mre(
const M &m)
throw();
580 template <
class M,
class E>
friend E _mim(
const M &m)
throw();
581 template <
class M1,
class M2>
friend M1 &_mmsetre(M1 &m1,
const M2 &m2)
582 #if(CXSC_INDEX_CHECK) 583 throw(ERROR__OP_WITH_WRONG_DIM<M1>);
587 template <
class M1,
class M2>
friend M1 &_mmsetim(M1 &m1,
const M2 &m2)
588 #if(CXSC_INDEX_CHECK) 589 throw(ERROR__OP_WITH_WRONG_DIM<M1>);
593 template <
class M1,
class MS2>
friend M1 &_mmssetre(M1 &m1,
const MS2 &ms2)
594 #if(CXSC_INDEX_CHECK) 595 throw(ERROR__OP_WITH_WRONG_DIM<M1>);
599 template <
class M1,
class MS2>
friend M1 &_mmssetim(M1 &m1,
const MS2 &ms2)
600 #if(CXSC_INDEX_CHECK) 601 throw(ERROR__OP_WITH_WRONG_DIM<M1>);
605 template <
class M>
friend void _mresize(M &A)
throw();
606 template <
class M,
class S>
friend void _mresize(M &A,
const int &m,
const int &n)
607 #if(CXSC_INDEX_CHECK) 608 throw(ERROR__WRONG_BOUNDARIES<M>);
612 template <
class M,
class S>
friend void _mresize(M &A,
const int &m1,
const int &m2,
const int &n1,
const int &n2)
613 #if(CXSC_INDEX_CHECK) 614 throw(ERROR__WRONG_BOUNDARIES<M>);
618 template <
class M,
class E>
friend E _mabs(
const M &m)
throw();
620 template <
class M1,
class M2,
class E>
friend E _mmplus(
const M1 &m1,
const M2 &m2)
621 #if(CXSC_INDEX_CHECK) 622 throw(ERROR__OP_WITH_WRONG_DIM<M1>);
626 template <
class M,
class MS,
class E>
friend E _mmsplus(
const M &m,
const MS &ms)
627 #if(CXSC_INDEX_CHECK) 628 throw(ERROR__OP_WITH_WRONG_DIM<M>);
632 template <
class M>
friend M _mminus(
const M &m)
throw();
633 template <
class MS,
class E>
friend E _msminus(
const MS &ms)
throw();
634 template <
class M1,
class M2,
class E>
friend E _mmminus(
const M1 &m1,
const M2 &m2)
635 #if(CXSC_INDEX_CHECK) 636 throw(ERROR__OP_WITH_WRONG_DIM<M1>);
640 template <
class M1,
class M2>
friend M1 &_mmplusassign(M1 &m1,
const M2 &m2)
641 #if(CXSC_INDEX_CHECK) 642 throw(ERROR__OP_WITH_WRONG_DIM<M1>);
646 template <
class M,
class MS>
friend M &_mmsplusassign(M &m1,
const MS &ms)
647 #if(CXSC_INDEX_CHECK) 648 throw(ERROR__OP_WITH_WRONG_DIM<M>);
652 template <
class MS,
class M>
friend MS &_msmplusassign(MS &ms,
const M &m1)
653 #if(CXSC_INDEX_CHECK) 654 throw(ERROR__OP_WITH_WRONG_DIM<MS>);
658 template <
class MS1,
class MS2,
class E>
friend E _msmsplus(
const MS1 &m1,
const MS2 &m2)
659 #if(CXSC_INDEX_CHECK) 660 throw(ERROR__OP_WITH_WRONG_DIM<E>);
664 template <
class M,
class MS,
class E>
friend E _mmsminus(
const M &m,
const MS &ms)
665 #if(CXSC_INDEX_CHECK) 666 throw(ERROR__OP_WITH_WRONG_DIM<E>);
670 template <
class MS,
class M,
class E>
friend E _msmminus(
const MS &ms,
const M &m)
671 #if(CXSC_INDEX_CHECK) 672 throw(ERROR__OP_WITH_WRONG_DIM<E>);
676 template <
class MS1,
class MS2,
class E>
friend E _msmsminus(
const MS1 &ms1,
const MS2 &ms2)
677 #if(CXSC_INDEX_CHECK) 678 throw(ERROR__OP_WITH_WRONG_DIM<E>);
682 template <
class M1,
class M2>
friend M1 &_mmminusassign(M1 &m1,
const M2 &m2)
683 #if(CXSC_INDEX_CHECK) 684 throw(ERROR__OP_WITH_WRONG_DIM<M1>);
688 template <
class M,
class MS>
friend M &_mmsminusassign(M &m1,
const MS &ms)
689 #if(CXSC_INDEX_CHECK) 690 throw(ERROR__OP_WITH_WRONG_DIM<M>);
694 template <
class MS,
class M>
friend MS &_msmminusassign(MS &ms,
const M &m1)
695 #if(CXSC_INDEX_CHECK) 696 throw(ERROR__OP_WITH_WRONG_DIM<MS>);
700 template <
class M1,
class M2,
class E>
friend E _mmcmult(
const M1 &m1,
const M2 &m2)
701 #if(CXSC_INDEX_CHECK) 702 throw(ERROR__OP_WITH_WRONG_DIM<E>);
706 template <
class M1,
class M2,
class E>
friend E _mmcimult(
const M1 &m1,
const M2 &m2)
707 #if(CXSC_INDEX_CHECK) 708 throw(ERROR__OP_WITH_WRONG_DIM<E>);
712 template <
class M1,
class M2,
class S>
friend M1 &_mmcmultassign(M1 &m1,
const M2 &m2)
713 #if(CXSC_INDEX_CHECK) 714 throw(ERROR__OP_WITH_WRONG_DIM<M1>);
718 template <
class M1,
class M2,
class S>
friend M1 &_mmcimultassign(M1 &m1,
const M2 &m2)
719 #if(CXSC_INDEX_CHECK) 720 throw(ERROR__OP_WITH_WRONG_DIM<M1>);
724 template <
class M,
class MS,
class E>
friend E _mmscmult(
const M &m1,
const MS &ms)
725 #if(CXSC_INDEX_CHECK) 726 throw(ERROR__OP_WITH_WRONG_DIM<E>);
730 template <
class M,
class MS,
class E>
friend E _mmscimult(
const M &m1,
const MS &ms)
731 #if(CXSC_INDEX_CHECK) 732 throw(ERROR__OP_WITH_WRONG_DIM<E>);
736 template <
class MS,
class M,
class E>
friend E _msmcmult(
const MS &ms,
const M &m2)
737 #if(CXSC_INDEX_CHECK) 738 throw(ERROR__OP_WITH_WRONG_DIM<E>);
742 template <
class MS,
class M,
class E>
friend E _msmcimult(
const MS &ms,
const M &m2)
743 #if(CXSC_INDEX_CHECK) 744 throw(ERROR__OP_WITH_WRONG_DIM<E>);
748 template <
class M,
class MS,
class S>
friend M &_mmscmultassign(M &m1,
const MS &ms)
749 #if(CXSC_INDEX_CHECK) 750 throw(ERROR__OP_WITH_WRONG_DIM<M>);
754 template <
class M,
class MS,
class S>
friend M &_mmscimultassign(M &m1,
const MS &ms)
755 #if(CXSC_INDEX_CHECK) 756 throw(ERROR__OP_WITH_WRONG_DIM<M>);
760 template <
class MS1,
class MS2,
class E>
friend E _msmscmult(
const MS1 &ms1,
const MS2 &ms2)
761 #if(CXSC_INDEX_CHECK) 762 throw(ERROR__OP_WITH_WRONG_DIM<E>);
766 template <
class MS1,
class MS2,
class E>
friend E _msmscimult(
const MS1 &ms1,
const MS2 &ms2)
767 #if(CXSC_INDEX_CHECK) 768 throw(ERROR__OP_WITH_WRONG_DIM<E>);
772 template <
class M1,
class M2,
class E>
friend E _mmconv(
const M1 &m1,
const M2 &m2)
773 #if(CXSC_INDEX_CHECK) 774 throw(ERROR__OP_WITH_WRONG_DIM<M1>);
778 template <
class M,
class MS,
class E>
friend E _mmsconv(
const M &m,
const MS &ms)
779 #if(CXSC_INDEX_CHECK) 780 throw(ERROR__OP_WITH_WRONG_DIM<M>);
785 template <
class S,
class M,
class E>
friend E _smmult(
const S &c,
const M &m)
throw();
786 template <
class M,
class S>
friend M &_msmultassign(M &m,
const S &c)
throw();
787 template <
class S,
class MS,
class E>
friend E _smsmult(
const S &c,
const MS &ms)
throw();
788 template <
class M,
class S,
class E>
friend E _msdiv(
const M &m,
const S &c)
throw();
789 template <
class M,
class S>
friend M &_msdivassign(M &m,
const S &c)
throw();
790 template <
class MS,
class S,
class E>
friend E _mssdiv(
const MS &ms,
const S &c)
throw();
792 template <
class M,
class V,
class E>
friend E _mvcmult(
const M &m,
const V &v)
793 #if(CXSC_INDEX_CHECK) 794 throw(ERROR__OP_WITH_WRONG_DIM<M>);
798 template <
class M,
class V,
class E>
friend E _mvcimult(
const M &m,
const V &v)
799 #if(CXSC_INDEX_CHECK) 800 throw(ERROR__OP_WITH_WRONG_DIM<M>);
804 template <
class V,
class M,
class E>
friend E _vmcmult(
const V &v,
const M &m)
805 #if(CXSC_INDEX_CHECK) 806 throw(ERROR__OP_WITH_WRONG_DIM<M>);
810 template <
class V,
class M,
class E>
friend E _vmcimult(
const V &v,
const M &m)
811 #if(CXSC_INDEX_CHECK) 812 throw(ERROR__OP_WITH_WRONG_DIM<M>);
816 template <
class V,
class M,
class S>
friend V &_vmcmultassign(V &v,
const M &m)
817 #if(CXSC_INDEX_CHECK) 818 throw(ERROR__OP_WITH_WRONG_DIM<M>);
822 template <
class V,
class M,
class S>
friend V &_vmcimultassign(V &v,
const M &m)
823 #if(CXSC_INDEX_CHECK) 824 throw(ERROR__OP_WITH_WRONG_DIM<M>);
828 template <
class VS,
class M,
class S>
friend VS &_vsmcmultassign(VS &v,
const M &m)
829 #if(CXSC_INDEX_CHECK) 830 throw(ERROR__OP_WITH_WRONG_DIM<M>);
834 template <
class VS,
class M,
class S>
friend VS &_vsmcimultassign(VS &v,
const M &m)
835 #if(CXSC_INDEX_CHECK) 836 throw(ERROR__OP_WITH_WRONG_DIM<M>);
841 template <
class M>
friend void *_mvoid(
const M &m)
throw();
842 template <
class M>
friend bool _mnot(
const M &m)
throw();
843 template <
class MS>
friend void *_msvoid(
const MS &ms)
throw();
844 template <
class MS>
friend bool _msnot(
const MS &ms)
throw();
845 template <
class M1,
class M2>
friend bool _mmeq(
const M1 &m1,
const M2 &m2)
throw();
846 template <
class M1,
class M2>
friend bool _mmneq(
const M1 &m1,
const M2 &m2)
throw();
847 template <
class M1,
class M2>
friend bool _mmless(
const M1 &m1,
const M2 &m2)
throw();
848 template <
class M1,
class M2>
friend bool _mmleq(
const M1 &m1,
const M2 &m2)
throw();
849 template <
class M,
class MS>
friend bool _mmseq(
const M &m1,
const MS &ms)
throw();
850 template <
class M,
class MS>
friend bool _mmsneq(
const M &m1,
const MS &ms)
throw();
851 template <
class M,
class MS>
friend bool _mmsless(
const M &m1,
const MS &ms)
throw();
852 template <
class M,
class MS>
friend bool _mmsleq(
const M &m1,
const MS &ms)
throw();
853 template <
class MS,
class M>
friend bool _msmless(
const MS &ms,
const M &m1)
throw();
854 template <
class MS,
class M>
friend bool _msmleq(
const MS &ms,
const M &m1)
throw();
855 template <
class M>
friend std::ostream &_mout(std::ostream &s,
const M &r)
throw();
856 template <
class M>
friend std::istream &_min(std::istream &s,M &r)
throw();
865 template <
class MS,
class V,
class E>
friend E _msvcmult(
const MS &ms,
const V &v)
866 #if(CXSC_INDEX_CHECK) 867 throw(ERROR__OP_WITH_WRONG_DIM<MS>);
871 template <
class MS,
class V,
class E>
friend E _msvcimult(
const MS &ms,
const V &v)
872 #if(CXSC_INDEX_CHECK) 873 throw(ERROR__OP_WITH_WRONG_DIM<MS>);
877 template <
class V,
class MS,
class E>
friend E _vmscmult(
const V &v,
const MS &ms)
878 #if(CXSC_INDEX_CHECK) 879 throw(ERROR__OP_WITH_WRONG_DIM<MS>);
883 template <
class V,
class MS,
class E>
friend E _vmscimult(
const V &v,
const MS &ms)
884 #if(CXSC_INDEX_CHECK) 885 throw(ERROR__OP_WITH_WRONG_DIM<MS>);
893 template <
class MS1,
class MS2,
class E>
friend E _msmsconv(
const MS1 &m1,
const MS2 &m2)
894 #if(CXSC_INDEX_CHECK) 895 throw(ERROR__OP_WITH_WRONG_DIM<E>);
899 template <
class M1,
class M2,
class E>
friend E _mmsect(
const M1 &m1,
const M2 &m2)
900 #if(CXSC_INDEX_CHECK) 901 throw(ERROR__OP_WITH_WRONG_DIM<M1>);
905 template <
class M,
class MS,
class E>
friend E _mmssect(
const M &m,
const MS &ms)
906 #if(CXSC_INDEX_CHECK) 907 throw(ERROR__OP_WITH_WRONG_DIM<M>);
912 template <
class MS1,
class MS2,
class E>
friend E _msmssect(
const MS1 &m1,
const MS2 &m2)
913 #if(CXSC_INDEX_CHECK) 914 throw(ERROR__OP_WITH_WRONG_DIM<E>);
924 template <
class M,
class E>
friend E _mdiam(
const M &m)
throw();
925 template <
class M,
class E>
friend E _mmid(
const M &m)
throw();
926 template <
class MS,
class E>
friend E _msdiam(
const MS &ms)
throw();
927 template <
class MS,
class E>
friend E _msmid(
const MS &ms)
throw();
928 template <
class M,
class E>
friend E _minf(
const M &m)
throw();
929 template <
class MS,
class E>
friend E _msinf(
const MS &ms)
throw();
930 template <
class M,
class E>
friend E _msup(
const M &m)
throw();
931 template <
class MS,
class E>
friend E _mssup(
const MS &ms)
throw();
932 template <
class M1,
class M2>
friend M1 &_mmsetinf(M1 &m1,
const M2 &m2)
933 #if(CXSC_INDEX_CHECK) 934 throw(ERROR__OP_WITH_WRONG_DIM<M1>);
938 template <
class M1,
class M2>
friend M1 &_mmsetsup(M1 &m1,
const M2 &m2)
939 #if(CXSC_INDEX_CHECK) 940 throw(ERROR__OP_WITH_WRONG_DIM<M1>);
944 template <
class M1,
class M2>
friend M1 &_mmusetinf(M1 &m1,
const M2 &m2)
945 #if(CXSC_INDEX_CHECK) 946 throw(ERROR__OP_WITH_WRONG_DIM<M1>);
950 template <
class M1,
class M2>
friend M1 &_mmusetsup(M1 &m1,
const M2 &m2)
951 #if(CXSC_INDEX_CHECK) 952 throw(ERROR__OP_WITH_WRONG_DIM<M1>);
956 template <
class MS1,
class M2>
friend MS1 &_msmsetinf(MS1 &ms1,
const M2 &m2)
957 #if(CXSC_INDEX_CHECK) 958 throw(ERROR__OP_WITH_WRONG_DIM<MS1>);
962 template <
class MS1,
class M2>
friend MS1 &_msmsetsup(MS1 &ms1,
const M2 &m2)
963 #if(CXSC_INDEX_CHECK) 964 throw(ERROR__OP_WITH_WRONG_DIM<MS1>);
968 template <
class MS1,
class M2>
friend MS1 &_msmusetinf(MS1 &ms1,
const M2 &m2)
969 #if(CXSC_INDEX_CHECK) 970 throw(ERROR__OP_WITH_WRONG_DIM<MS1>);
974 template <
class MS1,
class M2>
friend MS1 &_msmusetsup(MS1 &ms1,
const M2 &m2)
975 #if(CXSC_INDEX_CHECK) 976 throw(ERROR__OP_WITH_WRONG_DIM<MS1>);
983 template <
class M1,
class M2>
friend M1 &_mmconvassign(M1 &m1,
const M2 &m2)
984 #if(CXSC_INDEX_CHECK) 985 throw(ERROR__OP_WITH_WRONG_DIM<M1>);
989 template <
class M,
class MS>
friend M &_mmsconvassign(M &m1,
const MS &ms)
990 #if(CXSC_INDEX_CHECK) 991 throw(ERROR__OP_WITH_WRONG_DIM<M>);
995 template <
class MS,
class M>
friend MS &_msmconvassign(MS &ms,
const M &m1)
996 #if(CXSC_INDEX_CHECK) 997 throw(ERROR__OP_WITH_WRONG_DIM<MS>);
1002 template <
class M1,
class M2>
friend M1 &_mmsectassign(M1 &m1,
const M2 &m2)
1003 #if(CXSC_INDEX_CHECK) 1004 throw(ERROR__OP_WITH_WRONG_DIM<M1>);
1008 template <
class M,
class MS>
friend M &_mmssectassign(M &m1,
const MS &ms)
1009 #if(CXSC_INDEX_CHECK) 1010 throw(ERROR__OP_WITH_WRONG_DIM<M>);
1014 template <
class MS,
class M>
friend MS &_msmsectassign(MS &ms,
const M &m1)
1015 #if(CXSC_INDEX_CHECK) 1016 throw(ERROR__OP_WITH_WRONG_DIM<MS>);
1038 INLINE cmatrix()
throw();
1040 explicit INLINE cmatrix(
const int &m,
const int &n)
1041 #if(CXSC_INDEX_CHECK) 1042 throw(ERROR_CMATRIX_WRONG_BOUNDARIES);
1046 explicit INLINE cmatrix(
const int &m1,
const int &n1,
const int &m2,
const int &n2)
1048 #if(CXSC_INDEX_CHECK) 1049 throw(ERROR_CMATRIX_WRONG_BOUNDARIES);
1053 explicit INLINE cmatrix(
const cvector &v)
throw();
1058 explicit INLINE cmatrix(
const complex &r)
throw();
1062 INLINE cmatrix &
operator =(
const cmatrix &m)
throw();
1075 explicit INLINE cmatrix(
const real &)
throw();
1077 explicit INLINE cmatrix(
const rmatrix &rm)
throw();
1081 explicit INLINE cmatrix(
const srmatrix &rm);
1085 explicit INLINE cmatrix(
const rvector &v)
throw();
1105 INLINE ~cmatrix()
throw() {
delete [] dat; }
1148 #if(CXSC_INDEX_CHECK) 1149 throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT);
1155 #if(CXSC_INDEX_CHECK) 1156 throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT);
1162 #if(CXSC_INDEX_CHECK) 1163 throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT);
1169 #if(CXSC_INDEX_CHECK) 1170 throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT);
1174 INLINE cmatrix &
operator ()()
throw() {
return *
this; }
1178 #if(CXSC_INDEX_CHECK) 1179 throw(ERROR_CMATRIX_SUB_ARRAY_TOO_BIG);
1185 #if(CXSC_INDEX_CHECK) 1186 throw(ERROR_CMATRIX_SUB_ARRAY_TOO_BIG);
1190 INLINE
operator void*()
throw();
1208 int offset1,offset2,mxsize,mysize;
1209 int start1,end1,start2,end2,sxsize,sysize;
1213 #ifdef _CXSC_FRIEND_TPL 1215 template <
class V,
class MS,
class S>
friend void _vmsconstr(V &v,
const MS &m)
1216 #if(CXSC_INDEX_CHECK) 1217 throw(ERROR__TYPE_CAST_OF_THICK_OBJ<MS>);
1221 template <
class MS,
class M>
friend MS &_msmassign(MS &ms,
const M &m)
1222 #if(CXSC_INDEX_CHECK) 1223 throw(ERROR__OP_WITH_WRONG_DIM<MS>);
1227 template <
class MS1,
class MS2>
friend MS1 &_msmsassign(MS1 &ms1,
const MS2 &ms)
1228 #if(CXSC_INDEX_CHECK) 1229 throw(ERROR__OP_WITH_WRONG_DIM<MS1>);
1233 template <
class M,
class MS2,
class S>
friend M &_mmsassign(M &m,
const MS2 &ms)
throw();
1234 template <
class MS,
class S>
friend MS &_mssassign(MS &ms,
const S &r)
throw();
1236 template <
class MS>
friend int _mslb(
const MS &ms,
const int &i)
1237 #if(CXSC_INDEX_CHECK) 1238 throw(ERROR__WRONG_ROW_OR_COL<MS>);
1242 template <
class MS>
friend int _msub(
const MS &ms,
const int &i)
1243 #if(CXSC_INDEX_CHECK) 1244 throw(ERROR__WRONG_ROW_OR_COL<MS>);
1248 template <
class MS,
class E>
friend E _msre(
const MS &ms)
throw();
1249 template <
class MS,
class E>
friend E _msim(
const MS &ms)
throw();
1250 template <
class MS1,
class M2>
friend MS1 &_msmsetre(MS1 &ms1,
const M2 &m2)
1251 #if(CXSC_INDEX_CHECK) 1252 throw(ERROR__OP_WITH_WRONG_DIM<MS1>);
1256 template <
class MS1,
class M2>
friend MS1 &_msmsetim(MS1 &ms1,
const M2 &m2)
1257 #if(CXSC_INDEX_CHECK) 1258 throw(ERROR__OP_WITH_WRONG_DIM<MS1>);
1262 template <
class MS1,
class MS2>
friend MS1 &_msmssetre(MS1 &ms1,
const MS2 &ms2)
1263 #if(CXSC_INDEX_CHECK) 1264 throw(ERROR__OP_WITH_WRONG_DIM<MS1>);
1268 template <
class MS1,
class MS2>
friend MS1 &_msmssetim(MS1 &ms1,
const MS2 &ms2)
1269 #if(CXSC_INDEX_CHECK) 1270 throw(ERROR__OP_WITH_WRONG_DIM<MS1>);
1274 template <
class MS,
class E>
friend E _msabs(
const MS &ms)
throw();
1276 template <
class MS,
class E>
friend E _msminus(
const MS &ms)
throw();
1277 template <
class M,
class MS,
class E>
friend E _mmsplus(
const M &m,
const MS &ms)
1278 #if(CXSC_INDEX_CHECK) 1279 throw(ERROR__OP_WITH_WRONG_DIM<M>);
1283 template <
class MS1,
class MS2,
class E>
friend E _msmsplus(
const MS1 &m1,
const MS2 &m2)
1284 #if(CXSC_INDEX_CHECK) 1285 throw(ERROR__OP_WITH_WRONG_DIM<E>);
1289 template <
class M,
class MS>
friend M &_mmsplusassign(M &m1,
const MS &ms)
1290 #if(CXSC_INDEX_CHECK) 1291 throw(ERROR__OP_WITH_WRONG_DIM<M>);
1295 template <
class MS,
class M>
friend MS &_msmplusassign(MS &ms,
const M &m1)
1296 #if(CXSC_INDEX_CHECK) 1297 throw(ERROR__OP_WITH_WRONG_DIM<MS>);
1301 template <
class MS1,
class MS2>
friend MS1 &_msmsplusassign(MS1 &ms1,
const MS2 &ms2)
1302 #if(CXSC_INDEX_CHECK) 1303 throw(ERROR__OP_WITH_WRONG_DIM<MS1>);
1307 template <
class M,
class MS,
class E>
friend E _mmsminus(
const M &m,
const MS &ms)
1308 #if(CXSC_INDEX_CHECK) 1309 throw(ERROR__OP_WITH_WRONG_DIM<E>);
1313 template <
class MS,
class M,
class E>
friend E _msmminus(
const MS &ms,
const M &m)
1314 #if(CXSC_INDEX_CHECK) 1315 throw(ERROR__OP_WITH_WRONG_DIM<E>);
1319 template <
class MS1,
class MS2,
class E>
friend E _msmsminus(
const MS1 &ms1,
const MS2 &ms2)
1320 #if(CXSC_INDEX_CHECK) 1321 throw(ERROR__OP_WITH_WRONG_DIM<E>);
1325 template <
class M,
class MS>
friend M &_mmsminusassign(M &m1,
const MS &ms)
1326 #if(CXSC_INDEX_CHECK) 1327 throw(ERROR__OP_WITH_WRONG_DIM<M>);
1331 template <
class MS,
class M>
friend MS &_msmminusassign(MS &ms,
const M &m1)
1332 #if(CXSC_INDEX_CHECK) 1333 throw(ERROR__OP_WITH_WRONG_DIM<MS>);
1337 template <
class MS1,
class MS2>
friend MS1 &_msmsminusassign(MS1 &ms1,
const MS2 &ms2)
1338 #if(CXSC_INDEX_CHECK) 1339 throw(ERROR__OP_WITH_WRONG_DIM<MS1>);
1343 template <
class M,
class MS,
class E>
friend E _mmscmult(
const M &m1,
const MS &ms)
1344 #if(CXSC_INDEX_CHECK) 1345 throw(ERROR__OP_WITH_WRONG_DIM<E>);
1349 template <
class M,
class MS,
class E>
friend E _mmscimult(
const M &m1,
const MS &ms)
1350 #if(CXSC_INDEX_CHECK) 1351 throw(ERROR__OP_WITH_WRONG_DIM<E>);
1355 template <
class MS,
class M,
class E>
friend E _msmcmult(
const MS &ms,
const M &m2)
1356 #if(CXSC_INDEX_CHECK) 1357 throw(ERROR__OP_WITH_WRONG_DIM<E>);
1361 template <
class MS,
class M,
class E>
friend E _msmcimult(
const MS &ms,
const M &m2)
1362 #if(CXSC_INDEX_CHECK) 1363 throw(ERROR__OP_WITH_WRONG_DIM<E>);
1367 template <
class M,
class MS,
class S>
friend M &_mmscmultassign(M &m1,
const MS &ms)
1368 #if(CXSC_INDEX_CHECK) 1369 throw(ERROR__OP_WITH_WRONG_DIM<M>);
1373 template <
class M,
class MS,
class S>
friend M &_mmscimultassign(M &m1,
const MS &ms)
1374 #if(CXSC_INDEX_CHECK) 1375 throw(ERROR__OP_WITH_WRONG_DIM<M>);
1379 template <
class MS1,
class MS2,
class E>
friend E _msmscmult(
const MS1 &ms1,
const MS2 &ms2)
1380 #if(CXSC_INDEX_CHECK) 1381 throw(ERROR__OP_WITH_WRONG_DIM<E>);
1385 template <
class MS1,
class MS2,
class E>
friend E _msmscimult(
const MS1 &ms1,
const MS2 &ms2)
1386 #if(CXSC_INDEX_CHECK) 1387 throw(ERROR__OP_WITH_WRONG_DIM<E>);
1391 template <
class M,
class MS,
class E>
friend E _mmsconv(
const M &m,
const MS &ms)
1392 #if(CXSC_INDEX_CHECK) 1393 throw(ERROR__OP_WITH_WRONG_DIM<M>);
1397 template <
class MS1,
class MS2,
class E>
friend E _msmsconv(
const MS1 &m1,
const MS2 &m2)
1398 #if(CXSC_INDEX_CHECK) 1399 throw(ERROR__OP_WITH_WRONG_DIM<E>);
1404 template <
class MS,
class V,
class E>
friend E _msvcmult(
const MS &ms,
const V &v)
1405 #if(CXSC_INDEX_CHECK) 1406 throw(ERROR__OP_WITH_WRONG_DIM<MS>);
1410 template <
class MS,
class V,
class E>
friend E _msvcimult(
const MS &ms,
const V &v)
1411 #if(CXSC_INDEX_CHECK) 1412 throw(ERROR__OP_WITH_WRONG_DIM<MS>);
1416 template <
class V,
class MS,
class E>
friend E _vmscmult(
const V &v,
const MS &ms)
1417 #if(CXSC_INDEX_CHECK) 1418 throw(ERROR__OP_WITH_WRONG_DIM<MS>);
1422 template <
class V,
class MS,
class E>
friend E _vmscimult(
const V &v,
const MS &ms)
1423 #if(CXSC_INDEX_CHECK) 1424 throw(ERROR__OP_WITH_WRONG_DIM<MS>);
1428 template <
class V,
class MS,
class S>
friend V &_vmscmultassign(V &v,
const MS &ms)
1429 #if(CXSC_INDEX_CHECK) 1430 throw(ERROR__OP_WITH_WRONG_DIM<MS>);
1434 template <
class V,
class MS,
class S>
friend V &_vmscimultassign(V &v,
const MS &ms)
1435 #if(CXSC_INDEX_CHECK) 1436 throw(ERROR__OP_WITH_WRONG_DIM<MS>);
1441 template <
class S,
class MS,
class E>
friend E _smsmult(
const S &c,
const MS &ms)
throw();
1442 template <
class MS,
class S>
friend MS &_mssmultassign(MS &ms,
const S &c)
throw();
1443 template <
class MS,
class S,
class E>
friend E _mssdiv(
const MS &ms,
const S &c)
throw();
1444 template <
class MS,
class S>
friend MS &_mssdivassign(MS &ms,
const S &c)
throw();
1446 template <
class MS>
friend void *_msvoid(
const MS &ms)
throw();
1447 template <
class MS>
friend bool _msnot(
const MS &ms)
throw();
1448 template <
class M,
class MS>
friend bool _mmseq(
const M &m1,
const MS &ms)
throw();
1449 template <
class M,
class MS>
friend bool _mmsneq(
const M &m1,
const MS &ms)
throw();
1450 template <
class M,
class MS>
friend bool _mmsless(
const M &m1,
const MS &ms)
throw();
1451 template <
class M,
class MS>
friend bool _mmsleq(
const M &m1,
const MS &ms)
throw();
1452 template <
class MS,
class M>
friend bool _msmless(
const MS &ms,
const M &m1)
throw();
1453 template <
class MS,
class M>
friend bool _msmleq(
const MS &ms,
const M &m1)
throw();
1454 template <
class MS1,
class MS2>
friend bool _msmseq(
const MS1 &ms1,
const MS2 &ms2)
throw();
1455 template <
class MS1,
class MS2>
friend bool _msmsneq(
const MS1 &ms1,
const MS2 &ms2)
throw();
1456 template <
class MS1,
class MS2>
friend bool _msmsless(
const MS1 &ms1,
const MS2 &ms2)
throw();
1457 template <
class MS1,
class MS2>
friend bool _msmsleq(
const MS1 &ms1,
const MS2 &ms2)
throw();
1458 template <
class MS>
friend std::ostream &_msout(std::ostream &s,
const MS &r)
throw();
1459 template <
class MS>
friend std::istream &_msin(std::istream &s,MS &r)
throw();
1469 template <
class M,
class MS,
class E>
friend E _mmssect(
const M &m,
const MS &ms)
1470 #if(CXSC_INDEX_CHECK) 1471 throw(ERROR__OP_WITH_WRONG_DIM<M>);
1475 template <
class MS1,
class MS2,
class E>
friend E _msmssect(
const MS1 &m1,
const MS2 &m2)
1476 #if(CXSC_INDEX_CHECK) 1477 throw(ERROR__OP_WITH_WRONG_DIM<E>);
1486 template <
class M1,
class MS2>
friend M1 &_mmssetinf(M1 &m1,
const MS2 &ms2)
1487 #if(CXSC_INDEX_CHECK) 1488 throw(ERROR__OP_WITH_WRONG_DIM<M1>);
1492 template <
class M1,
class MS2>
friend M1 &_mmssetsup(M1 &m1,
const MS2 &ms2)
1493 #if(CXSC_INDEX_CHECK) 1494 throw(ERROR__OP_WITH_WRONG_DIM<M1>);
1498 template <
class M1,
class MS2>
friend M1 &_mmsusetinf(M1 &m1,
const MS2 &ms2)
1499 #if(CXSC_INDEX_CHECK) 1500 throw(ERROR__OP_WITH_WRONG_DIM<M1>);
1504 template <
class M1,
class MS2>
friend M1 &_mmsusetsup(M1 &m1,
const MS2 &ms2)
1505 #if(CXSC_INDEX_CHECK) 1506 throw(ERROR__OP_WITH_WRONG_DIM<M1>);
1510 template <
class MS1,
class MS2>
friend MS1 &_msmssetinf(MS1 &ms1,
const MS2 &ms2)
1511 #if(CXSC_INDEX_CHECK) 1512 throw(ERROR__OP_WITH_WRONG_DIM<MS1>);
1516 template <
class MS1,
class MS2>
friend MS1 &_msmssetsup(MS1 &ms1,
const MS2 &ms2)
1517 #if(CXSC_INDEX_CHECK) 1518 throw(ERROR__OP_WITH_WRONG_DIM<MS1>);
1522 template <
class MS1,
class MS2>
friend MS1 &_msmsusetinf(MS1 &ms1,
const MS2 &ms2)
1523 #if(CXSC_INDEX_CHECK) 1524 throw(ERROR__OP_WITH_WRONG_DIM<MS1>);
1528 template <
class MS1,
class MS2>
friend MS1 &_msmsusetsup(MS1 &ms1,
const MS2 &ms2)
1529 #if(CXSC_INDEX_CHECK) 1530 throw(ERROR__OP_WITH_WRONG_DIM<MS1>);
1537 template <
class M,
class MS>
friend M &_mmsconvassign(M &m1,
const MS &ms)
1538 #if(CXSC_INDEX_CHECK) 1539 throw(ERROR__OP_WITH_WRONG_DIM<M>);
1543 template <
class MS1,
class MS2>
friend MS1 &_msmsconvassign(MS1 &ms1,
const MS2 &ms2)
1544 #if(CXSC_INDEX_CHECK) 1545 throw(ERROR__OP_WITH_WRONG_DIM<MS1>);
1550 template <
class M,
class MS>
friend M &_mmssectassign(M &m1,
const MS &ms)
1551 #if(CXSC_INDEX_CHECK) 1552 throw(ERROR__OP_WITH_WRONG_DIM<M>);
1556 template <
class MS1,
class MS2>
friend MS1 &_msmssectassign(MS1 &ms1,
const MS2 &ms2)
1557 #if(CXSC_INDEX_CHECK) 1558 throw(ERROR__OP_WITH_WRONG_DIM<MS1>);
1579 explicit INLINE
cmatrix_slice(
cmatrix &a,
const int &l1,
const int &u1,
const int &l2,
const int &u2)
throw():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)
throw():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)
throw():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) 1591 throw(ERROR_CMATRIX_TYPE_CAST_OF_THICK_OBJ);
1598 #if(CXSC_INDEX_CHECK) 1599 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
1617 #if(CXSC_INDEX_CHECK) 1618 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
1626 #if(CXSC_INDEX_CHECK) 1627 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
1633 #if(CXSC_INDEX_CHECK) 1634 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
1640 #if(CXSC_INDEX_CHECK) 1641 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
1647 #if(CXSC_INDEX_CHECK) 1648 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
1656 #if(CXSC_INDEX_CHECK) 1657 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
1663 #if(CXSC_INDEX_CHECK) 1664 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
1670 #if(CXSC_INDEX_CHECK) 1671 throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT);
1677 #if(CXSC_INDEX_CHECK) 1678 throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT);
1685 #if(CXSC_INDEX_CHECK) 1686 throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT);
1692 #if(CXSC_INDEX_CHECK) 1693 throw(ERROR_CMATRIX_ROW_OR_COL_NOT_IN_MAT);
1701 #if(CXSC_INDEX_CHECK) 1702 throw(ERROR_CMATRIX_SUB_ARRAY_TOO_BIG);
1708 #if(CXSC_INDEX_CHECK) 1709 throw(ERROR_CMATRIX_SUB_ARRAY_TOO_BIG);
1742 #if(CXSC_INDEX_CHECK) 1743 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
1749 #if(CXSC_INDEX_CHECK) 1750 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
1756 #if(CXSC_INDEX_CHECK) 1757 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
1763 #if(CXSC_INDEX_CHECK) 1764 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
1770 #if(CXSC_INDEX_CHECK) 1771 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
1777 #if(CXSC_INDEX_CHECK) 1778 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
1784 #if(CXSC_INDEX_CHECK) 1785 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
1791 #if(CXSC_INDEX_CHECK) 1792 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
1798 #if(CXSC_INDEX_CHECK) 1799 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
1805 #if(CXSC_INDEX_CHECK) 1806 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
1812 #if(CXSC_INDEX_CHECK) 1813 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
1819 #if(CXSC_INDEX_CHECK) 1820 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
1826 #if(CXSC_INDEX_CHECK) 1827 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
1833 #if(CXSC_INDEX_CHECK) 1834 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
1840 #if(CXSC_INDEX_CHECK) 1841 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
1847 #if(CXSC_INDEX_CHECK) 1848 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
1860 INLINE
operator void*()
throw();
1887 #if(CXSC_INDEX_CHECK) 1888 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
1894 #if(CXSC_INDEX_CHECK) 1895 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
1907 #if(CXSC_INDEX_CHECK) 1908 throw(OP_WITH_WRONG_DIM);
1918 #if(CXSC_INDEX_CHECK) 1919 throw(OP_WITH_WRONG_DIM);
1929 #if(CXSC_INDEX_CHECK) 1930 throw(OP_WITH_WRONG_DIM);
1940 #if(CXSC_INDEX_CHECK) 1941 throw(OP_WITH_WRONG_DIM);
1951 #if(CXSC_INDEX_CHECK) 1952 throw(OP_WITH_WRONG_DIM);
1963 #if(CXSC_INDEX_CHECK) 1964 throw(OP_WITH_WRONG_DIM);
1970 #if(CXSC_INDEX_CHECK) 1971 throw(OP_WITH_WRONG_DIM);
1977 #if(CXSC_INDEX_CHECK) 1978 throw(OP_WITH_WRONG_DIM);
1984 #if(CXSC_INDEX_CHECK) 1985 throw(OP_WITH_WRONG_DIM);
1991 #if(CXSC_INDEX_CHECK) 1992 throw(OP_WITH_WRONG_DIM);
1999 #if(CXSC_INDEX_CHECK) 2000 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM);
2006 #if(CXSC_INDEX_CHECK) 2007 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM);
2013 #if(CXSC_INDEX_CHECK) 2014 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM);
2020 #if(CXSC_INDEX_CHECK) 2021 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM);
2027 #if(CXSC_INDEX_CHECK) 2028 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM);
2035 #if(CXSC_INDEX_CHECK) 2036 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM);
2042 #if(CXSC_INDEX_CHECK) 2043 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM);
2049 #if(CXSC_INDEX_CHECK) 2050 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM);
2056 #if(CXSC_INDEX_CHECK) 2057 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM);
2063 #if(CXSC_INDEX_CHECK) 2064 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM);
2071 #if(CXSC_INDEX_CHECK) 2072 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM);
2078 #if(CXSC_INDEX_CHECK) 2079 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM);
2085 #if(CXSC_INDEX_CHECK) 2086 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM);
2092 #if(CXSC_INDEX_CHECK) 2093 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM);
2099 #if(CXSC_INDEX_CHECK) 2100 throw(ERROR_CVECTOR_OP_WITH_WRONG_DIM);
2118 INLINE
int Lb(
const cmatrix &rm,
const int &i)
2119 #if(CXSC_INDEX_CHECK) 2120 throw(ERROR_CMATRIX_WRONG_ROW_OR_COL);
2124 INLINE
int Ub(
const cmatrix &rm,
const int &i)
2126 #if(CXSC_INDEX_CHECK) 2127 throw(ERROR_CMATRIX_WRONG_ROW_OR_COL);
2133 #if(CXSC_INDEX_CHECK) 2134 throw(ERROR_CMATRIX_WRONG_ROW_OR_COL);
2140 #if(CXSC_INDEX_CHECK) 2141 throw(ERROR_CMATRIX_WRONG_ROW_OR_COL);
2147 #if(CXSC_INDEX_CHECK) 2148 throw(ERROR_CMATRIX_WRONG_ROW_OR_COL);
2154 #if(CXSC_INDEX_CHECK) 2155 throw(ERROR_CMATRIX_WRONG_ROW_OR_COL);
2163 #if(CXSC_INDEX_CHECK) 2164 throw(ERROR_CMATRIX_WRONG_BOUNDARIES);
2168 INLINE
void Resize(
cmatrix &A,
const int &m1,
const int &m2,
const int &n1,
const int &n2)
2170 #if(CXSC_INDEX_CHECK) 2171 throw(ERROR_CMATRIX_WRONG_BOUNDARIES);
2190 #if(CXSC_INDEX_CHECK) 2191 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2197 #if(CXSC_INDEX_CHECK) 2198 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2204 #if(CXSC_INDEX_CHECK) 2205 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2211 #if(CXSC_INDEX_CHECK) 2212 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2218 #if(CXSC_INDEX_CHECK) 2219 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2225 #if(CXSC_INDEX_CHECK) 2226 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2232 #if(CXSC_INDEX_CHECK) 2233 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2239 #if(CXSC_INDEX_CHECK) 2240 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2303 #if(CXSC_INDEX_CHECK) 2304 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2310 #if(CXSC_INDEX_CHECK) 2311 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2317 #if(CXSC_INDEX_CHECK) 2318 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2324 #if(CXSC_INDEX_CHECK) 2325 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2331 #if(CXSC_INDEX_CHECK) 2332 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2338 #if(CXSC_INDEX_CHECK) 2339 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2346 #if(CXSC_INDEX_CHECK) 2347 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2353 #if(CXSC_INDEX_CHECK) 2354 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2363 #if(CXSC_INDEX_CHECK) 2364 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2370 #if(CXSC_INDEX_CHECK) 2371 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2377 #if(CXSC_INDEX_CHECK) 2378 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2385 #if(CXSC_INDEX_CHECK) 2386 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2392 #if(CXSC_INDEX_CHECK) 2393 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2407 #if(CXSC_INDEX_CHECK) 2408 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2414 #if(CXSC_INDEX_CHECK) 2415 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2421 #if(CXSC_INDEX_CHECK) 2422 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2428 #if(CXSC_INDEX_CHECK) 2429 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2435 #if(CXSC_INDEX_CHECK) 2436 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2442 #if(CXSC_INDEX_CHECK) 2443 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2454 #if(CXSC_INDEX_CHECK) 2455 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2461 #if(CXSC_INDEX_CHECK) 2462 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2468 #if(CXSC_INDEX_CHECK) 2469 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2475 #if(CXSC_INDEX_CHECK) 2476 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2482 #if(CXSC_INDEX_CHECK) 2483 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2489 #if(CXSC_INDEX_CHECK) 2490 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2497 #if(CXSC_INDEX_CHECK) 2498 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2504 #if(CXSC_INDEX_CHECK) 2505 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2511 #if(CXSC_INDEX_CHECK) 2512 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2518 #if(CXSC_INDEX_CHECK) 2519 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2525 #if(CXSC_INDEX_CHECK) 2526 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2532 #if(CXSC_INDEX_CHECK) 2533 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2542 #if(CXSC_INDEX_CHECK) 2543 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2549 #if(CXSC_INDEX_CHECK) 2550 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2556 #if(CXSC_INDEX_CHECK) 2557 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2563 #if(CXSC_INDEX_CHECK) 2564 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2570 #if(CXSC_INDEX_CHECK) 2571 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2577 #if(CXSC_INDEX_CHECK) 2578 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2584 #if(CXSC_INDEX_CHECK) 2585 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2591 #if(CXSC_INDEX_CHECK) 2592 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2598 #if(CXSC_INDEX_CHECK) 2599 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2605 #if(CXSC_INDEX_CHECK) 2606 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2613 #if(CXSC_INDEX_CHECK) 2614 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2620 #if(CXSC_INDEX_CHECK) 2621 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2627 #if(CXSC_INDEX_CHECK) 2628 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2634 #if(CXSC_INDEX_CHECK) 2635 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2641 #if(CXSC_INDEX_CHECK) 2642 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2648 #if(CXSC_INDEX_CHECK) 2649 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2655 #if(CXSC_INDEX_CHECK) 2656 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2662 #if(CXSC_INDEX_CHECK) 2663 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2669 #if(CXSC_INDEX_CHECK) 2670 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2676 #if(CXSC_INDEX_CHECK) 2677 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2684 #if(CXSC_INDEX_CHECK) 2685 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2691 #if(CXSC_INDEX_CHECK) 2692 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2698 #if(CXSC_INDEX_CHECK) 2699 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2705 #if(CXSC_INDEX_CHECK) 2706 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2712 #if(CXSC_INDEX_CHECK) 2713 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2719 #if(CXSC_INDEX_CHECK) 2720 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2726 #if(CXSC_INDEX_CHECK) 2727 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2733 #if(CXSC_INDEX_CHECK) 2734 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2740 #if(CXSC_INDEX_CHECK) 2741 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2747 #if(CXSC_INDEX_CHECK) 2748 throw(ERROR_CMATRIX_OP_WITH_WRONG_DIM);
2759 INLINE
bool operator ==(
const cmatrix &m1,
const cmatrix &m2)
throw();
2761 INLINE
bool operator !=(
const cmatrix &m1,
const cmatrix &m2)
throw();
2789 INLINE
bool operator !(
const cmatrix &ms)
throw();
2796 INLINE std::ostream &operator <<(std::ostream &s,
const cmatrix &r)
throw();
2798 INLINE std::ostream &operator <<(std::ostream &s,
const cmatrix_slice &r)
throw();
2800 INLINE std::istream &operator >>(std::istream &s,
cmatrix &r)
throw();
2802 INLINE std::istream &operator >>(std::istream &s,
cmatrix_slice &r)
throw();
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" 2854 #ifdef CXSC_USE_BLAS 2855 #define _CXSC_BLAS_CMATRIX 2856 #include "cxsc_blas.inl" cmatrix _cmatrix(const cmatrix &rm)
Deprecated typecast, which only exist for the reason of compatibility with older versions of C-XSC...
cmatrix_subv & operator-=(const scmatrix_subv &rv)
Implementation of standard assigning operator.
The Data Type rmatrix_slice.
cmatrix_subv & operator=(const scmatrix_subv &rv)
Implementation of standard assigning operator.
friend int Lb(const cmatrix_subv &rv)
Returns the lower bound of the vector.
cmatrix_slice(cmatrix_slice &a, const int &l1, const int &u1, const int &l2, const int &u2)
Constructor of class cmatrix_slice.
cmatrix_subv & operator+=(const scmatrix_subv &rv)
Implementation of standard assigning operator.
Helper class for slices of sparse vectors.
cmatrix_slice(const cmatrix_slice &ms)
Constructor of class cmatrix_slice.
cmatrix()
Constructor of class cmatrix.
The namespace cxsc, providing all functionality of the class library C-XSC.
civector operator*(const cimatrix_subv &rv, const cinterval &s)
Implementation of multiplication operation.
cimatrix & SetLb(cimatrix &m, const int &i, const int &j)
Sets the lower bound index.
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...
void DoubleSize(cimatrix &A)
Doubles the size of the matrix.
The Data Type cidotprecision.
cimatrix Id(const cimatrix &A)
Returns the Identity matrix.
The Data Type rvector_slice.
cimatrix & SetUb(cimatrix &m, const int &i, const int &j)
Sets the upper bound index.
friend cmatrix_subv Row(cmatrix &m, const int &i)
Returns one row of the matrix as a vector.
The Data Type rmatrix_subv.
cmatrix_subv & operator()()
Operator for accessing the whole vector.
friend int Ub(const cmatrix_subv &rv)
Returns the upper bound of the vector.
A slice of a sparse real matrix.
The Data Type cdotprecision.
A slice of a sparse complex matrix.
void Resize(cimatrix &A)
Resizes the matrix.
cmatrix_slice(cmatrix &a, const int &l1, const int &u1, const int &l2, const int &u2)
Constructor of class cmatrix_slice.
Represents a row or column vector of a sparse matrix.
int ColLen(const cimatrix &)
Returns the column dimension.
The Data Type cmatrix_subv.
friend int VecLen(const cmatrix_subv &rv)
Returns the size of the vector.
int RowLen(const cimatrix &)
Returns the row dimension.
cvector()
Constructor of class cvector.
rmatrix CompMat(const cimatrix &A)
Returns Ostrowski's comparison matrix.
The Data Type cmatrix_slice.
friend cmatrix_subv Col(cmatrix &m, const int &i)
Returns one column of the matrix as a vector.
cmatrix_subv(complex *d, const int &l, const int &u, const int &s, const int &st, const int &o)
Constructor of class cmatrix_subv.
Helper class for slices of sparse vectors.
cmatrix_subv & operator/=(const complex &c)
Implementation of division and allocation operation.
cmatrix_subv(const cmatrix_subv &v)
Constructor of class cmatrix_subv.
Represents a row or column vector of a sparse matrix.
civector operator/(const cimatrix_subv &rv, const cinterval &s)
Implementation of division operation.
cimatrix transp(const cimatrix &A)
Returns the transposed matrix.
complex & operator[](const int &i) const
Operator for accessing the single elements of the vector (read-only)
The Data Type cvector_slice.
cmatrix_subv & operator*=(const complex &c)
Implementation of multiplication and allocation operation.
ivector abs(const cimatrix_subv &mv)
Returns the absolute value of the matrix.