00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef _CXSC_L_INTERVAL_HPP_INCLUDED
00027 #define _CXSC_L_INTERVAL_HPP_INCLUDED
00028
00029 #include <iostream>
00030 #include <string>
00031 #include "real.hpp"
00032 #include "interval.hpp"
00033 #include "l_real.hpp"
00034 #include "except.hpp"
00035 #include "idot.hpp"
00036
00037 namespace cxsc {
00038
00039 class l_interval_Inf;
00040 class l_interval_Sup;
00041
00043
00071 class l_interval
00072 {
00073 friend class l_interval_Inf;
00074 friend class l_interval_Sup;
00075
00076 private:
00077
00078
00079
00080
00081
00082
00083
00084 int prec;
00085 real *data;
00086
00087
00088 public:
00089
00090 #if (CXSC_INDEX_CHECK)
00091
00092 inline l_interval() throw(ERROR_LINTERVAL_WRONG_STAGPREC);
00094 inline l_interval(const l_interval &) throw(ERROR_LINTERVAL_WRONG_STAGPREC);
00095
00097 l_interval(const l_real &, const l_real &) throw(ERROR_LINTERVAL_WRONG_STAGPREC,ERROR_LINTERVAL_EMPTY_INTERVAL);
00099 l_interval(const real &, const l_real &) throw(ERROR_LINTERVAL_WRONG_STAGPREC,ERROR_LINTERVAL_EMPTY_INTERVAL);
00101 l_interval(const l_real &, const real &) throw(ERROR_LINTERVAL_WRONG_STAGPREC,ERROR_LINTERVAL_EMPTY_INTERVAL);
00103 inline l_interval(const real &, const real &) throw(ERROR_LINTERVAL_WRONG_STAGPREC,ERROR_LINTERVAL_EMPTY_INTERVAL);
00104
00106 explicit l_interval(const dotprecision &) throw(ERROR_LINTERVAL_WRONG_STAGPREC);
00108 explicit l_interval(const dotprecision &,const dotprecision &) throw(ERROR_LINTERVAL_WRONG_STAGPREC,ERROR_LINTERVAL_EMPTY_INTERVAL);
00110 explicit l_interval(const idotprecision &) throw(ERROR_LINTERVAL_WRONG_STAGPREC);
00111 #else
00112
00113 inline l_interval() throw();
00115 inline l_interval(const l_interval &) throw();
00116
00118 l_interval(const l_real &, const l_real &) throw(ERROR_LINTERVAL_EMPTY_INTERVAL);
00120 l_interval(const real &, const l_real &) throw(ERROR_LINTERVAL_EMPTY_INTERVAL);
00122 l_interval(const l_real &, const real &) throw(ERROR_LINTERVAL_EMPTY_INTERVAL);
00124 l_interval(const real &, const real &) throw(ERROR_LINTERVAL_EMPTY_INTERVAL);
00125
00127 explicit l_interval(const dotprecision &) throw();
00129 explicit l_interval(const dotprecision &,const dotprecision &) throw(ERROR_LINTERVAL_EMPTY_INTERVAL);
00131 explicit l_interval(const idotprecision &) throw();
00132 #endif
00133
00135 explicit inline l_interval(const real &) throw();
00137 explicit inline l_interval(const l_real &) throw();
00138
00139 #if(CXSC_INDEX_CHECK)
00140
00141 explicit INLINE l_interval(const l_ivector &) throw(ERROR_LIVECTOR_TYPE_CAST_OF_THICK_OBJ,ERROR_LIVECTOR_USE_OF_UNINITIALIZED_OBJ);
00143 explicit INLINE l_interval(const l_ivector_slice &) throw(ERROR_LIVECTOR_TYPE_CAST_OF_THICK_OBJ,ERROR_LIVECTOR_USE_OF_UNINITIALIZED_OBJ);
00145 explicit INLINE l_interval(const l_imatrix &m) throw(ERROR_LIMATRIX_TYPE_CAST_OF_THICK_OBJ,ERROR_LIMATRIX_USE_OF_UNINITIALIZED_OBJ);
00147 explicit INLINE l_interval(const l_imatrix_slice &m) throw(ERROR_LIMATRIX_TYPE_CAST_OF_THICK_OBJ,ERROR_LIMATRIX_USE_OF_UNINITIALIZED_OBJ);
00149 friend INLINE interval _l_interval(const l_ivector &) throw(ERROR_LIVECTOR_TYPE_CAST_OF_THICK_OBJ,ERROR_LIVECTOR_USE_OF_UNINITIALIZED_OBJ);
00151 friend INLINE interval _l_interval(const l_ivector_slice &) throw(ERROR_LIVECTOR_TYPE_CAST_OF_THICK_OBJ,ERROR_LIVECTOR_USE_OF_UNINITIALIZED_OBJ);
00153 friend INLINE interval _l_interval(const l_imatrix &m) throw(ERROR_LIMATRIX_TYPE_CAST_OF_THICK_OBJ,ERROR_LIMATRIX_USE_OF_UNINITIALIZED_OBJ);
00155 friend INLINE interval _l_interval(const l_imatrix_slice &m) throw(ERROR_LIMATRIX_TYPE_CAST_OF_THICK_OBJ,ERROR_LIMATRIX_USE_OF_UNINITIALIZED_OBJ);
00156 #else
00157
00158 explicit INLINE l_interval(const l_ivector &) throw();
00160 explicit INLINE l_interval(const l_ivector_slice &) throw();
00162 explicit INLINE l_interval(const l_imatrix &m) throw();
00164 explicit INLINE l_interval(const l_imatrix_slice &m) throw();
00166 friend INLINE interval _l_interval(const l_ivector &) throw();
00168 friend INLINE interval _l_interval(const l_ivector_slice &) throw();
00170 friend INLINE interval _l_interval(const l_imatrix &m) throw();
00172 friend INLINE interval _l_interval(const l_imatrix_slice &m) throw();
00173 #endif
00174
00175
00176
00178 inline l_interval & operator= (const real & a) throw();
00180 inline l_interval & operator= (const l_real &a) throw();
00182 inline l_interval & operator= (const interval & a)throw();
00184 l_interval & operator= (const l_interval &a)throw();
00186 l_interval& operator = (const lx_interval&) throw();
00187 #if (CXSC_INDEX_CHECK)
00188
00189 l_interval & operator= (const dotprecision &a) throw(ERROR_LINTERVAL_WRONG_STAGPREC);
00191 l_interval & operator= (const idotprecision &) throw(ERROR_LINTERVAL_WRONG_STAGPREC);
00192 #else
00193
00194 l_interval & operator= (const dotprecision &a) throw();
00196 l_interval & operator= (const idotprecision &) throw();
00197 #endif
00198
00199
00200 inline ~l_interval() throw();
00201
00202
00204 explicit inline l_interval(const interval &) throw();
00205
00206 friend interval::interval(const l_interval &) throw();
00207 friend interval _interval(const l_interval &) throw();
00208 friend interval & interval::operator =(const l_interval &) throw();
00209
00210 friend inline interval _interval(const real &, const l_real &) throw();
00211 friend inline interval _interval(const l_real &, const real &) throw();
00212 friend inline interval _interval(const l_real &) throw();
00213 friend interval _unchecked_interval(const l_real &, const l_real &) throw();
00214
00215
00216
00217
00218
00219
00220
00221
00222
00223
00224
00225
00226
00227 friend l_interval _unchecked_l_interval(const l_real &, const l_real &) throw();
00228 friend idotprecision _idotprecision(const l_interval &) throw();
00229 friend idotprecision::idotprecision(const l_interval &) throw();
00230 friend idotprecision & idotprecision::operator =(const l_interval &) throw();
00231
00232
00234 friend std::istream& operator >> (std::istream& s, l_interval & a) throw();
00236 friend std::ostream& operator << (std::ostream& s, const l_interval & a) throw();
00238 friend std::string & operator >> (std::string& s, l_interval & a) throw();
00240 friend std::string & operator << (std::string& s, const l_interval & a) throw();
00242 friend void operator >> (const std::string& s,l_interval &a) throw();
00244 friend void operator >> (const char * s,l_interval &a) throw();
00245
00246
00247
00249 friend l_interval operator -(const l_interval &) throw();
00251 friend inline l_interval operator +(const l_interval &) throw();
00252
00253
00255 friend l_interval operator +(const l_interval &,const l_interval &) throw();
00257 friend l_interval operator -(const l_interval &,const l_interval &) throw();
00259 friend l_interval operator *(const l_interval &,const l_interval &) throw();
00261 friend l_interval operator /(const l_interval &,const l_interval &) throw(ERROR_LINTERVAL_DIV_BY_ZERO);
00263 friend inline l_interval operator |(const l_interval &,const l_interval &) throw(ERROR_LINTERVAL_IN_EXACT_CH_OR_IS);
00265 friend inline l_interval operator &(const l_interval &,const l_interval &) throw(ERROR_LINTERVAL_EMPTY_INTERVAL,ERROR_LINTERVAL_IN_EXACT_CH_OR_IS);
00266
00268 friend inline l_interval & operator +=(l_interval &,const l_interval &) throw();
00270 friend inline l_interval & operator -=(l_interval &,const l_interval &) throw();
00272 friend inline l_interval & operator *=(l_interval &,const l_interval &) throw();
00274 friend inline l_interval & operator /=(l_interval &,const l_interval &) throw();
00276 friend inline l_interval & operator |=(l_interval &,const l_interval &) throw();
00278 friend inline l_interval & operator &=(l_interval &,const l_interval &) throw(ERROR_LINTERVAL_EMPTY_INTERVAL);
00279
00280
00282 friend inline idotprecision operator +(const l_interval &,const idotprecision &) throw();
00284 friend inline idotprecision operator +(const idotprecision &,const l_interval &) throw();
00286 friend inline idotprecision operator -(const l_interval &,const idotprecision &) throw();
00288 friend inline idotprecision operator -(const idotprecision &,const l_interval &) throw();
00290 friend inline idotprecision operator |(const idotprecision &,const l_interval &) throw();
00292 friend inline idotprecision operator |(const l_interval &,const idotprecision &) throw();
00294 friend inline idotprecision operator &(const idotprecision &,const l_interval &) throw(ERROR_LINTERVAL_EMPTY_INTERVAL);
00296 friend inline idotprecision operator &(const l_interval &,const idotprecision &) throw(ERROR_LINTERVAL_EMPTY_INTERVAL);
00297
00299 friend inline l_interval & operator |=(l_interval &,const idotprecision &) throw();
00301 friend inline l_interval & operator &=(l_interval &,const idotprecision &) throw(ERROR_LINTERVAL_EMPTY_INTERVAL);
00302
00303
00305 friend inline l_interval operator +(const l_interval &,const l_real &) throw();
00307 friend inline l_interval operator +(const l_real &,const l_interval &) throw();
00309 friend inline l_interval operator -(const l_interval &,const l_real &) throw();
00311 friend inline l_interval operator -(const l_real &,const l_interval &) throw();
00313 friend inline l_interval operator *(const l_interval &,const l_real &) throw();
00315 friend inline l_interval operator *(const l_real &,const l_interval &) throw();
00317 friend inline l_interval operator /(const l_interval &,const l_real &) throw();
00319 friend inline l_interval operator /(const l_real &,const l_interval &) throw();
00321 friend inline l_interval operator |(const l_real &,const l_interval &) throw();
00323 friend inline l_interval operator |(const l_interval &,const l_real &) throw();
00325 friend inline l_interval operator |(const l_real &,const l_real &) throw();
00327 friend inline l_interval operator &(const l_real &,const l_interval &) throw(ERROR_LINTERVAL_EMPTY_INTERVAL);
00329 friend inline l_interval operator &(const l_interval &,const l_real &) throw(ERROR_LINTERVAL_EMPTY_INTERVAL);
00330
00332 friend inline l_interval & operator +=(l_interval &,const l_real &) throw();
00334 friend inline l_interval & operator -=(l_interval &,const l_real &) throw();
00336 friend inline l_interval & operator *=(l_interval &,const l_real &) throw();
00338 friend inline l_interval & operator /=(l_interval &,const l_real &) throw();
00340 friend inline l_interval & operator |=(l_interval &,const l_real &) throw();
00342 friend inline l_interval & operator &=(l_interval &,const l_real &) throw(ERROR_LINTERVAL_EMPTY_INTERVAL);
00343
00344
00346 friend inline l_interval operator +(const l_interval &,const interval &) throw();
00348 friend inline l_interval operator +(const interval &,const l_interval &) throw();
00350 friend inline l_interval operator -(const l_interval &,const interval &) throw();
00352 friend inline l_interval operator -(const interval &,const l_interval &) throw();
00354 friend inline l_interval operator *(const l_interval &,const interval &) throw();
00356 friend inline l_interval operator *(const interval &,const l_interval &) throw();
00358 friend inline l_interval operator /(const l_interval &,const interval &) throw();
00360 friend inline l_interval operator /(const interval &,const l_interval &) throw();
00362 friend inline l_interval operator |(const interval &,const l_interval &) throw();
00364 friend inline l_interval operator |(const l_interval &,const interval &) throw();
00366 friend inline l_interval operator &(const interval &,const l_interval &) throw(ERROR_LINTERVAL_EMPTY_INTERVAL);
00368 friend inline l_interval operator &(const l_interval &,const interval &) throw(ERROR_LINTERVAL_EMPTY_INTERVAL);
00369
00371 friend inline l_interval & operator +=(l_interval &,const interval &) throw();
00373 friend inline l_interval & operator -=(l_interval &,const interval &) throw();
00375 friend inline l_interval & operator *=(l_interval &,const interval &) throw();
00377 friend inline l_interval & operator /=(l_interval &,const interval &) throw();
00379 friend inline l_interval & operator |=(l_interval &,const interval &) throw();
00381 friend inline l_interval & operator &=(l_interval &,const interval &) throw(ERROR_LINTERVAL_EMPTY_INTERVAL);
00382
00383
00385 friend inline l_interval operator +(const l_interval &,const real &) throw();
00387 friend inline l_interval operator +(const real &,const l_interval &) throw();
00389 friend inline l_interval operator -(const l_interval &,const real &) throw();
00391 friend inline l_interval operator -(const real &,const l_interval &) throw();
00393 friend inline l_interval operator *(const l_interval &,const real &) throw();
00395 friend inline l_interval operator *(const real &,const l_interval &) throw();
00397 friend inline l_interval operator /(const l_interval &,const real &) throw();
00399 friend inline l_interval operator /(const real &,const l_interval &) throw();
00401 friend inline l_interval operator |(const real &,const l_interval &) throw();
00403 friend inline l_interval operator |(const l_interval &,const real &) throw();
00405 friend inline l_interval operator &(const real &,const l_interval &) throw(ERROR_LINTERVAL_EMPTY_INTERVAL);
00407 friend inline l_interval operator &(const l_interval &,const real &) throw(ERROR_LINTERVAL_EMPTY_INTERVAL);
00408
00410 friend inline l_interval & operator +=(l_interval &,const real &) throw();
00412 friend inline l_interval & operator -=(l_interval &,const real &) throw();
00414 friend inline l_interval & operator *=(l_interval &,const real &) throw();
00416 friend inline l_interval & operator /=(l_interval &,const real &) throw();
00418 friend inline l_interval & operator |=(l_interval &,const real &) throw();
00420 friend inline l_interval & operator &=(l_interval &,const real &) throw(ERROR_LINTERVAL_EMPTY_INTERVAL);
00421
00422
00424 friend inline l_interval operator +(const l_real &,const interval &) throw();
00426 friend inline l_interval operator +(const interval &,const l_real &) throw();
00428 friend inline l_interval operator -(const l_real &,const interval &) throw();
00430 friend inline l_interval operator -(const interval &,const l_real &) throw();
00432 friend inline l_interval operator *(const l_real &,const interval &) throw();
00434 friend inline l_interval operator *(const interval &,const l_real &) throw();
00436 friend inline l_interval operator /(const l_real &,const interval &) throw();
00438 friend inline l_interval operator /(const interval &,const l_real &) throw();
00440 friend inline l_interval operator |(const interval &,const l_real &) throw();
00442 friend inline l_interval operator |(const l_real &,const interval &) throw();
00444 friend inline l_interval operator &(const interval &,const l_real &) throw(ERROR_LINTERVAL_EMPTY_INTERVAL);
00446 friend inline l_interval operator &(const l_real &,const interval &) throw(ERROR_LINTERVAL_EMPTY_INTERVAL);
00447
00448
00450 friend bool operator !(const l_interval &) throw();
00451
00452
00454 friend bool operator ==(const l_interval &,const l_interval &) throw();
00456 friend inline bool operator !=(const l_interval &,const l_interval &) throw();
00457
00459 friend inline bool operator ==(const l_real &,const l_interval &) throw();
00461 friend inline bool operator !=(const l_real &,const l_interval &) throw();
00463 friend inline bool operator ==(const l_interval &,const l_real &) throw();
00465 friend inline bool operator !=(const l_interval &,const l_real &) throw();
00466
00468 friend inline bool operator ==(const interval &,const l_interval &) throw();
00470 friend inline bool operator !=(const interval &,const l_interval &) throw();
00472 friend inline bool operator ==(const l_interval &,const interval &) throw();
00474 friend inline bool operator !=(const l_interval &,const interval &) throw();
00475
00477 friend inline bool operator ==(const real &,const l_interval &) throw();
00479 friend inline bool operator !=(const real &,const l_interval &) throw();
00481 friend inline bool operator ==(const l_interval &,const real &) throw();
00483 friend inline bool operator !=(const l_interval &,const real &) throw();
00484
00486 friend inline bool operator ==(const idotprecision &,const l_interval &) throw();
00488 friend inline bool operator !=(const idotprecision &,const l_interval &) throw();
00490 friend inline bool operator ==(const l_interval &,const idotprecision &) throw();
00492 friend inline bool operator !=(const l_interval &,const idotprecision &) throw();
00493
00495 friend inline bool operator ==(const dotprecision &,const l_interval &) throw();
00497 friend inline bool operator !=(const dotprecision &,const l_interval &) throw();
00499 friend inline bool operator ==(const l_interval &,const dotprecision &) throw();
00501 friend inline bool operator !=(const l_interval &,const dotprecision &) throw();
00502
00503
00505 friend bool operator <(const l_interval &,const l_interval &) throw();
00507 friend bool operator >(const l_interval &,const l_interval &) throw();
00509 friend bool operator <=(const l_interval &,const l_interval &) throw();
00511 friend bool operator >=(const l_interval &,const l_interval &) throw();
00512
00514 friend inline bool operator <(const l_real &,const l_interval &) throw();
00516 friend inline bool operator >(const l_real &,const l_interval &) throw();
00518 friend inline bool operator <=(const l_real &,const l_interval &) throw();
00520 friend inline bool operator >=(const l_real &,const l_interval &) throw();
00522 friend inline bool operator <(const l_interval &,const l_real &) throw();
00524 friend inline bool operator >(const l_interval &,const l_real &) throw();
00526 friend inline bool operator <=(const l_interval &,const l_real &) throw();
00528 friend inline bool operator >=(const l_interval &,const l_real &) throw();
00529
00531 friend inline bool operator <(const interval &,const l_interval &) throw();
00533 friend inline bool operator >(const interval &,const l_interval &) throw();
00535 friend inline bool operator <=(const interval &,const l_interval &) throw();
00537 friend inline bool operator >=(const interval &,const l_interval &) throw();
00539 friend inline bool operator <(const l_interval &,const interval &) throw();
00541 friend inline bool operator >(const l_interval &,const interval &) throw();
00543 friend inline bool operator <=(const l_interval &,const interval &) throw();
00545 friend inline bool operator >=(const l_interval &,const interval &) throw();
00546
00548 friend inline bool operator <(const real &,const l_interval &) throw();
00550 friend inline bool operator >(const real &,const l_interval &) throw();
00552 friend inline bool operator <=(const real &,const l_interval &) throw();
00554 friend inline bool operator >=(const real &,const l_interval &) throw();
00556 friend inline bool operator <(const l_interval &,const real &) throw();
00558 friend inline bool operator >(const l_interval &,const real &) throw();
00560 friend inline bool operator <=(const l_interval &,const real &) throw();
00562 friend inline bool operator >=(const l_interval &,const real &) throw();
00563
00565 friend inline bool operator <(const idotprecision &,const l_interval &) throw();
00567 friend inline bool operator >(const idotprecision &,const l_interval &) throw();
00569 friend inline bool operator <=(const idotprecision &,const l_interval &) throw();
00571 friend inline bool operator >=(const idotprecision &,const l_interval &) throw();
00573 friend inline bool operator <(const l_interval &,const idotprecision &) throw();
00575 friend inline bool operator >(const l_interval &,const idotprecision &) throw();
00577 friend inline bool operator <=(const l_interval &,const idotprecision &) throw();
00579 friend inline bool operator >=(const l_interval &,const idotprecision &) throw();
00580
00582 friend inline bool operator <(const dotprecision &,const l_interval &) throw();
00584 friend inline bool operator >(const dotprecision &,const l_interval &) throw();
00586 friend inline bool operator <=(const dotprecision &,const l_interval &) throw();
00588 friend inline bool operator >=(const dotprecision &,const l_interval &) throw();
00590 friend inline bool operator <(const l_interval &,const dotprecision &) throw();
00592 friend inline bool operator >(const l_interval &,const dotprecision &) throw();
00594 friend inline bool operator <=(const l_interval &,const dotprecision &) throw();
00596 friend inline bool operator >=(const l_interval &,const dotprecision &) throw();
00597
00598
00599
00600
00601
00603 friend inline l_real Inf (const l_interval &) throw();
00605 friend inline l_real Sup (const l_interval &) throw();
00606
00608 friend inline int expo_sm(const l_interval&);
00609
00610
00612 friend inline int expo_gr(const l_interval&);
00613
00614
00616 friend inline int StagPrec(const l_interval &) throw();
00617
00619 friend inline l_interval & SetInf (l_interval & a, const l_real & b) throw(ERROR_LINTERVAL_EMPTY_INTERVAL);
00621 friend inline l_interval & SetSup (l_interval & a, const l_real & b) throw(ERROR_LINTERVAL_EMPTY_INTERVAL);
00623 friend inline l_interval & SetInf (l_interval & a, const real & b) throw(ERROR_LINTERVAL_EMPTY_INTERVAL);
00625 friend inline l_interval & SetSup (l_interval & a, const real & b) throw(ERROR_LINTERVAL_EMPTY_INTERVAL);
00627 friend inline l_interval adjust (const l_interval &) throw();
00628
00630 friend inline l_interval & UncheckedSetInf (l_interval & a, const l_real & b) throw();
00632 friend inline l_interval & UncheckedSetSup (l_interval & a, const l_real & b) throw();
00634 friend inline l_interval & UncheckedSetInf (l_interval & a, const real & b) throw();
00636 friend inline l_interval & UncheckedSetSup (l_interval & a, const real & b) throw();
00637
00639 friend void ConvexHull(const l_interval &, const l_interval &, l_interval &, l_interval &) throw();
00641 friend void Intersection(const l_interval &, const l_interval &, l_interval &, l_interval &) throw(ERROR_LINTERVAL_EMPTY_INTERVAL);
00642
00644 friend inline l_interval abs (const l_interval & a) throw();
00646 friend l_real mid (const l_interval & a) throw();
00648 friend inline l_real diam (const l_interval & a) throw();
00649
00651 friend l_interval pow(const l_interval &, const l_interval &) throw(ERROR_LINTERVAL_STD_FKT_OUT_OF_DEF);
00653 friend l_interval power(const l_interval &, int);
00655 friend l_interval sqr(const l_interval &);
00656
00658 friend l_interval sqrt(const l_interval &) throw(ERROR_LINTERVAL_STD_FKT_OUT_OF_DEF);
00660 friend l_interval sqrt(const l_interval &, int) throw(ERROR_LINTERVAL_STD_FKT_OUT_OF_DEF);
00661
00663 friend l_interval sin(const l_interval &) throw(ERROR_LINTERVAL_FAK_OVERFLOW);
00665 friend l_interval cos(const l_interval &) throw(ERROR_LINTERVAL_FAK_OVERFLOW);
00667 friend l_interval tan(const l_interval &) throw(ERROR_LINTERVAL_FAK_OVERFLOW,ERROR_LINTERVAL_STD_FKT_OUT_OF_DEF);
00669 friend l_interval cot(const l_interval &) throw(ERROR_LINTERVAL_FAK_OVERFLOW,ERROR_LINTERVAL_STD_FKT_OUT_OF_DEF);
00670
00672 friend l_interval asin(const l_interval &) throw(ERROR_LINTERVAL_STD_FKT_OUT_OF_DEF);
00674 friend l_interval acos(const l_interval &) throw(ERROR_LINTERVAL_STD_FKT_OUT_OF_DEF);
00676 friend l_interval atan(const l_interval &) throw();
00678 friend l_interval acot(const l_interval &) throw();
00679
00681 friend l_interval exp(const l_interval &) throw(ERROR_LINTERVAL_FAK_OVERFLOW);
00683 friend l_interval exp2(const l_interval &);
00685 friend l_interval exp10(const l_interval &);
00687 friend l_interval ln(const l_interval &) throw(ERROR_LINTERVAL_STD_FKT_OUT_OF_DEF);
00689 friend l_interval log2(const l_interval &);
00691 friend l_interval log10(const l_interval &);
00693 friend l_interval sinh(const l_interval &) throw(ERROR_LINTERVAL_FAK_OVERFLOW);
00695 friend l_interval cosh(const l_interval &) throw(ERROR_LINTERVAL_FAK_OVERFLOW);
00697 friend l_interval tanh(const l_interval &) throw();
00699 friend l_interval coth(const l_interval &) throw();
00700
00702 friend l_interval asinh(const l_interval &) throw(ERROR_LINTERVAL_STD_FKT_OUT_OF_DEF,ERROR_LINTERVAL_FAK_OVERFLOW);
00704 friend l_interval acosh(const l_interval &) throw();
00706 friend l_interval atanh(const l_interval &) throw(ERROR_LINTERVAL_STD_FKT_OUT_OF_DEF,ERROR_LINTERVAL_FAK_OVERFLOW);
00708 friend l_interval acoth(const l_interval &) throw(ERROR_LINTERVAL_STD_FKT_OUT_OF_DEF,ERROR_LINTERVAL_FAK_OVERFLOW);
00709
00711 friend l_interval Ln2_l_interval() throw();
00713 friend l_interval Ln10_l_interval() throw();
00715 friend l_interval Ln10r_l_interval() throw();
00717 friend l_interval Pid4_l_interval() throw();
00719 friend l_interval Sqrt2_l_interval() throw();
00721 friend l_interval Sqrt5_l_interval() throw();
00723 friend l_interval Sqrt7_l_interval() throw();
00724
00725
00727 friend inline l_interval li_ln2();
00729 friend inline l_interval li_ln10();
00731 friend inline l_interval li_Rln10();
00733 friend inline l_interval li_pi4();
00735 friend inline l_interval li_sqrt2();
00736
00738 friend l_interval Ln2r_l_interval() throw();
00740 friend l_interval Pi_l_interval() throw();
00742 friend l_interval Pid2_l_interval() throw();
00744 friend l_interval Pi2_l_interval() throw();
00746 friend l_interval Pid3_l_interval() throw();
00748 friend l_interval Pir_l_interval() throw();
00750 friend l_interval Pi2r_l_interval() throw();
00752 friend l_interval SqrtPi_l_interval() throw();
00754 friend l_interval Sqrt2Pi_l_interval() throw();
00756 friend l_interval SqrtPir_l_interval() throw();
00758 friend l_interval Sqrt2Pir_l_interval() throw();
00760 friend l_interval Pip2_l_interval() throw();
00762 friend l_interval Sqrt2r_l_interval() throw();
00764 friend l_interval Sqrt3_l_interval() throw();
00766 friend l_interval Sqrt3d2_l_interval() throw();
00768 friend l_interval Sqrt3r_l_interval() throw();
00770 friend l_interval LnPi_l_interval() throw();
00772 friend l_interval Ln2Pi_l_interval() throw();
00774 friend l_interval E_l_interval() throw();
00776 friend l_interval Er_l_interval() throw();
00778 friend l_interval Ep2_l_interval() throw();
00780 friend l_interval Ep2r_l_interval() throw();
00782 friend l_interval EpPi_l_interval() throw();
00784 friend l_interval Ep2Pi_l_interval() throw();
00786 friend l_interval EpPid2_l_interval() throw();
00788 friend l_interval EpPid4_l_interval() throw();
00790 friend l_interval EulerGa_l_interval() throw();
00792 friend l_interval Catalan_l_interval() throw();
00793
00794
00795
00796
00797
00798
00799
00800
00801
00802
00803
00804
00806 friend inline void accumulate(idotprecision &, const real &, const l_interval &) throw();
00808 friend inline void accumulate(idotprecision &, const l_interval &, const real &) throw();
00809
00810
00811
00813 friend inline void accumulate(idotprecision &, const interval &, const l_real &) throw();
00815 friend inline void accumulate(idotprecision &, const l_real &, const interval &) throw();
00816
00817
00818
00820 friend inline void accumulate(idotprecision &, const l_interval &, const l_real &) throw();
00822 friend inline void accumulate(idotprecision &, const l_real &, const l_interval &) throw();
00823
00824
00825
00827 friend inline void accumulate(idotprecision &, const l_interval &, const interval &) throw();
00829 friend inline void accumulate(idotprecision &, const interval &, const l_interval &) throw();
00830
00831
00832
00834 friend void accumulate(idotprecision &, const l_interval &, const l_interval &) throw();
00835
00837 friend inline bool point_intv(const l_interval &);
00839 friend inline bool zero_(const l_interval& ) throw();
00841 friend void times2pown(l_interval&, int) throw();
00843 friend void Times2pown(l_interval&, const real&) throw();
00844 friend void l_realz2l_interval(const l_real&, const interval&,
00845 l_interval&) throw();
00846
00847 #if (CXSC_INDEX_CHECK)
00848
00849 inline real & operator [](int) throw(ERROR_LINTERVAL_ELEMENT_NOT_IN_LONG);
00850 #else
00851
00852 inline real & operator [](int) throw();
00853 #endif
00854
00855 private:
00856 #if (CXSC_INDEX_CHECK)
00857 inline void _allo(int) throw(ERROR_LINTERVAL_WRONG_STAGPREC);
00858 #else
00859 inline void _allo(int) throw();
00860 #endif
00861 inline void _clear(int) throw();
00862 void _akku_out(idotprecision&) throw();
00863 void _akku_out_inn(idotprecision&) throw();
00864 void _akku_add(idotprecision &) const throw();
00865 void _akku_sub(idotprecision &) const throw();
00866
00867 inline real & elem(int i) { return data[i-1]; }
00868 inline real elem(int i) const { return data[i-1]; }
00869
00870 };
00871
00872 interval _unchecked_interval(const l_real &, const l_real &) throw();
00873
00879 inline l_interval _l_interval(const real & a) throw() { return l_interval(a); }
00885 inline l_interval _l_interval(const real & a, const real & b) throw(ERROR_LINTERVAL_EMPTY_INTERVAL) { return l_interval(a,b); }
00891 inline l_interval _l_interval(const l_real & a) throw() { return l_interval(a); }
00897 inline l_interval _l_interval(const l_real & a,const l_real & b) throw(ERROR_LINTERVAL_EMPTY_INTERVAL) { return l_interval(a,b); }
00903 inline l_interval _l_interval(const real & a, const l_real & b) throw(ERROR_LINTERVAL_EMPTY_INTERVAL) { return l_interval(a,b); }
00909 inline l_interval _l_interval(const l_real & a, const real & b) throw(ERROR_LINTERVAL_EMPTY_INTERVAL) { return l_interval(a,b); }
00910
00916 inline l_interval _l_interval(const interval & a) throw() { return l_interval(a); }
00922 inline l_interval _l_interval(const dotprecision & a) throw() { return l_interval(a); }
00928 inline l_interval _l_interval(const dotprecision & a,const dotprecision & b) throw(ERROR_LINTERVAL_EMPTY_INTERVAL) { return l_interval(a,b); }
00934 inline l_interval _l_interval(const idotprecision & a) throw() { return l_interval(a); }
00935 l_interval _unchecked_l_interval(const l_real &, const l_real &) throw();
00936
00937
00938
00939 inline l_real Inf (const l_interval &) throw();
00940 inline l_real Sup (const l_interval &) throw();
00941
00942 int in ( const real& x, const l_interval& y );
00943 int in ( const l_real& x, const l_interval& y );
00944 int in ( const interval& x, const l_interval& y );
00945 int in ( const l_interval& x, const l_interval& y );
00946 l_interval Blow (const l_interval& x, const real& eps );
00947 int Disjoint (const l_interval& a, const l_interval& b );
00948 l_real AbsMin ( const l_interval& x );
00949
00950 l_real AbsMax (const l_interval& x );
00951
00952 l_real RelDiam ( const l_interval x );
00953
00954 inline bool point_intv(const l_interval &a );
00955
00956 void times2pown(l_interval&, int) throw();
00957 void Times2pown(l_interval&, const real&) throw();
00958
00960
00963 class l_interval_Inf
00964 {
00965 private:
00966 l_interval & my_l_interval;
00967 public:
00968
00970 l_interval_Inf(l_interval &a) throw() : my_l_interval(a) {}
00971 operator l_real(void) const { return Inf((const l_interval)my_l_interval); }
00973 l_interval & operator =(const l_real & a) throw(ERROR_LINTERVAL_EMPTY_INTERVAL) { SetInf(my_l_interval,a); return my_l_interval; }
00975 l_interval & operator =(const real & a) throw(ERROR_LINTERVAL_EMPTY_INTERVAL) { SetInf(my_l_interval,_l_real(a)); return my_l_interval; }
00976
00977 };
00979
00982 class l_interval_Sup
00983 {
00984 private:
00985 l_interval & my_l_interval;
00986 public:
00988 l_interval_Sup(l_interval &a) throw() : my_l_interval(a) {}
00989 operator l_real(void) const { return Sup((const l_interval)my_l_interval); }
00991 l_interval & operator =(const l_real & a) throw(ERROR_LINTERVAL_EMPTY_INTERVAL) { SetSup(my_l_interval,a); return my_l_interval; }
00993 l_interval & operator =(const real & a) throw(ERROR_LINTERVAL_EMPTY_INTERVAL) { SetSup(my_l_interval,_l_real(a)); return my_l_interval; }
00994
00995 };
00996
00997 }
00998
00999 #include "l_interval.inl"
01000
01001 #endif // _CXSC_L_INTERVAL_HPP_INCLUDED