28 #include "cimatrix.hpp"
30 #include "cimatrix.inl"
31 #include "civecrmat.inl"
32 #include "civeccmat.inl"
33 #include "civecimat.inl"
36 #include "cvecimat.inl"
37 #include "iveccmat.inl"
38 #include "cmatimat.inl"
48 for(
int i=
Lb(A,1) ; i<=
Ub(A,1) ; i++) {
49 for(
int j=
Lb(A,2) ; j<=
Ub(A,2) ; j++) {
50 if(i-
Lb(A,1) == j-
Lb(A,2))
51 M[i][j] = Inf(
abs(A[i][j]));
53 M[i][j] = -Sup(
abs(A[i][j]));
64 int lbi =
Lb(A,1), ubi =
Ub(A,1);
65 int lbj =
Lb(A,2), ubj =
Ub(A,2);
68 for (i = lbi; i <= ubi; i++)
69 for (j = lbj; j <= ubj; j++)
70 B[i][j] =
cinterval( (i==j) ? 1.0 : 0.0 );
79 for (n =
Lb(A,1); n <=
Ub(A,1); n++)
Col(res,n) =
Row(A,n);
98 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const cimatrix_subv &, const cimatrix_subv &)"));
104 #if(CXSC_INDEX_CHECK)
110 #if(CXSC_INDEX_CHECK)
111 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const civector &, const cimatrix_subv &)"));
117 #if(CXSC_INDEX_CHECK)
123 #if(CXSC_INDEX_CHECK)
124 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const cimatrix_subv &, const civector &)"));
130 #if(CXSC_INDEX_CHECK)
136 #if(CXSC_INDEX_CHECK)
137 if(
VecLen(sl1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const civector_slice &, const cimatrix_subv &)"));
143 #if(CXSC_INDEX_CHECK)
149 #if(CXSC_INDEX_CHECK)
150 if(
VecLen(rv1)!=
VecLen(sl2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const cimatrix_subv &, const civector_slice &)"));
156 #if(CXSC_INDEX_CHECK)
162 #if(CXSC_INDEX_CHECK)
163 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const cimatrix_subv &, const rmatrix_subv &)"));
169 addDot(tmp_re,Re(rv1),rv2);
170 addDot(tmp_im,Im(rv1),rv2);
175 #if(CXSC_INDEX_CHECK)
181 #if(CXSC_INDEX_CHECK)
182 if(
VecLen(rv1)!=
VecLen(sl2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const cimatrix_subv &, const rvector_slice &)"));
188 addDot(tmp_re,Re(rv1),sl2);
189 addDot(tmp_im,Im(rv1),sl2);
194 #if(CXSC_INDEX_CHECK)
200 #if(CXSC_INDEX_CHECK)
201 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const cimatrix_subv &, const rvector &)"));
207 addDot(tmp_re,Re(rv1),rv2);
208 addDot(tmp_im,Im(rv1),rv2);
213 #if(CXSC_INDEX_CHECK)
219 #if(CXSC_INDEX_CHECK)
220 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const rmatrix_subv &, const cimatrix_subv &)"));
226 addDot(tmp_re,rv1,Re(rv2));
227 addDot(tmp_im,rv1,Im(rv2));
232 #if(CXSC_INDEX_CHECK)
238 #if(CXSC_INDEX_CHECK)
239 if(
VecLen(sl1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const rvector_slice &, const cimatrix_subv &)"));
245 addDot(tmp_re,sl1,Re(rv2));
246 addDot(tmp_im,sl1,Im(rv2));
251 #if(CXSC_INDEX_CHECK)
257 #if(CXSC_INDEX_CHECK)
258 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const rvector &, const cimatrix_subv &)"));
264 addDot(tmp_re,rv1,Re(rv2));
265 addDot(tmp_im,rv1,Im(rv2));
271 #if(CXSC_INDEX_CHECK)
277 #if(CXSC_INDEX_CHECK)
278 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const cimatrix_subv &, const cmatrix_subv &)"));
284 #if(CXSC_INDEX_CHECK)
290 #if(CXSC_INDEX_CHECK)
291 if(
VecLen(rv1)!=
VecLen(sl2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const cimatrix_subv &, const cvector_slice &)"));
297 #if(CXSC_INDEX_CHECK)
303 #if(CXSC_INDEX_CHECK)
304 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const cimatrix_subv &, const cvector &)"));
310 #if(CXSC_INDEX_CHECK)
316 #if(CXSC_INDEX_CHECK)
317 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const cmatrix_subv &, const cimatrix_subv &)"));
323 #if(CXSC_INDEX_CHECK)
329 #if(CXSC_INDEX_CHECK)
330 if(
VecLen(sl1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const cvector_slice &, const cimatrix_subv &)"));
336 #if(CXSC_INDEX_CHECK)
342 #if(CXSC_INDEX_CHECK)
343 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const cvector &, const cimatrix_subv &)"));
350 #if(CXSC_INDEX_CHECK)
356 #if(CXSC_INDEX_CHECK)
357 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const cimatrix_subv &, const imatrix_subv &)"));
363 addDot(tmp_re,Re(rv1),rv2);
364 addDot(tmp_im,Im(rv1),rv2);
369 #if(CXSC_INDEX_CHECK)
375 #if(CXSC_INDEX_CHECK)
376 if(
VecLen(rv1)!=
VecLen(sl2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const cimatrix_subv &, const ivector_slice &)"));
382 addDot(tmp_re,Re(rv1),sl2);
383 addDot(tmp_im,Im(rv1),sl2);
388 #if(CXSC_INDEX_CHECK)
394 #if(CXSC_INDEX_CHECK)
395 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const cimatrix_subv &, const ivector &)"));
401 addDot(tmp_re,Re(rv1),rv2);
402 addDot(tmp_im,Im(rv1),rv2);
407 #if(CXSC_INDEX_CHECK)
413 #if(CXSC_INDEX_CHECK)
414 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const imatrix_subv &, const cimatrix_subv &)"));
420 addDot(tmp_re,rv1,Re(rv2));
421 addDot(tmp_im,rv1,Im(rv2));
426 #if(CXSC_INDEX_CHECK)
432 #if(CXSC_INDEX_CHECK)
433 if(
VecLen(sl1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const ivector_slice &, const cimatrix_subv &)"));
439 addDot(tmp_re,sl1,Re(rv2));
440 addDot(tmp_im,sl1,Im(rv2));
445 #if(CXSC_INDEX_CHECK)
451 #if(CXSC_INDEX_CHECK)
452 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const ivector &, const cimatrix_subv &)"));
458 addDot(tmp_re,rv1,Re(rv2));
459 addDot(tmp_im,rv1,Im(rv2));
464 #if(CXSC_INDEX_CHECK)
470 #if(CXSC_INDEX_CHECK)
471 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const rmatrix_subv &, const civector &)"));
477 addDot(tmp_re,rv1,Re(rv2));
478 addDot(tmp_im,rv1,Im(rv2));
483 #if(CXSC_INDEX_CHECK)
489 #if(CXSC_INDEX_CHECK)
490 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const civector &, const rmatrix_subv &)"));
496 addDot(tmp_re,Re(rv1),rv2);
497 addDot(tmp_im,Im(rv1),rv2);
540 #if(CXSC_INDEX_CHECK)
546 #if(CXSC_INDEX_CHECK)
547 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const imatrix_subv &, const civector &)"));
553 addDot(tmp_re,rv1,Re(rv2));
554 addDot(tmp_im,rv1,Im(rv2));
559 #if(CXSC_INDEX_CHECK)
565 #if(CXSC_INDEX_CHECK)
566 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const civector &, const imatrix_subv &)"));
572 addDot(tmp_re,Re(rv1),rv2);
573 addDot(tmp_im,Im(rv1),rv2);
579 #if(CXSC_INDEX_CHECK)
585 #if(CXSC_INDEX_CHECK)
586 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const civector_slice &, const rmatrix_subv &)"));
592 addDot(tmp_re,rv1,Re(rv2));
593 addDot(tmp_im,rv1,Im(rv2));
598 #if(CXSC_INDEX_CHECK)
604 #if(CXSC_INDEX_CHECK)
605 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const civector_slice &, const imatrix_subv &)"));
611 addDot(tmp_re,Re(rv1),rv2);
612 addDot(tmp_im,Im(rv1),rv2);
617 #if(CXSC_INDEX_CHECK)
623 #if(CXSC_INDEX_CHECK)
624 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const cmatrix_subv &, const civector &)"));
630 #if(CXSC_INDEX_CHECK)
636 #if(CXSC_INDEX_CHECK)
637 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const civector &, const cmatrix_subv &)"));
643 #if(CXSC_INDEX_CHECK)
649 #if(CXSC_INDEX_CHECK)
650 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const cmatrix_subv &, const civector_slice &)"));
656 #if(CXSC_INDEX_CHECK)
662 #if(CXSC_INDEX_CHECK)
663 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const civector_slice &, const cmatrix_subv &)"));
669 #if(CXSC_INDEX_CHECK)
675 #if(CXSC_INDEX_CHECK)
676 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const cmatrix_subv &, const imatrix_subv &)"));
681 addDot(idot,Re(rv1),rv2);
682 SetRe(dp,Re(dp)+idot);
685 addDot(idot,Im(rv1),rv2);
686 SetIm(dp,Im(dp)+idot);
690 #if(CXSC_INDEX_CHECK)
696 #if(CXSC_INDEX_CHECK)
697 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const imatrix_subv &, const cmatrix_subv &)"));
702 addDot(idot,rv1,Re(rv2));
703 SetRe(dp,Re(dp)+idot);
706 addDot(idot,rv1,Im(rv2));
707 SetIm(dp,Im(dp)+idot);