CAPD DynSys Library  5.2.0
Intervals

Files

file  DoubleInterval.cpp
 

Namespaces

 capd::cxsc
 fast interval library
 
 capd::filib
 fast interval library
 
 capd
 

Classes

class  capd::intervals::Interval< T_Bound, T_Rnd >
 Definition of template class Interval. More...
 
class  capd::intervals::IntervalTraits< T_Bound >
 
class  capd::intervals::IntervalTraits< double >
 
class  capd::intervals::IntervalTraits< float >
 
class  capd::intervals::IntervalTraits< long double >
 
class  capd::intervals::IntervalIOTraits< T_Bound >
 
class  capd::intervals::IntervalIOTraits< double >
 
class  capd::intervals::IntervalIOTraits< float >
 
class  capd::filib::Interval< T, R, M >
 CAPD interface for fast interval library filib. More...
 

Typedefs

typedef capd::rounding::DoubleRounding DoubleRounding
 

Functions

template<typename T_Bound , typename T_Rnd >
Interval< T_Bound, T_Rnd > capd::intervals::diam (const Interval< T_Bound, T_Rnd > &A_iVal)
 upper bound for a diameter of an interval More...
 
template<typename T_Bound , typename T_Rnd >
T_Bound capd::intervals::width (const Interval< T_Bound, T_Rnd > &A_iVal)
 non-rigorous diameter of an interval More...
 
template<typename T_Bound , typename T_Rnd >
Interval< T_Bound, T_Rnd > capd::intervals::mid (const Interval< T_Bound, T_Rnd > &A_iv)
 
template<typename T_Bound , typename T_Rnd >
bool capd::intervals::intersection (Interval< T_Bound, T_Rnd > A_iv1, Interval< T_Bound, T_Rnd > A_iv2, Interval< T_Bound, T_Rnd > &A_rInter)
 Intersection of two intervals. More...
 
template<typename T_Bound , typename T_Rnd >
Interval< T_Bound, T_Rnd > capd::intervals::intervalHull (const Interval< T_Bound, T_Rnd > &A_iv1, const Interval< T_Bound, T_Rnd > &A_iv2)
 returns an interval containing A_iv1 and A_iv2 More...
 
template<typename T_Bound , typename T_Rnd >
void capd::intervals::split (Interval< T_Bound, T_Rnd > &A_iv, Interval< T_Bound, T_Rnd > &A_rMid, T_Bound &A_diam)
 On output: $ iv \subset Mid + [-diam , diam] $. More...
 
template<typename T_Bound , typename T_Rnd >
void capd::intervals::split (Interval< T_Bound, T_Rnd > &A_rIv, T_Bound &A_diam)
 
template<typename T_Bound , typename T_Rnd >
bool capd::intervals::isSingular (const Interval< T_Bound, T_Rnd > &A_x)
 
template<typename T_Bound , typename T_Rnd >
Interval< T_Bound, T_Rnd > capd::intervals::power (const Interval< T_Bound, T_Rnd > &base, int exponent)
 a computation of base^{exponent} More...
 
template<typename T_Bound , typename T_Rnd >
Interval< T_Bound, T_Rnd > capd::intervals::power (const Interval< T_Bound, T_Rnd > &a, const Interval< T_Bound, T_Rnd > &b)
 a computation of a^b More...
 
template<typename T_Bound , typename T_Rnd >
Interval< T_Bound, T_Rnd > capd::intervals::sqrt (const Interval< T_Bound, T_Rnd > &x)
 square root of x More...
 
template<typename T_Bound , typename T_Rnd >
Interval< T_Bound, T_Rnd > capd::intervals::sin (const Interval< T_Bound, T_Rnd > &x)
 sinus of x More...
 
template<typename T_Bound , typename T_Rnd >
Interval< T_Bound, T_Rnd > capd::intervals::cos (const Interval< T_Bound, T_Rnd > &x)
 cosinus of x More...
 
template<typename T_Bound , typename T_Rnd >
Interval< T_Bound, T_Rnd > capd::intervals::tan (const Interval< T_Bound, T_Rnd > &x)
 tangens of x More...
 
template<typename T_Bound , typename T_Rnd >
Interval< T_Bound, T_Rnd > capd::intervals::cot (const Interval< T_Bound, T_Rnd > &x)
 cotangens of x More...
 
template<typename T_Bound , typename T_Rnd >
Interval< T_Bound, T_Rnd > capd::intervals::atan (const Interval< T_Bound, T_Rnd > &x)
 arctangens of x More...
 
template<typename T_Bound , typename T_Rnd >
Interval< T_Bound, T_Rnd > capd::intervals::asin (const Interval< T_Bound, T_Rnd > &x)
 
template<typename T_Bound , typename T_Rnd >
Interval< T_Bound, T_Rnd > capd::intervals::acos (const Interval< T_Bound, T_Rnd > &x)
 
template<typename T_Bound , typename T_Rnd >
Interval< T_Bound, T_Rnd > capd::intervals::sinh (const Interval< T_Bound, T_Rnd > &x)
 sinh More...
 
template<typename T_Bound , typename T_Rnd >
Interval< T_Bound, T_Rnd > capd::intervals::cosh (const Interval< T_Bound, T_Rnd > &x)
 cosh More...
 
template<typename T_Bound , typename T_Rnd >
Interval< T_Bound, T_Rnd > capd::intervals::tanh (const Interval< T_Bound, T_Rnd > &x)
 tanh More...
 
template<typename T_Bound , typename T_Rnd >
Interval< T_Bound, T_Rnd > capd::intervals::coth (const Interval< T_Bound, T_Rnd > &x)
 coth More...
 
template<typename T_Bound , typename T_Rnd >
Interval< T_Bound, T_Rnd > capd::intervals::exp (const Interval< T_Bound, T_Rnd > &x)
 returns exp(x) More...
 
template<typename T_Bound , typename T_Rnd >
Interval< T_Bound, T_Rnd > capd::intervals::log (const Interval< T_Bound, T_Rnd > &x)
 computes natural logarithm of x, x>0 More...
 
template<typename T_Bound , typename T_Rnd >
Interval< T_Bound, T_Rnd > capd::intervals::solveAffineInclusion (const Interval< T_Bound, T_Rnd > &a, const Interval< T_Bound, T_Rnd > &p, const Interval< T_Bound, T_Rnd > &c)
 solves inclusion $ a+[0,t]*p\subset c for t $ More...
 
template<typename T_Bound , typename T_Rnd >
Interval< T_Bound, T_Rnd > capd::intervals::solveAffineInclusion (const Interval< T_Bound, T_Rnd > &a, const Interval< T_Bound, T_Rnd > &p, const Interval< T_Bound, T_Rnd > &c, int &dir)
 
template<typename T_Bound , typename T_Rnd >
Interval< T_Bound, T_Rnd > capd::intervals::sqr (const Interval< T_Bound, T_Rnd > &x)
 
template<typename T_Bound , typename T_Rnd >
Interval< T_Bound, T_Rnd > capd::intervals::nonnegativePart (const Interval< T_Bound, T_Rnd > &iv)
 returns nonnegative part of interval More...
 
template<typename T_Bound , typename T_Rnd >
Interval< T_Bound, T_Rnd > capd::intervals::ball (const Interval< T_Bound, T_Rnd > &iv, const Interval< T_Bound, T_Rnd > &r)
 Ball with center iv and radius r. More...
 
template<typename T_Bound , typename T_Rnd >
Interval< T_Bound, T_Rnd > capd::intervals::ball (const Interval< T_Bound, T_Rnd > &iv, const T_Bound &r)
 Ball with center iv and radius r. More...
 
template<typename T_Bound , typename T_Rnd >
intervals::Interval< T_Bound, T_Rnd > capd::intervals::iabs (const intervals::Interval< T_Bound, T_Rnd > &A_inter)
 an absolute value More...
 
template<typename T_Bound , typename T_Rnd >
intervals::Interval< T_Bound, T_Rnd > capd::intervals::imax (const intervals::Interval< T_Bound, T_Rnd > &A_iv1, const intervals::Interval< T_Bound, T_Rnd > &A_iv2)
 maximum More...
 
template<typename T_Bound , typename T_Rnd >
intervals::Interval< T_Bound, T_Rnd > capd::intervals::imin (const intervals::Interval< T_Bound, T_Rnd > &A_iv1, const intervals::Interval< T_Bound, T_Rnd > &A_iv2)
 minimum More...
 
template<typename T_Bound , typename T_Rnd >
bool capd::intervals::isinf (const Interval< T_Bound, T_Rnd > &r)
 returns true if any of endpoints is infinite More...
 
template<typename T_Bound , typename T_Rnd >
bool capd::intervals::isnan (const capd::intervals::Interval< T_Bound, T_Rnd > &r)
 returns true if any of endpoints is a NaN More...
 
template<typename T_Bound , typename T_Rnd >
Interval< T_Bound, T_Rnd > capd::intervals::copysign (const Interval< T_Bound, T_Rnd > &x, const Interval< T_Bound, T_Rnd > &y)
 returns interval containing copysign(a, b) for each a in x and b in y More...
 
MpInterval::BoundType capd::intervals::quadrant (const MpInterval::BoundType &x)
 returns the integer part of the division of x by Pi/2 the result is exact More...
 
int capd::intervals::modulo4 (MpReal x)
 
template<>
MpInterval capd::intervals::sin (const MpInterval &x)
 
template<>
MpInterval capd::intervals::cos (const MpInterval &x)
 
template<>
MpInterval capd::intervals::tan (const MpInterval &x)
 
template<>
MpInterval capd::intervals::log (const MpInterval &x)
 
template<>
MpInterval capd::intervals::exp (const MpInterval &x)
 
template<>
MpInterval capd::intervals::sqrt (const MpInterval &z)
 
template<>
MpInterval capd::intervals::power (const MpInterval &value, int exponent)
 

Detailed Description

Typedef Documentation

◆ DoubleRounding

Function Documentation

◆ acos()

template<typename T_Bound , typename T_Rnd >
Interval< T_Bound, T_Rnd > capd::intervals::acos ( const Interval< T_Bound, T_Rnd > &  x)

◆ asin()

template<typename T_Bound , typename T_Rnd >
Interval< T_Bound, T_Rnd > capd::intervals::asin ( const Interval< T_Bound, T_Rnd > &  x)

◆ atan()

template<typename T_Bound , typename T_Rnd >
Interval< T_Bound, T_Rnd > capd::intervals::atan ( const Interval< T_Bound, T_Rnd > &  x)

arctangens of x

◆ ball() [1/2]

template<typename T_Bound , typename T_Rnd >
Interval<T_Bound, T_Rnd> capd::intervals::ball ( const Interval< T_Bound, T_Rnd > &  iv,
const Interval< T_Bound, T_Rnd > &  r 
)
inline

Ball with center iv and radius r.

◆ ball() [2/2]

template<typename T_Bound , typename T_Rnd >
Interval<T_Bound, T_Rnd> capd::intervals::ball ( const Interval< T_Bound, T_Rnd > &  iv,
const T_Bound &  r 
)
inline

Ball with center iv and radius r.

◆ copysign()

template<typename T_Bound , typename T_Rnd >
Interval< T_Bound, T_Rnd > capd::intervals::copysign ( const Interval< T_Bound, T_Rnd > &  x,
const Interval< T_Bound, T_Rnd > &  y 
)
inline

returns interval containing copysign(a, b) for each a in x and b in y

◆ cos() [1/2]

template<typename T_Bound , typename T_Rnd >
Interval< T_Bound, T_Rnd > capd::intervals::cos ( const Interval< T_Bound, T_Rnd > &  x)

cosinus of x

◆ cos() [2/2]

template<>
MpInterval capd::intervals::cos ( const MpInterval x)

◆ cosh()

template<typename T_Bound , typename T_Rnd >
Interval< T_Bound, T_Rnd > capd::intervals::cosh ( const Interval< T_Bound, T_Rnd > &  x)

cosh

◆ cot()

template<typename T_Bound , typename T_Rnd >
Interval< T_Bound, T_Rnd > capd::intervals::cot ( const Interval< T_Bound, T_Rnd > &  x)

cotangens of x

◆ coth()

template<typename T_Bound , typename T_Rnd >
Interval< T_Bound, T_Rnd > capd::intervals::coth ( const Interval< T_Bound, T_Rnd > &  x)

coth

◆ diam()

template<typename T_Bound , typename T_Rnd >
Interval< T_Bound, T_Rnd > capd::intervals::diam ( const Interval< T_Bound, T_Rnd > &  A_iVal)

upper bound for a diameter of an interval

◆ exp() [1/2]

template<typename T_Bound , typename T_Rnd >
Interval< T_Bound, T_Rnd > capd::intervals::exp ( const Interval< T_Bound, T_Rnd > &  x)

returns exp(x)

Remarks
do not add taylor expansion errors to upper bounds.

◆ exp() [2/2]

template<>
MpInterval capd::intervals::exp ( const MpInterval x)

◆ iabs()

template<typename T_Bound , typename T_Rnd >
intervals::Interval<T_Bound, T_Rnd> capd::intervals::iabs ( const intervals::Interval< T_Bound, T_Rnd > &  A_inter)
inline

an absolute value

◆ imax()

template<typename T_Bound , typename T_Rnd >
intervals::Interval< T_Bound, T_Rnd> capd::intervals::imax ( const intervals::Interval< T_Bound, T_Rnd > &  A_iv1,
const intervals::Interval< T_Bound, T_Rnd > &  A_iv2 
)
inline

maximum

◆ imin()

template<typename T_Bound , typename T_Rnd >
intervals::Interval< T_Bound, T_Rnd> capd::intervals::imin ( const intervals::Interval< T_Bound, T_Rnd > &  A_iv1,
const intervals::Interval< T_Bound, T_Rnd > &  A_iv2 
)
inline

minimum

◆ intersection()

template<typename T_Bound , typename T_Rnd >
bool capd::intervals::intersection ( Interval< T_Bound, T_Rnd >  A_iv1,
Interval< T_Bound, T_Rnd >  A_iv2,
Interval< T_Bound, T_Rnd > &  A_rInter 
)

Intersection of two intervals.

Parameters
[in]A_iv1,A_iv2two intervals
[out]A_rInterintersection of A_iv1 and A_iv2 (if non empty)
Returns
if common part of iv1 and iv2 is nonempty then inter =intersection of iv1 and iv2 and true is returned otherwise false is returned and inter is untouched

◆ intervalHull()

template<typename T_Bound , typename T_Rnd >
Interval< T_Bound, T_Rnd > capd::intervals::intervalHull ( const Interval< T_Bound, T_Rnd > &  A_iv1,
const Interval< T_Bound, T_Rnd > &  A_iv2 
)

returns an interval containing A_iv1 and A_iv2

◆ isinf()

template<typename T_Bound , typename T_Rnd >
bool capd::intervals::isinf ( const Interval< T_Bound, T_Rnd > &  r)
inline

returns true if any of endpoints is infinite

◆ isnan()

template<typename T_Bound , typename T_Rnd >
bool capd::intervals::isnan ( const capd::intervals::Interval< T_Bound, T_Rnd > &  r)
inline

returns true if any of endpoints is a NaN

◆ isSingular()

template<typename T_Bound , typename T_Rnd >
bool capd::intervals::isSingular ( const Interval< T_Bound, T_Rnd > &  A_x)
inline

◆ log() [1/2]

template<typename T_Bound , typename T_Rnd >
Interval< T_Bound, T_Rnd > capd::intervals::log ( const Interval< T_Bound, T_Rnd > &  x)

computes natural logarithm of x, x>0

◆ log() [2/2]

template<>
MpInterval capd::intervals::log ( const MpInterval x)

◆ mid()

template<typename T_Bound , typename T_Rnd >
Interval<T_Bound, T_Rnd> capd::intervals::mid ( const Interval< T_Bound, T_Rnd > &  A_iv)
inline

◆ modulo4()

int capd::intervals::modulo4 ( MpReal  x)

◆ nonnegativePart()

template<typename T_Bound , typename T_Rnd >
Interval<T_Bound, T_Rnd> capd::intervals::nonnegativePart ( const Interval< T_Bound, T_Rnd > &  iv)
inline

returns nonnegative part of interval

Remarks
if nonnegative part is empty throws exception

◆ power() [1/3]

template<typename T_Bound , typename T_Rnd >
Interval< T_Bound, T_Rnd > capd::intervals::power ( const Interval< T_Bound, T_Rnd > &  a,
const Interval< T_Bound, T_Rnd > &  b 
)

a computation of a^b

◆ power() [2/3]

template<typename T_Bound , typename T_Rnd >
Interval< T_Bound, T_Rnd > capd::intervals::power ( const Interval< T_Bound, T_Rnd > &  base,
int  exponent 
)

a computation of base^{exponent}

◆ power() [3/3]

template<>
MpInterval capd::intervals::power ( const MpInterval value,
int  exponent 
)

◆ quadrant()

MpInterval::BoundType capd::intervals::quadrant ( const MpInterval::BoundType x)

returns the integer part of the division of x by Pi/2 the result is exact

◆ sin() [1/2]

template<typename T_Bound , typename T_Rnd >
Interval< T_Bound, T_Rnd > capd::intervals::sin ( const Interval< T_Bound, T_Rnd > &  x)

sinus of x

◆ sin() [2/2]

template<>
MpInterval capd::intervals::sin ( const MpInterval x)

◆ sinh()

template<typename T_Bound , typename T_Rnd >
Interval< T_Bound, T_Rnd > capd::intervals::sinh ( const Interval< T_Bound, T_Rnd > &  x)

sinh

◆ solveAffineInclusion() [1/2]

template<typename T_Bound , typename T_Rnd >
Interval< T_Bound, T_Rnd > capd::intervals::solveAffineInclusion ( const Interval< T_Bound, T_Rnd > &  a,
const Interval< T_Bound, T_Rnd > &  p,
const Interval< T_Bound, T_Rnd > &  c 
)

solves inclusion $ a+[0,t]*p\subset c for t $

◆ solveAffineInclusion() [2/2]

template<typename T_Bound , typename T_Rnd >
Interval< T_Bound, T_Rnd > capd::intervals::solveAffineInclusion ( const Interval< T_Bound, T_Rnd > &  a,
const Interval< T_Bound, T_Rnd > &  p,
const Interval< T_Bound, T_Rnd > &  c,
int dir 
)

◆ split() [1/2]

template<typename T_Bound , typename T_Rnd >
void capd::intervals::split ( Interval< T_Bound, T_Rnd > &  A_iv,
Interval< T_Bound, T_Rnd > &  A_rMid,
T_Bound &  A_diam 
)

On output: $ iv \subset Mid + [-diam , diam] $.

◆ split() [2/2]

template<typename T_Bound , typename T_Rnd >
void capd::intervals::split ( Interval< T_Bound, T_Rnd > &  A_rIv,
T_Bound &  A_diam 
)
inline

◆ sqr()

template<typename T_Bound , typename T_Rnd >
Interval<T_Bound, T_Rnd> capd::intervals::sqr ( const Interval< T_Bound, T_Rnd > &  x)

◆ sqrt() [1/2]

template<typename T_Bound , typename T_Rnd >
Interval< T_Bound, T_Rnd > capd::intervals::sqrt ( const Interval< T_Bound, T_Rnd > &  x)

square root of x

◆ sqrt() [2/2]

template<>
MpInterval capd::intervals::sqrt ( const MpInterval z)

◆ tan() [1/2]

template<typename T_Bound , typename T_Rnd >
Interval< T_Bound, T_Rnd > capd::intervals::tan ( const Interval< T_Bound, T_Rnd > &  x)

tangens of x

◆ tan() [2/2]

template<>
MpInterval capd::intervals::tan ( const MpInterval x)

◆ tanh()

template<typename T_Bound , typename T_Rnd >
Interval< T_Bound, T_Rnd > capd::intervals::tanh ( const Interval< T_Bound, T_Rnd > &  x)

tanh

◆ width()

template<typename T_Bound , typename T_Rnd >
T_Bound capd::intervals::width ( const Interval< T_Bound, T_Rnd > &  A_iVal)

non-rigorous diameter of an interval