C-XSC - A C++ Class Library for Extended Scientific Computing
2.5.4
|
28 #include "ivector.hpp"
30 #include "ivector.inl"
38 int i =
Lb(x), n =
Ub(x), ok = 1;
40 while (ok && i <= n) { ok =
in(x[i],y[i]); i++; }
46 int i =
Lb(y), n =
Ub(y), ok = 1;
49 while (ok && i <= n) { ok =
in(d,y[i]); i++; }
58 for (i =
Lb(x); i <=
Ub(x); i++) h[i] =
Blow(x[i],eps);
64 int al =
Lb(a), au =
Ub(a), bl =
Lb(b);
76 }
while ( !(disjointed || i > au) );
83 for (i =
Lb(x), ok = 1; i <=
Ub(x) && ok; i++) ok = (x[i] == 0.0);
90 int l =
Lb(v), u =
Ub(v);
93 for (i = l; i <= u; i++) w[i] =
mid(v[i]);
100 int i, l=
Lb(v), u=
Ub(v);
103 for (i = l; i <= u; i++)
111 int i, l=
Lb(v), u=
Ub(v);
114 for (i = l; i <= u; i++)
127 for (k =
Lb(v), upper =
Ub(v); (k < upper) &&
UlpAcc(v[k],n); k++);
145 #if(CXSC_INDEX_CHECK)
151 #if(CXSC_INDEX_CHECK)
152 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(idotprecision &, const ivector &, ivector &)"));
159 #if(CXSC_INDEX_CHECK)
165 #if(CXSC_INDEX_CHECK)
166 if(
VecLen(sl)!=
VecLen(rv)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(idotprecision &, const ivector_slice &, ivector &)"));
173 #if(CXSC_INDEX_CHECK)
179 #if(CXSC_INDEX_CHECK)
180 if(
VecLen(rv)!=
VecLen(sl)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(idotprecision &, const ivector &, ivector_slice &)"));
187 #if(CXSC_INDEX_CHECK)
193 #if(CXSC_INDEX_CHECK)
194 if(
VecLen(sl1)!=
VecLen(sl2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(idotprecision &, const ivector_slice &, ivector_slice &)"));
201 #if(CXSC_INDEX_CHECK)
207 #if(CXSC_INDEX_CHECK)
208 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision &, const ivector &, ivector &)"));
218 #if(CXSC_INDEX_CHECK)
224 #if(CXSC_INDEX_CHECK)
225 if(
VecLen(sl)!=
VecLen(rv)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision &, const ivector_slice &, ivector &)"));
235 #if(CXSC_INDEX_CHECK)
241 #if(CXSC_INDEX_CHECK)
242 if(
VecLen(rv)!=
VecLen(sl)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision &, const ivector &, ivector_slice &)"));
252 #if(CXSC_INDEX_CHECK)
258 #if(CXSC_INDEX_CHECK)
259 if(
VecLen(sl1)!=
VecLen(sl2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision &, const ivector_slice &, ivector_slice &)"));
269 #if(CXSC_INDEX_CHECK)
275 #if(CXSC_INDEX_CHECK)
276 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(idotprecision &, const rvector &, ivector &)"));
283 #if(CXSC_INDEX_CHECK)
289 #if(CXSC_INDEX_CHECK)
290 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(idotprecision &, const ivector &, rvector &)"));
297 #if(CXSC_INDEX_CHECK)
303 #if(CXSC_INDEX_CHECK)
304 if(
VecLen(sl)!=
VecLen(rv)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(idotprecision &, const rvector_slice &, ivector &)"));
311 #if(CXSC_INDEX_CHECK)
317 #if(CXSC_INDEX_CHECK)
318 if(
VecLen(sl)!=
VecLen(rv)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(idotprecision &, const ivector_slice &, rvector &)"));
325 #if(CXSC_INDEX_CHECK)
331 #if(CXSC_INDEX_CHECK)
332 if(
VecLen(rv)!=
VecLen(sl)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(idotprecision &, const rvector &, ivector_slice &)"));
339 #if(CXSC_INDEX_CHECK)
345 #if(CXSC_INDEX_CHECK)
346 if(
VecLen(rv)!=
VecLen(sl)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(idotprecision &, const ivector &, rvector_slice &)"));
353 #if(CXSC_INDEX_CHECK)
359 #if(CXSC_INDEX_CHECK)
360 if(
VecLen(sl1)!=
VecLen(sl2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(idotprecision &, const ivector_slice &, rvector_slice &)"));
367 #if(CXSC_INDEX_CHECK)
373 #if(CXSC_INDEX_CHECK)
374 if(
VecLen(sl1)!=
VecLen(sl2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(idotprecision &, const rvector_slice &, ivector_slice &)"));
381 #if(CXSC_INDEX_CHECK)
387 #if(CXSC_INDEX_CHECK)
388 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision &, const rvector &, ivector &)"));
398 #if(CXSC_INDEX_CHECK)
404 #if(CXSC_INDEX_CHECK)
405 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision &, const ivector &, rvector &)"));
415 #if(CXSC_INDEX_CHECK)
421 #if(CXSC_INDEX_CHECK)
422 if(
VecLen(sl)!=
VecLen(rv)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision &, const rvector_slice &, ivector &)"));
432 #if(CXSC_INDEX_CHECK)
438 #if(CXSC_INDEX_CHECK)
439 if(
VecLen(sl)!=
VecLen(rv)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision &, const ivector_slice &, rvector &)"));
449 #if(CXSC_INDEX_CHECK)
455 #if(CXSC_INDEX_CHECK)
456 if(
VecLen(rv)!=
VecLen(sl)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision &, const rvector &, ivector_slice &)"));
466 #if(CXSC_INDEX_CHECK)
472 #if(CXSC_INDEX_CHECK)
473 if(
VecLen(rv)!=
VecLen(sl)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision &, const ivector &, rvector_slice &)"));
483 #if(CXSC_INDEX_CHECK)
489 #if(CXSC_INDEX_CHECK)
490 if(
VecLen(sl1)!=
VecLen(sl2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision &, const ivector_slice &, rvector_slice &)"));
500 #if(CXSC_INDEX_CHECK)
506 #if(CXSC_INDEX_CHECK)
507 if(
VecLen(sl1)!=
VecLen(sl2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision &, const rvector_slice &, ivector_slice &)"));
518 addSum(Inf(dp),Inf(v));
519 addSum(Sup(dp),Sup(v));
523 addSum(InfRe(dp),Inf(v));
524 addSum(SupRe(dp),Sup(v));
cvector mid(const cimatrix_subv &mv) noexcept
Returns the middle of the matrix.
int get_k() const
Get currently set precision for computation of dot products.
int Ub(const cimatrix &rm, const int &i) noexcept
Returns the upper bound index.
int Zero(ivector &x)
Checks if vector is zero vector.
The Data Type idotprecision.
cinterval Blow(cinterval x, const real &eps)
Performs an epsilon inflation.
int in(const cinterval &x, const cinterval &y)
Checks if first argument is part of second argument.
The Data Type ivector_slice.
The Data Type rvector_slice.
int Lb(const cimatrix &rm, const int &i) noexcept
Returns the lower bound index.
void set_k(unsigned int i)
Set precision for computation of dot products.
The Data Type cidotprecision.
The namespace cxsc, providing all functionality of the class library C-XSC.
int UlpAcc(const interval &x, int n)
Checks if the diameter of the interval is ulps.
void DoubleSize(cimatrix &A)
Doubles the size of the matrix.
real RelDiam(const interval &x)
Computes the relative diameter .
void Resize(cimatrix &A) noexcept
Resizes the matrix.
int Disjoint(const interval &a, const interval &b)
Checks arguments for disjointness.
int VecLen(const scimatrix_subv &S)
Returns the length of the subvector.
real MaxRelDiam(const imatrix_subv &v)
Computes the relative diameter .