Developer documentation

mmx::Interval< T, r > Struct Template Reference

Generic class for intervals. More...

#include <Interval.hpp>

Inheritance diagram for mmx::Interval< T, r >:
mmx::numerics::interval_base< T,((unsigned) r)%4 >

Classes

struct  extended
 

Public Types

typedef T value_type
 
typedef T coeff_t
 
typedef T boundary_type
 
typedef numerics::interval_base< T,((unsigned) r)%4 > base_t
 
typedef base_t::rnd rnd_t
 
typedef Interval< T, r > self_t
 

Public Member Functions

template<class S >
 Interval (const texp::template_expression< S > &e)
 
 Interval ()
 default constructor sets values to zero More...
 
 Interval (int n)
 build an interval from an int More...
 
 Interval (unsigned n)
 build an interval from an unsigned int More...
 
 Interval (const T &x)
 build an interval from a scalar value More...
 
 Interval (const T &a, const T &b)
 build an interval from a pair (the pair will be reordered) More...
 
 Interval (const char *s)
 build an interval from a string More...
 
Intervaloperator= (const Interval &i)
 
template<class X >
Intervaloperator= (const texp::template_expression< X > &x)
 
void define (const T &m, const T &M)
 
void assign (const T &m, const T &M)
 
void assign (const Interval &b)
 
template<class X >
bool operator== (const X &k) const
 true if the lower and upper bounds equals to k More...
 
template<class X , int r_>
bool operator== (const Interval< X, r_ > &b) const
 
template<class X >
bool operator> (const X &x) const
 comparison with scalar value (>) More...
 
template<class X >
bool operator>= (const X &x) const
 comparison with scalar value (>=) More...
 
template<class X >
bool operator< (const X &x) const
 comparison with scalar value (<) More...
 
template<class X >
bool operator<= (const X &x) const
 comparison with scalar value (<=) More...
 
template<class X >
bool operator!= (const X &x) const
 comparison with scalar value (!=) More...
 
template<class X , int _r>
bool operator< (const Interval< X, _r > &i) const
 
template<class X , int _r>
bool operator> (const Interval< X, _r > &i) const
 
const T & lower () const
 
const T & upper () const
 
T & lower ()
 
T & upper ()
 
const T & inf () const
 
const T & sup () const
 
T & inf ()
 
T & sup ()
 
Intervaloperator= (const T &x)
 
template<class X , int R>
Intervaloperator= (const Interval< X, R > &x)
 
Intervaloperator+= (const Interval &x)
 
Intervaloperator-= (const Interval &x)
 
Intervaloperator*= (const Interval &x)
 
Intervaloperator/= (const Interval &x)
 
width () const
 return the width of the interval More...
 
size () const
 same as width More...
 
 operator T () const
 
center () const
 return the center of the interval More...
 
template<class X >
Interval< C, R > & operator= (const texp::template_expression< X > &x)
 
template<class X >
 Interval (const texp::template_expression< X > &x)
 
template<class X , int R>
Interval< C, mode > & operator= (const Interval< X, R > &x)
 

Public Attributes

m
 
M
 

Additional Inherited Members

- Static Public Member Functions inherited from mmx::numerics::interval_base< T,((unsigned) r)%4 >
static T dwmul (const T &a, const T &b)
 
static T upmul (const T &a, const T &b)
 
static T dwdiv (const T &a, const T &b)
 
static T updiv (const T &a, const T &b)
 
static T dwadd (const T &a, const T &b)
 
static T upadd (const T &a, const T &b)
 
static T dwsub (const T &a, const T &b)
 
static T upsub (const T &a, const T &b)
 

Detailed Description

template<class T, int r = 3>
struct mmx::Interval< T, r >

Generic class for intervals.

Member Typedef Documentation

template<class T, int r = 3>
typedef numerics::interval_base<T,((unsigned)r)%4> mmx::Interval< T, r >::base_t
template<class T, int r = 3>
typedef T mmx::Interval< T, r >::boundary_type
template<class T, int r = 3>
typedef T mmx::Interval< T, r >::coeff_t
template<class T, int r = 3>
typedef base_t::rnd mmx::Interval< T, r >::rnd_t
template<class T, int r = 3>
typedef Interval<T,r> mmx::Interval< T, r >::self_t
template<class T, int r = 3>
typedef T mmx::Interval< T, r >::value_type

Constructor & Destructor Documentation

template<class T, int r = 3>
template<class S >
mmx::Interval< T, r >::Interval ( const texp::template_expression< S > &  e)
template<class C , int r>
mmx::Interval< C, r >::Interval ( )
inline

default constructor sets values to zero

template<class C , int r>
mmx::Interval< C, r >::Interval ( int  n)
inline

build an interval from an int

template<class C , int r>
mmx::Interval< C, r >::Interval ( unsigned  n)
inline

build an interval from an unsigned int

template<class C, int r>
mmx::Interval< C, r >::Interval ( const C x)
inline

build an interval from a scalar value

template<class C, int r>
mmx::Interval< C, r >::Interval ( const C a,
const C b 
)
inline

build an interval from a pair (the pair will be reordered)

template<class C , int r>
mmx::Interval< C, r >::Interval ( const char *  s)
inline

build an interval from a string

template<class T, int r = 3>
template<class X >
mmx::Interval< T, r >::Interval ( const texp::template_expression< X > &  x)
inline

Member Function Documentation

template<class T, int r = 3>
void mmx::Interval< T, r >::assign ( const T &  m,
const T &  M 
)
inline
template<class T, int r = 3>
void mmx::Interval< T, r >::assign ( const Interval< T, r > &  b)
inline
template<class T, int r = 3>
T mmx::Interval< T, r >::center ( ) const
inline

return the center of the interval

template<class T, int r = 3>
void mmx::Interval< T, r >::define ( const T &  m,
const T &  M 
)
inline
template<class T, int r = 3>
const T& mmx::Interval< T, r >::inf ( ) const
inline
template<class T, int r = 3>
T& mmx::Interval< T, r >::inf ( )
inline
template<class T, int r = 3>
const T& mmx::Interval< T, r >::lower ( ) const
inline
template<class T, int r = 3>
T& mmx::Interval< T, r >::lower ( )
inline
template<class T, int r = 3>
mmx::Interval< T, r >::operator T ( ) const
inline
template<class T, int r = 3>
template<class X >
bool mmx::Interval< T, r >::operator!= ( const X x) const
inline

comparison with scalar value (!=)

template<class T, int r = 3>
Interval& mmx::Interval< T, r >::operator*= ( const Interval< T, r > &  x)
inline
template<class T, int r = 3>
Interval& mmx::Interval< T, r >::operator+= ( const Interval< T, r > &  x)
inline
template<class T, int r = 3>
Interval& mmx::Interval< T, r >::operator-= ( const Interval< T, r > &  x)
inline
template<class T, int r = 3>
Interval& mmx::Interval< T, r >::operator/= ( const Interval< T, r > &  x)
inline
template<class T, int r = 3>
template<class X >
bool mmx::Interval< T, r >::operator< ( const X x) const
inline

comparison with scalar value (<)

template<class T, int r = 3>
template<class X , int _r>
bool mmx::Interval< T, r >::operator< ( const Interval< X, _r > &  i) const
inline
template<class T, int r = 3>
template<class X >
bool mmx::Interval< T, r >::operator<= ( const X x) const
inline

comparison with scalar value (<=)

template<class T, int r = 3>
Interval& mmx::Interval< T, r >::operator= ( const Interval< T, r > &  i)
inline
template<class T, int r = 3>
template<class X >
Interval& mmx::Interval< T, r >::operator= ( const texp::template_expression< X > &  x)
template<class T, int r = 3>
Interval& mmx::Interval< T, r >::operator= ( const T &  x)
inline
template<class T, int r = 3>
template<class X , int R>
Interval& mmx::Interval< T, r >::operator= ( const Interval< X, R > &  x)
template<class T, int r = 3>
template<class X >
Interval<C,R>& mmx::Interval< T, r >::operator= ( const texp::template_expression< X > &  x)
inline
template<class T, int r = 3>
template<class X , int R>
Interval<C,mode>& mmx::Interval< T, r >::operator= ( const Interval< X, R > &  x)
template<class T, int r = 3>
template<class X >
bool mmx::Interval< T, r >::operator== ( const X k) const
inline

true if the lower and upper bounds equals to k

template<class T, int r = 3>
template<class X , int r_>
bool mmx::Interval< T, r >::operator== ( const Interval< X, r_ > &  b) const
inline
template<class T, int r = 3>
template<class X >
bool mmx::Interval< T, r >::operator> ( const X x) const
inline

comparison with scalar value (>)

template<class T, int r = 3>
template<class X , int _r>
bool mmx::Interval< T, r >::operator> ( const Interval< X, _r > &  i) const
inline
template<class T, int r = 3>
template<class X >
bool mmx::Interval< T, r >::operator>= ( const X x) const
inline

comparison with scalar value (>=)

template<class T, int r = 3>
T mmx::Interval< T, r >::size ( void  ) const
inline

same as width

template<class T, int r = 3>
const T& mmx::Interval< T, r >::sup ( ) const
inline
template<class T, int r = 3>
T& mmx::Interval< T, r >::sup ( )
inline
template<class T, int r = 3>
const T& mmx::Interval< T, r >::upper ( ) const
inline
template<class T, int r = 3>
T& mmx::Interval< T, r >::upper ( )
inline
template<class T, int r = 3>
T mmx::Interval< T, r >::width ( ) const
inline

return the width of the interval

Member Data Documentation

template<class T, int r = 3>
T mmx::Interval< T, r >::m
template<class T, int r = 3>
T mmx::Interval< T, r >::M

The documentation for this struct was generated from the following files:
Home