CAPD DynSys Library 5.2.0
capd::filib::Interval< T, R, M > Class Template Reference

CAPD interface for fast interval library filib. More...

#include <capd/filib/Interval.h>

Public Types

typedef ::filib::interval< T, R, M > BaseInterval
 
typedef BaseInterval::value_type BoundType
 
typedef ::filib::fp_traits< T, R > RoundingPolicy
 
typedef capd::intervals::IntervalError< BoundTypeIntervalError
 

Public Member Functions

 Interval ()
 
 Interval (const Interval &A_iv)
 copying constructor More...
 
 Interval (const BoundType &A_scalar)
 constructor from any class that can be coverted to BoundType More...
 
 Interval (const BoundType &A_left, const BoundType &A_right)
 constructor from any class that can be coverted to BoundType More...
 
 Interval (const BaseInterval &interval)
 
 Interval (const char left[], const char right[])
 
 Interval (const std::string &left, const std::string &right)
 
BaseIntervalgetBaseInterval ()
 returns reference to base (filib) interval More...
 
const BaseIntervalgetBaseInterval () const
 returns const reference to base (filib) interval More...
 
const BoundTypeleftBound () const
 < returns the left end of the interval More...
 
const BoundTyperightBound () const
 < returns the right end of the interval More...
 
const BoundTypeinf () const
 < returns the left end of the interval More...
 
const BoundTypesup () const
 < returns the right end of the interval More...
 
void setLeftBound (const BoundType &A_left)
 
void setRightBound (const BoundType &A_right)
 
Interval left () const
 < returns interval containing left end More...
 
Interval right () const
 < returns interval containing right end More...
 
template<typename T_Scalar >
bool contains (const T_Scalar &A_X) const
 < checks if interval contains given point X More...
 
bool contains (const Interval &A_iv) const
 < checks if interval contains given interval iv More...
 
template<typename T_Scalar >
bool containsInInterior (const T_Scalar &A_X) const
 < checks if interval contains in interior given point X More...
 
bool containsInInterior (const Interval &A_iv) const
 < checks if interval contains in interior given interval iv More...
 
bool subset (const Interval &A_iv) const
 < checks if interval is subset of iv More...
 
bool subsetInterior (const Interval &A_iv) const
 < checks if interval is subset of interior of iv More...
 
Interval mid () const
 < returns middle point of interval More...
 
Interval abs () const
 <Returns the interval of absolute values of this interval, i.e. More...
 
void split (Interval &A_rMid, Interval &A_rRemainder) const
 Splits interval into the form mid + remainder, where mid - is middle point. More...
 
void split (BoundType &A_rMid, Interval &A_rRemainder) const
 
void split (Interval &r)
 
Intervaloperator= (const Interval &A_iv)
 
Intervaloperator= (const BoundType &A_x)
 
Intervaloperator+= (const Interval &A_iv)
 
Intervaloperator-= (const Interval &A_iv)
 
Intervaloperator*= (const Interval &A_iv)
 
Intervaloperator/= (const Interval &A_iv)
 

Static Public Member Functions

static void setup ()
 sets up floting point unit. More...
 
static void reset ()
 resets default rounding mode (to the nearest) More...
 
static Interval pi ()
 returns pi constant More...
 
static Interval euler ()
 returns euler constant More...
 

Static Public Attributes

static const IntervalMode mode = M
 

Protected Attributes

BaseInterval m_interval
 

Friends

const BoundTypeleftBound (const Interval &x)
 
const BoundTyperightBound (const Interval &x)
 
const BoundTypeinf (const Interval &x)
 
const BoundTypesup (const Interval &x)
 
Interval left (const Interval &x)
 
Interval right (const Interval &x)
 
bool subset (const Interval &A_iv1, const Interval &A_iv2)
 
bool subsetInterior (const Interval &A_iv1, const Interval &A_iv2)
 
bool operator== (const Interval &A_iv1, const Interval &A_iv2)
 
bool operator<= (const Interval &A_iv1, const Interval &A_iv2)
 
bool operator>= (const Interval &A_iv1, const Interval &A_iv2)
 
bool operator< (const Interval &A_iv1, const Interval &A_iv2)
 
bool operator> (const Interval &A_iv1, const Interval &A_iv2)
 
bool operator!= (const Interval &A_iv1, const Interval &A_iv2)
 
bool operator== (const Interval &A_iVal1, const BoundType &A_Val2)
 operator == (interval, scalar) More...
 
bool operator== (const BoundType &A_Val1, const Interval &A_iVal2)
 operator == (scalar, interval) More...
 
bool operator!= (const Interval &A_iVal1, const BoundType &A_Val2)
 operator != (interval, scalar) More...
 
bool operator!= (const BoundType &A_Val1, const Interval &A_iVal2)
 operator != (scalar, interval) More...
 
bool operator> (const Interval &A_iVal1, const BoundType &A_Val2)
 operator > (interval, scalar) More...
 
bool operator> (const BoundType &A_Val1, const Interval &A_iVal2)
 operator > (scalar, interval) More...
 
bool operator>= (const Interval &A_iVal1, const BoundType &A_Val2)
 operator >= (interval, scalar) More...
 
bool operator>= (const BoundType &A_Val1, const Interval &A_iVal2)
 operator >= (scalar, interval) More...
 
bool operator< (const Interval &A_iVal1, const BoundType &A_Val2)
 operator < (interval, scalar) More...
 
bool operator< (const BoundType &A_Val1, const Interval &A_iVal2)
 operator < (scalar, interval) More...
 
bool operator<= (const Interval &A_iVal1, const BoundType &A_Val2)
 operator <= (interval, scalar) More...
 
bool operator<= (const BoundType &A_Val1, const Interval &A_iVal2)
 operator <= (scalar, interval) More...
 
Interval operator- (const Interval &A_iv)
 
Interval operator+ (const Interval &A_iv1, const Interval &A_iv2)
 
Interval operator- (const Interval &A_iv1, const Interval &A_iv2)
 
Interval operator* (const Interval &A_iv1, const Interval &A_iv2)
 
Interval operator/ (const Interval &A_iv1, const Interval &A_iv2)
 
template<class E >
Interval operator^ (const Interval &x, E)
 DW: this template is defined to prevent implicit conversion of exponent type In the previous implementation interval^double was converted to interval^int. More...
 
Interval operator^ (const Interval &x, unsigned int n)
 
Interval operator^ (const Interval &x, int n)
 
Interval operator^ (const Interval &x, Interval::BoundType b)
 
Interval operator^ (const Interval &a, const Interval &b)
 
Interval operator+ (const Interval &A_iVal, const BoundType &A_x)
 operator + (interval, scalar) More...
 
Interval operator+ (const BoundType &A_x, const Interval &A_iVal)
 operator + (scalar, interval) More...
 
Interval operator- (const Interval &A_iVal, const BoundType &A_x)
 operator - (interval, scalar) More...
 
Interval operator- (const BoundType &A_x, const Interval &A_iVal)
 operator - (scalar, interval) More...
 
Interval operator* (const Interval &A_iVal, const BoundType &A_x)
 operator * (interval, scalar) More...
 
Interval operator* (const BoundType &A_x, const Interval &A_iVal)
 operator * (scalar, interval) More...
 
Interval operator/ (const Interval &A_iVal, const BoundType &A_x)
 operator / (scalar, interval) More...
 
Interval operator/ (const BoundType &A_x, const Interval &A_iVal)
 operator / (interval, scalar) More...
 
std::ostream & operator<< (std::ostream &s, const Interval &A_iv)
 
std::istream & operator>> (std::istream &s, Interval &A_iv)
 
std::ostream & bitWrite (std::ostream &out, const Interval &iv)
 
std::istream & bitRead (std::istream &in, Interval &iv)
 
std::ostream & hexWrite (std::ostream &out, const Interval &iv)
 
std::istream & hexRead (std::istream &in, Interval &iv)
 
std::ostream & binWrite (std::ostream &out, const Interval &iv)
 
std::istream & binRead (std::istream &in, Interval &iv)
 
Interval diam (const Interval &ix)
 
Interval mid (const Interval &A_iv)
 
bool intersection (const Interval &A_iv1, const Interval &A_iv2, Interval &A_rIntersection)
 Intersection of two intervals. More...
 
Interval intervalHull (const Interval &ix, const Interval &iy)
 returns an interval containing ix and iy More...
 
void split (Interval &A_iv, Interval &A_rMid, BoundType &A_diam)
 
void split (Interval &A_rIv, BoundType &A_diam)
 
bool isSingular (const Interval &A_x)
 
template<class E >
Interval power (const Interval &x, E n)
 
Interval sqrt (const Interval &x)
 
Interval sin (const Interval &x)
 
Interval cos (const Interval &x)
 
Interval tan (const Interval &x)
 
Interval cot (const Interval &x)
 
Interval atan (const Interval &x)
 
Interval asin (const Interval &x)
 
Interval acos (const Interval &x)
 
Interval sinh (const Interval &x)
 
Interval cosh (const Interval &x)
 
Interval tanh (const Interval &x)
 
Interval coth (const Interval &x)
 
Interval exp (const Interval &x)
 
Interval log (const Interval &x)
 
Interval sqr (const Interval &x)
 
bool isinf (const Interval &r)
 returns true if any of endpoints is infinite More...
 
bool isnan (const Interval &r)
 returns true if any of endpoints is a NaN More...
 
Interval copysign (const Interval &x, const Interval &y)
 returns interval containing copysign(a, b) for each a in x and b in y More...
 
Interval nonnegativePart (const Interval &iv)
 returns nonnegative part of interval More...
 
Interval ball (const Interval &iv, const Interval &r)
 Ball with center iv and radius r. More...
 
Interval ball (const Interval &iv, const BoundType &r)
 Ball with center iv and radius r. More...
 
Interval solveAffineInclusion (const Interval &a, const Interval &p, const Interval &c)
 solves inclusion a+[0,t]*p\subset c for t More...
 
Interval solveAffineInclusion (const Interval &a, const Interval &p, const Interval &c, int &dir)
 solves inclusion a+[0,t]*p\subset c for t More...
 

Detailed Description

template<typename T, RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
class capd::filib::Interval< T, R, M >

CAPD interface for fast interval library filib.

This template class has three parameters

To prevent misusing and enable easy interchange of a different interval implementation the filib interval T is not a base class of the Interval class and can be accesed only by getBaseInterval() method.

Member Typedef Documentation

◆ BaseInterval

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
typedef ::filib::interval<T, R, M > capd::filib::Interval< T, R, M >::BaseInterval

◆ BoundType

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
typedef BaseInterval::value_type capd::filib::Interval< T, R, M >::BoundType

◆ IntervalError

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
typedef capd::intervals::IntervalError<BoundType> capd::filib::Interval< T, R, M >::IntervalError

◆ RoundingPolicy

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
typedef ::filib::fp_traits<T, R> capd::filib::Interval< T, R, M >::RoundingPolicy

Constructor & Destructor Documentation

◆ Interval() [1/7]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
capd::filib::Interval< T, R, M >::Interval ( )
inline

◆ Interval() [2/7]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
capd::filib::Interval< T, R, M >::Interval ( const Interval< T, R, M > &  A_iv)
inline

copying constructor

◆ Interval() [3/7]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
capd::filib::Interval< T, R, M >::Interval ( const BoundType A_scalar)
inline

constructor from any class that can be coverted to BoundType

◆ Interval() [4/7]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
capd::filib::Interval< T, R, M >::Interval ( const BoundType A_left,
const BoundType A_right 
)
inline

constructor from any class that can be coverted to BoundType

◆ Interval() [5/7]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
capd::filib::Interval< T, R, M >::Interval ( const BaseInterval< T, R, M > &  interval)
inline

◆ Interval() [6/7]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
capd::filib::Interval< T, R, M >::Interval ( const char  left[],
const char  right[] 
)
inline

◆ Interval() [7/7]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
capd::filib::Interval< T, R, M >::Interval ( const std::string &  left,
const std::string &  right 
)
inline

Member Function Documentation

◆ abs()

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval capd::filib::Interval< T, R, M >::abs ( ) const
inline

<Returns the interval of absolute values of this interval, i.e.

◆ contains() [1/2]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
bool capd::filib::Interval< T, R, M >::contains ( const Interval< T, R, M > &  A_iv) const
inline

< checks if interval contains given interval iv

◆ contains() [2/2]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
template<typename T_Scalar >
bool capd::filib::Interval< T, R, M >::contains ( const T_Scalar &  A_X) const
inline

< checks if interval contains given point X

◆ containsInInterior() [1/2]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
bool capd::filib::Interval< T, R, M >::containsInInterior ( const Interval< T, R, M > &  A_iv) const
inline

< checks if interval contains in interior given interval iv

◆ containsInInterior() [2/2]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
template<typename T_Scalar >
bool capd::filib::Interval< T, R, M >::containsInInterior ( const T_Scalar &  A_X) const
inline

< checks if interval contains in interior given point X

◆ euler()

template<typename T , RoundingStrategy R, IntervalMode M>
Interval< T, R, M > capd::filib::Interval< T, R, M >::euler
inlinestatic

returns euler constant

◆ getBaseInterval() [1/2]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
BaseInterval & capd::filib::Interval< T, R, M >::getBaseInterval ( )
inline

returns reference to base (filib) interval

◆ getBaseInterval() [2/2]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
const BaseInterval & capd::filib::Interval< T, R, M >::getBaseInterval ( ) const
inline

returns const reference to base (filib) interval

◆ inf()

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
const BoundType & capd::filib::Interval< T, R, M >::inf ( ) const
inline

< returns the left end of the interval

◆ left()

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval capd::filib::Interval< T, R, M >::left ( ) const
inline

< returns interval containing left end

◆ leftBound()

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
const BoundType & capd::filib::Interval< T, R, M >::leftBound ( ) const
inline

< returns the left end of the interval

◆ mid()

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval capd::filib::Interval< T, R, M >::mid ( ) const
inline

< returns middle point of interval

◆ operator*=()

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval & capd::filib::Interval< T, R, M >::operator*= ( const Interval< T, R, M > &  A_iv)
inline

◆ operator+=()

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval & capd::filib::Interval< T, R, M >::operator+= ( const Interval< T, R, M > &  A_iv)
inline

◆ operator-=()

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval & capd::filib::Interval< T, R, M >::operator-= ( const Interval< T, R, M > &  A_iv)
inline

◆ operator/=()

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval & capd::filib::Interval< T, R, M >::operator/= ( const Interval< T, R, M > &  A_iv)
inline

◆ operator=() [1/2]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval & capd::filib::Interval< T, R, M >::operator= ( const BoundType A_x)
inline

◆ operator=() [2/2]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval & capd::filib::Interval< T, R, M >::operator= ( const Interval< T, R, M > &  A_iv)
inline

◆ pi()

template<typename T , RoundingStrategy R, IntervalMode M>
Interval< T, R, M > capd::filib::Interval< T, R, M >::pi
inlinestatic

returns pi constant

◆ reset()

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
static void capd::filib::Interval< T, R, M >::reset ( )
inlinestatic

resets default rounding mode (to the nearest)

◆ right()

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval capd::filib::Interval< T, R, M >::right ( ) const
inline

< returns interval containing right end

◆ rightBound()

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
const BoundType & capd::filib::Interval< T, R, M >::rightBound ( ) const
inline

< returns the right end of the interval

◆ setLeftBound()

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
void capd::filib::Interval< T, R, M >::setLeftBound ( const BoundType A_left)
inline

◆ setRightBound()

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
void capd::filib::Interval< T, R, M >::setRightBound ( const BoundType A_right)
inline

◆ setup()

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
static void capd::filib::Interval< T, R, M >::setup ( )
inlinestatic

sets up floting point unit.

It has to be called before first use of intervals

◆ split() [1/3]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
void capd::filib::Interval< T, R, M >::split ( BoundType A_rMid,
Interval< T, R, M > &  A_rRemainder 
) const
inline

◆ split() [2/3]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
void capd::filib::Interval< T, R, M >::split ( Interval< T, R, M > &  A_rMid,
Interval< T, R, M > &  A_rRemainder 
) const
inline

Splits interval into the form mid + remainder, where mid - is middle point.

◆ split() [3/3]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
void capd::filib::Interval< T, R, M >::split ( Interval< T, R, M > &  r)
inline

◆ subset()

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
bool capd::filib::Interval< T, R, M >::subset ( const Interval< T, R, M > &  A_iv) const
inline

< checks if interval is subset of iv

◆ subsetInterior()

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
bool capd::filib::Interval< T, R, M >::subsetInterior ( const Interval< T, R, M > &  A_iv) const
inline

< checks if interval is subset of interior of iv

◆ sup()

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
const BoundType & capd::filib::Interval< T, R, M >::sup ( ) const
inline

< returns the right end of the interval

Friends And Related Function Documentation

◆ acos

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval acos ( const Interval< T, R, M > &  x)
friend

◆ asin

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval asin ( const Interval< T, R, M > &  x)
friend

◆ atan

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval atan ( const Interval< T, R, M > &  x)
friend

◆ ball [1/2]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval ball ( const Interval< T, R, M > &  iv,
const BoundType r 
)
friend

Ball with center iv and radius r.

◆ ball [2/2]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval ball ( const Interval< T, R, M > &  iv,
const Interval< T, R, M > &  r 
)
friend

Ball with center iv and radius r.

◆ binRead

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
std::istream & binRead ( std::istream &  in,
Interval< T, R, M > &  iv 
)
friend

◆ binWrite

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
std::ostream & binWrite ( std::ostream &  out,
const Interval< T, R, M > &  iv 
)
friend

◆ bitRead

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
std::istream & bitRead ( std::istream &  in,
Interval< T, R, M > &  iv 
)
friend

◆ bitWrite

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
std::ostream & bitWrite ( std::ostream &  out,
const Interval< T, R, M > &  iv 
)
friend

◆ copysign

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval copysign ( const Interval< T, R, M > &  x,
const Interval< T, R, M > &  y 
)
friend

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

◆ cos

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval cos ( const Interval< T, R, M > &  x)
friend

◆ cosh

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval cosh ( const Interval< T, R, M > &  x)
friend

◆ cot

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval cot ( const Interval< T, R, M > &  x)
friend

◆ coth

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval coth ( const Interval< T, R, M > &  x)
friend

◆ diam

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval diam ( const Interval< T, R, M > &  ix)
friend

◆ exp

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval exp ( const Interval< T, R, M > &  x)
friend

◆ hexRead

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
std::istream & hexRead ( std::istream &  in,
Interval< T, R, M > &  iv 
)
friend

◆ hexWrite

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
std::ostream & hexWrite ( std::ostream &  out,
const Interval< T, R, M > &  iv 
)
friend

◆ inf

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
const BoundType & inf ( const Interval< T, R, M > &  x)
friend
Parameters
xreturns the left end of the interval

◆ intersection

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
bool intersection ( const Interval< T, R, M > &  A_iv1,
const Interval< T, R, M > &  A_iv2,
Interval< T, R, M > &  A_rIntersection 
)
friend

Intersection of two intervals.

◆ intervalHull

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval intervalHull ( const Interval< T, R, M > &  ix,
const Interval< T, R, M > &  iy 
)
friend

returns an interval containing ix and iy

◆ isinf

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
bool isinf ( const Interval< T, R, M > &  r)
friend

returns true if any of endpoints is infinite

◆ isnan

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
bool isnan ( const Interval< T, R, M > &  r)
friend

returns true if any of endpoints is a NaN

◆ isSingular

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
bool isSingular ( const Interval< T, R, M > &  A_x)
friend

◆ left

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval left ( const Interval< T, R, M > &  x)
friend
Parameters
xreturns interval containing left end

◆ leftBound

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
const BoundType & leftBound ( const Interval< T, R, M > &  x)
friend
Parameters
xreturns the left end of the interval

◆ log

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval log ( const Interval< T, R, M > &  x)
friend

◆ mid

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval mid ( const Interval< T, R, M > &  A_iv)
friend

◆ nonnegativePart

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval nonnegativePart ( const Interval< T, R, M > &  iv)
friend

returns nonnegative part of interval

Remarks
if nonnegative part is empty throws exception

◆ operator!= [1/3]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
bool operator!= ( const BoundType A_Val1,
const Interval< T, R, M > &  A_iVal2 
)
friend

operator != (scalar, interval)

◆ operator!= [2/3]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
bool operator!= ( const Interval< T, R, M > &  A_iv1,
const Interval< T, R, M > &  A_iv2 
)
friend

◆ operator!= [3/3]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
bool operator!= ( const Interval< T, R, M > &  A_iVal1,
const BoundType A_Val2 
)
friend

operator != (interval, scalar)

◆ operator* [1/3]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval operator* ( const BoundType A_x,
const Interval< T, R, M > &  A_iVal 
)
friend

operator * (scalar, interval)

◆ operator* [2/3]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval operator* ( const Interval< T, R, M > &  A_iv1,
const Interval< T, R, M > &  A_iv2 
)
friend

◆ operator* [3/3]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval operator* ( const Interval< T, R, M > &  A_iVal,
const BoundType A_x 
)
friend

operator * (interval, scalar)

◆ operator+ [1/3]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval operator+ ( const BoundType A_x,
const Interval< T, R, M > &  A_iVal 
)
friend

operator + (scalar, interval)

◆ operator+ [2/3]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval operator+ ( const Interval< T, R, M > &  A_iv1,
const Interval< T, R, M > &  A_iv2 
)
friend

◆ operator+ [3/3]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval operator+ ( const Interval< T, R, M > &  A_iVal,
const BoundType A_x 
)
friend

operator + (interval, scalar)

◆ operator- [1/4]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval operator- ( const BoundType A_x,
const Interval< T, R, M > &  A_iVal 
)
friend

operator - (scalar, interval)

◆ operator- [2/4]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval operator- ( const Interval< T, R, M > &  A_iv)
friend

◆ operator- [3/4]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval operator- ( const Interval< T, R, M > &  A_iv1,
const Interval< T, R, M > &  A_iv2 
)
friend

◆ operator- [4/4]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval operator- ( const Interval< T, R, M > &  A_iVal,
const BoundType A_x 
)
friend

operator - (interval, scalar)

◆ operator/ [1/3]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval operator/ ( const BoundType A_x,
const Interval< T, R, M > &  A_iVal 
)
friend

operator / (interval, scalar)

◆ operator/ [2/3]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval operator/ ( const Interval< T, R, M > &  A_iv1,
const Interval< T, R, M > &  A_iv2 
)
friend

◆ operator/ [3/3]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval operator/ ( const Interval< T, R, M > &  A_iVal,
const BoundType A_x 
)
friend

operator / (scalar, interval)

◆ operator< [1/3]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
bool operator< ( const BoundType A_Val1,
const Interval< T, R, M > &  A_iVal2 
)
friend

operator < (scalar, interval)

◆ operator< [2/3]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
bool operator< ( const Interval< T, R, M > &  A_iv1,
const Interval< T, R, M > &  A_iv2 
)
friend

◆ operator< [3/3]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
bool operator< ( const Interval< T, R, M > &  A_iVal1,
const BoundType A_Val2 
)
friend

operator < (interval, scalar)

◆ operator<<

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
std::ostream & operator<< ( std::ostream &  s,
const Interval< T, R, M > &  A_iv 
)
friend

◆ operator<= [1/3]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
bool operator<= ( const BoundType A_Val1,
const Interval< T, R, M > &  A_iVal2 
)
friend

operator <= (scalar, interval)

◆ operator<= [2/3]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
bool operator<= ( const Interval< T, R, M > &  A_iv1,
const Interval< T, R, M > &  A_iv2 
)
friend

◆ operator<= [3/3]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
bool operator<= ( const Interval< T, R, M > &  A_iVal1,
const BoundType A_Val2 
)
friend

operator <= (interval, scalar)

◆ operator== [1/3]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
bool operator== ( const BoundType A_Val1,
const Interval< T, R, M > &  A_iVal2 
)
friend

operator == (scalar, interval)

◆ operator== [2/3]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
bool operator== ( const Interval< T, R, M > &  A_iv1,
const Interval< T, R, M > &  A_iv2 
)
friend

◆ operator== [3/3]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
bool operator== ( const Interval< T, R, M > &  A_iVal1,
const BoundType A_Val2 
)
friend

operator == (interval, scalar)

◆ operator> [1/3]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
bool operator> ( const BoundType A_Val1,
const Interval< T, R, M > &  A_iVal2 
)
friend

operator > (scalar, interval)

◆ operator> [2/3]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
bool operator> ( const Interval< T, R, M > &  A_iv1,
const Interval< T, R, M > &  A_iv2 
)
friend

◆ operator> [3/3]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
bool operator> ( const Interval< T, R, M > &  A_iVal1,
const BoundType A_Val2 
)
friend

operator > (interval, scalar)

◆ operator>= [1/3]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
bool operator>= ( const BoundType A_Val1,
const Interval< T, R, M > &  A_iVal2 
)
friend

operator >= (scalar, interval)

◆ operator>= [2/3]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
bool operator>= ( const Interval< T, R, M > &  A_iv1,
const Interval< T, R, M > &  A_iv2 
)
friend

◆ operator>= [3/3]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
bool operator>= ( const Interval< T, R, M > &  A_iVal1,
const BoundType A_Val2 
)
friend

operator >= (interval, scalar)

◆ operator>>

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
std::istream & operator>> ( std::istream &  s,
Interval< T, R, M > &  A_iv 
)
friend

◆ operator^ [1/5]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval operator^ ( const Interval< T, R, M > &  a,
const Interval< T, R, M > &  b 
)
friend

◆ operator^ [2/5]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
template<class E >
Interval operator^ ( const Interval< T, R, M > &  x,
 
)
friend

DW: this template is defined to prevent implicit conversion of exponent type In the previous implementation interval^double was converted to interval^int.

◆ operator^ [3/5]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval operator^ ( const Interval< T, R, M > &  x,
int  n 
)
friend

◆ operator^ [4/5]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval operator^ ( const Interval< T, R, M > &  x,
Interval< T, R, M >::BoundType  b 
)
friend

◆ operator^ [5/5]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval operator^ ( const Interval< T, R, M > &  x,
unsigned int  n 
)
friend

◆ power

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
template<class E >
Interval power ( const Interval< T, R, M > &  x,
n 
)
friend

◆ right

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval right ( const Interval< T, R, M > &  x)
friend
Parameters
xreturns interval containing right end

◆ rightBound

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
const BoundType & rightBound ( const Interval< T, R, M > &  x)
friend
Parameters
xreturns the right end of the interval

◆ sin

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval sin ( const Interval< T, R, M > &  x)
friend

◆ sinh

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval sinh ( const Interval< T, R, M > &  x)
friend

◆ solveAffineInclusion [1/2]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval solveAffineInclusion ( const Interval< T, R, M > &  a,
const Interval< T, R, M > &  p,
const Interval< T, R, M > &  c 
)
friend

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

◆ solveAffineInclusion [2/2]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval solveAffineInclusion ( const Interval< T, R, M > &  a,
const Interval< T, R, M > &  p,
const Interval< T, R, M > &  c,
int dir 
)
friend

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

◆ split [1/2]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
void split ( Interval< T, R, M > &  A_iv,
Interval< T, R, M > &  A_rMid,
BoundType A_diam 
)
friend

TODO : correct to not switch rounding

◆ split [2/2]

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
void split ( Interval< T, R, M > &  A_rIv,
BoundType A_diam 
)
friend

◆ sqr

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval sqr ( const Interval< T, R, M > &  x)
friend

◆ sqrt

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval sqrt ( const Interval< T, R, M > &  x)
friend

◆ subset

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
bool subset ( const Interval< T, R, M > &  A_iv1,
const Interval< T, R, M > &  A_iv2 
)
friend

◆ subsetInterior

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
bool subsetInterior ( const Interval< T, R, M > &  A_iv1,
const Interval< T, R, M > &  A_iv2 
)
friend

◆ sup

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
const BoundType & sup ( const Interval< T, R, M > &  x)
friend
Parameters
xreturns the right end of the interval

◆ tan

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval tan ( const Interval< T, R, M > &  x)
friend

◆ tanh

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
Interval tanh ( const Interval< T, R, M > &  x)
friend

Member Data Documentation

◆ m_interval

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
BaseInterval capd::filib::Interval< T, R, M >::m_interval
protected

◆ mode

template<typename T , RoundingStrategy R = ::filib::native_directed, IntervalMode M = ::filib::i_mode_normal>
const IntervalMode capd::filib::Interval< T, R, M >::mode = M
static