28 #include "imatrix.hpp" 30 #include "imatrix.inl" 31 #include "ivecrmat.inl" 41 for(
int i=
Lb(A,1) ; i<=
Ub(A,1) ; i++) {
42 for(
int j=
Lb(A,2) ; j<=
Ub(A,2) ; j++) {
43 if(i-
Lb(A,1) == j-
Lb(A,2))
46 M[i][j] = -
AbsMax(A[i][j]);
57 int lbi =
Lb(A,1), ubi =
Ub(A,1);
58 int lbj =
Lb(A,2), ubj =
Ub(A,2);
61 for (i = lbi; i <= ubi; i++)
62 for (j = lbj; j <= ubj; j++)
63 B[i][j] =
interval( (i==j) ? 1.0 : 0.0 );
72 for (n =
Lb(A,1); n <=
Ub(A,1); n++)
Col(res,n) =
Row(A,n);
79 int i, l=
Lb(v), u=
Ub(v);
82 for (i = l; i <= u; i++)
100 throw(OP_WITH_WRONG_DIM)
105 #if(CXSC_INDEX_CHECK) 106 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(idotprecision &, const imatrix_subv &, imatrix_subv &)"));
112 #if(CXSC_INDEX_CHECK) 113 throw(OP_WITH_WRONG_DIM)
118 #if(CXSC_INDEX_CHECK) 119 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(idotprecision &, const ivector &, imatrix_subv &)"));
125 #if(CXSC_INDEX_CHECK) 126 throw(OP_WITH_WRONG_DIM)
131 #if(CXSC_INDEX_CHECK) 132 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(idotprecision &, const imatrix_subv &, ivector &)"));
139 #if(CXSC_INDEX_CHECK) 140 throw(OP_WITH_WRONG_DIM)
145 #if(CXSC_INDEX_CHECK) 146 if(
VecLen(sl1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(idotprecision &, const ivector_slice &, imatrix_subv &)"));
152 #if(CXSC_INDEX_CHECK) 153 throw(OP_WITH_WRONG_DIM)
158 #if(CXSC_INDEX_CHECK) 159 if(
VecLen(rv1)!=
VecLen(sl2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(idotprecision &, const imatrix_subv &, ivector_slice &)"));
165 #if(CXSC_INDEX_CHECK) 166 throw(OP_WITH_WRONG_DIM)
171 #if(CXSC_INDEX_CHECK) 172 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const imatrix_subv &, const imatrix_subv &)"));
181 #if(CXSC_INDEX_CHECK) 182 throw(OP_WITH_WRONG_DIM)
187 #if(CXSC_INDEX_CHECK) 188 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const ivector &, const imatrix_subv &)"));
197 #if(CXSC_INDEX_CHECK) 198 throw(OP_WITH_WRONG_DIM)
203 #if(CXSC_INDEX_CHECK) 204 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const imatrix_subv &, const ivector &)"));
213 #if(CXSC_INDEX_CHECK) 214 throw(OP_WITH_WRONG_DIM)
219 #if(CXSC_INDEX_CHECK) 220 if(
VecLen(sl1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const ivector_slice &, const imatrix_subv &)"));
229 #if(CXSC_INDEX_CHECK) 230 throw(OP_WITH_WRONG_DIM)
235 #if(CXSC_INDEX_CHECK) 236 if(
VecLen(rv1)!=
VecLen(sl2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const imatrix_subv &, const ivector_slice &)"));
245 #if(CXSC_INDEX_CHECK) 246 throw(OP_WITH_WRONG_DIM)
251 #if(CXSC_INDEX_CHECK) 252 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(idotprecision &, const rmatrix_subv &, imatrix_subv &)"));
258 #if(CXSC_INDEX_CHECK) 259 throw(OP_WITH_WRONG_DIM)
264 #if(CXSC_INDEX_CHECK) 265 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(idotprecision &, const rvector &, imatrix_subv &)"));
271 #if(CXSC_INDEX_CHECK) 272 throw(OP_WITH_WRONG_DIM)
277 #if(CXSC_INDEX_CHECK) 278 if(
VecLen(sl1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(idotprecision &, const rvector_slice &, imatrix_subv &)"));
284 #if(CXSC_INDEX_CHECK) 285 throw(OP_WITH_WRONG_DIM)
290 #if(CXSC_INDEX_CHECK) 291 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(idotprecision &, const imatrix_subv &, rmatrix_subv &)"));
297 #if(CXSC_INDEX_CHECK) 298 throw(OP_WITH_WRONG_DIM)
303 #if(CXSC_INDEX_CHECK) 304 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(idotprecision &, const imatrix_subv &, rvector &)"));
310 #if(CXSC_INDEX_CHECK) 311 throw(OP_WITH_WRONG_DIM)
316 #if(CXSC_INDEX_CHECK) 317 if(
VecLen(rv1)!=
VecLen(sl2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(idotprecision &, const imatrix_subv &, rvector_slice &)"));
323 #if(CXSC_INDEX_CHECK) 324 throw(OP_WITH_WRONG_DIM)
329 #if(CXSC_INDEX_CHECK) 330 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const rmatrix_subv &, const imatrix_subv &)"));
339 #if(CXSC_INDEX_CHECK) 340 throw(OP_WITH_WRONG_DIM)
345 #if(CXSC_INDEX_CHECK) 346 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const rvector &, const imatrix_subv &)"));
355 #if(CXSC_INDEX_CHECK) 356 throw(OP_WITH_WRONG_DIM)
361 #if(CXSC_INDEX_CHECK) 362 if(
VecLen(sl1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const rvector_slice&, const imatrix_subv &)"));
371 #if(CXSC_INDEX_CHECK) 372 throw(OP_WITH_WRONG_DIM)
377 #if(CXSC_INDEX_CHECK) 378 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const imatrix_subv &, const rmatrix_subv &)"));
387 #if(CXSC_INDEX_CHECK) 388 throw(OP_WITH_WRONG_DIM)
393 #if(CXSC_INDEX_CHECK) 394 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const imatrix_subv &, const rvector &)"));
403 #if(CXSC_INDEX_CHECK) 404 throw(OP_WITH_WRONG_DIM)
409 #if(CXSC_INDEX_CHECK) 410 if(
VecLen(rv1)!=
VecLen(sl2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const imatrix_subv &, const rvector_slice &)"));
419 #if(CXSC_INDEX_CHECK) 420 throw(OP_WITH_WRONG_DIM)
425 #if(CXSC_INDEX_CHECK) 426 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(idotprecision &, const rmatrix_subv &, ivector &)"));
432 #if(CXSC_INDEX_CHECK) 433 throw(OP_WITH_WRONG_DIM)
438 #if(CXSC_INDEX_CHECK) 439 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(idotprecision &, const ivector &, rmatrix_subv &)"));
445 #if(CXSC_INDEX_CHECK) 446 throw(OP_WITH_WRONG_DIM)
451 #if(CXSC_INDEX_CHECK) 452 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const rmatrix_subv &, const ivector &)"));
461 #if(CXSC_INDEX_CHECK) 462 throw(OP_WITH_WRONG_DIM)
467 #if(CXSC_INDEX_CHECK) 468 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const ivector &, const rmatrix_subv &)"));
477 #if(CXSC_INDEX_CHECK) 478 throw(OP_WITH_WRONG_DIM)
483 #if(CXSC_INDEX_CHECK) 484 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(idotprecision &, const rmatrix_subv &, ivector_slice &)"));
490 #if(CXSC_INDEX_CHECK) 491 throw(OP_WITH_WRONG_DIM)
496 #if(CXSC_INDEX_CHECK) 497 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(idotprecision &, const ivector_slice &, rmatrix_subv &)"));
503 #if(CXSC_INDEX_CHECK) 504 throw(OP_WITH_WRONG_DIM)
509 #if(CXSC_INDEX_CHECK) 510 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const rmatrix_subv &, const ivector_slice &)"));
519 #if(CXSC_INDEX_CHECK) 520 throw(OP_WITH_WRONG_DIM)
525 #if(CXSC_INDEX_CHECK) 526 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const ivector_slice &, const rmatrix_subv &)"));
real MaxRelDiam(const imatrix_subv &v)
Computes the relative diameter .
The Data Type imatrix_subv.
The Data Type idotprecision.
int Lb(const cimatrix &rm, const int &i)
Returns the lower bound index.
The namespace cxsc, providing all functionality of the class library C-XSC.
The Scalar Type interval.
cimatrix_subv Col(cimatrix &m, const int &i)
Returns one column of the matrix as a vector.
real AbsMin(const interval &x)
Computes the smallest absolute value .
int VecLen(const scimatrix_subv &S)
Returns the length of the subvector.
real RelDiam(const interval &x)
Computes the relative diameter .
void DoubleSize(cimatrix &A)
Doubles the size of the matrix.
The Data Type ivector_slice.
The Data Type cidotprecision.
cimatrix Id(const cimatrix &A)
Returns the Identity matrix.
The Data Type rvector_slice.
The Data Type rmatrix_subv.
void set_k(unsigned int i)
Set precision for computation of dot products.
void Resize(cimatrix &A)
Resizes the matrix.
real AbsMax(const interval &x)
Computes the greatest absolute value .
cimatrix_subv Row(cimatrix &m, const int &i)
Returns one row of the matrix as a vector.
int get_k() const
Get currently set precision for computation of dot products.
rmatrix CompMat(const cimatrix &A)
Returns Ostrowski's comparison matrix.
int Ub(const cimatrix &rm, const int &i)
Returns the upper bound index.
cimatrix transp(const cimatrix &A)
Returns the transposed matrix.