Interval< T, r > Struct Template Reference

List of all members.

Detailed Description

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

Definition at line 32 of file Interval.h.

Public Types

typedef T value_type
typedef T coeff_t
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 arithm::template_expression< S > &e)
 Interval ()
 default constructor sets values to zero
 Interval (int n)
 build an interval from on an integer
 Interval (const T &x)
 build an interval from a scalar value
 Interval (const T &a, const T &b)
 build an interval from a pair (the pair will be reordered)
 Interval (const char *s)
 build an interval from a string
Intervaloperator= (const char *s)
Intervaloperator= (const Interval &i)
template<class X>
Intervaloperator= (const arithm::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
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 (>)
template<class X>
bool operator>= (const X &x) const
 comparison with scalar value (>=)
template<class X>
bool operator< (const X &x) const
 comparison with scalar value (<)
template<class X>
bool operator<= (const X &x) const
 comparison with scalar value (<=)
template<class X>
bool operator!= (const X &x) const
 comparison with scalar value (!=)
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)
template<class X>
Intervaloperator+= (const X &x)
template<class X>
Intervaloperator-= (const X &x)
template<class X>
Intervaloperator *= (const X &x)
template<class X>
Intervaloperator/= (const X &x)
width () const
 return the width of the interval
size () const
 same as width
 operator T () const

Public Attributes

m
M

Classes

struct  extended


Constructor & Destructor Documentation

template<class T, int r = 3>
Interval< T, r >::Interval (  ) 

default constructor sets values to zero

template<class T, int r = 3>
Interval< T, r >::Interval ( int  n  ) 

build an interval from on an integer

template<class T, int r = 3>
Interval< T, r >::Interval ( const T &  x  ) 

build an interval from a scalar value

template<class T, int r = 3>
Interval< T, r >::Interval ( const T &  a,
const T &  b 
)

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

template<class T, int r = 3>
Interval< T, r >::Interval ( const char *  s  ) 

build an interval from a string


Member Function Documentation

template<class T, int r = 3>
template<class X>
bool Interval< T, r >::operator== ( const X &  k  )  const

true if the lower and upper bounds equals to k

Definition at line 67 of file Interval.h.

References Interval< T, r >::M, and Interval< T, r >::m.

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

comparison with scalar value (>)

Definition at line 71 of file Interval.h.

References Interval< T, r >::m.

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

comparison with scalar value (>=)

Definition at line 73 of file Interval.h.

References Interval< T, r >::m.

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

comparison with scalar value (<)

Definition at line 75 of file Interval.h.

References Interval< T, r >::M.

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

comparison with scalar value (<=)

Definition at line 77 of file Interval.h.

References Interval< T, r >::M.

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

comparison with scalar value (!=)

Definition at line 79 of file Interval.h.

template<class T, int r = 3>
T Interval< T, r >::width (  )  const

return the width of the interval

Definition at line 105 of file Interval.h.

References Interval< T, r >::m, and Interval< T, r >::M.

Referenced by Interval< T, r >::size().

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

same as width

Definition at line 107 of file Interval.h.

References Interval< T, r >::width().


The documentation for this struct was generated from the following file:

SYNAPS DOCUMENTATION
logo