Generic class for intervals. More...
#include <Interval.hpp>
Generic class for intervals.
Definition at line 44 of file Interval.hpp.
typedef numerics::interval_base<T,((unsigned)r)%4> base_t |
Definition at line 48 of file Interval.hpp.
typedef T boundary_type |
Definition at line 47 of file Interval.hpp.
typedef T coeff_t |
Definition at line 46 of file Interval.hpp.
typedef base_t::rnd rnd_t |
Definition at line 49 of file Interval.hpp.
Definition at line 50 of file Interval.hpp.
typedef T value_type |
Definition at line 45 of file Interval.hpp.
Interval | ( | const texp::template_expression< S > & | e | ) | [inline] |
Interval | ( | ) | [inline] |
default constructor sets values to zero
Definition at line 72 of file Interval_fcts.hpp.
Interval | ( | int | n | ) | [inline] |
build an interval from an int
Definition at line 74 of file Interval_fcts.hpp.
Interval | ( | unsigned | n | ) | [inline] |
build an interval from an unsigned int
Definition at line 76 of file Interval_fcts.hpp.
Interval | ( | const C & | x | ) | [inline] |
Interval | ( | const C & | a, | |
const C & | b | |||
) | [inline] |
build an interval from a pair (the pair will be reordered)
Definition at line 80 of file Interval_fcts.hpp.
References Interval< T, r >::M, and Interval< T, r >::m.
Interval | ( | const char * | s | ) | [inline] |
build an interval from a string
Definition at line 85 of file Interval_fcts.hpp.
References Interval< T, r >::assign().
00085 { let::assign(*this,s); };
Interval | ( | const texp::template_expression< X > & | x | ) | [inline] |
Definition at line 177 of file Interval.hpp.
References Interval< T, r >::assign().
00177 { 00178 rnd_t rnd; // rounding mode verification 00179 std::cout<<"assign "<<x<<std::endl; 00180 let::assign(*this,x); // evaluation of template expression 00181 }
void assign | ( | const Interval< T, r > & | b | ) | [inline] |
Definition at line 79 of file Interval.hpp.
void assign | ( | const T & | m, | |
const T & | M | |||
) | [inline] |
Definition at line 78 of file Interval.hpp.
Referenced by Interval< T, r >::Interval(), and Interval< T, r >::operator=().
T center | ( | ) | const [inline] |
return the center of the interval
Definition at line 130 of file Interval.hpp.
void define | ( | const T & | m, | |
const T & | M | |||
) | [inline] |
Definition at line 77 of file Interval.hpp.
Referenced by Interval< double >::assign(), mmx::bissect(), mmx::hull(), and mmx::intersect().
static T dwadd | ( | const T & | a, | |
const T & | b | |||
) | [inline, static, inherited] |
static T dwdiv | ( | const T & | a, | |
const T & | b | |||
) | [inline, static, inherited] |
static T dwmul | ( | const T & | a, | |
const T & | b | |||
) | [inline, static, inherited] |
static T dwsub | ( | const T & | a, | |
const T & | b | |||
) | [inline, static, inherited] |
T& inf | ( | ) | [inline] |
Definition at line 104 of file Interval.hpp.
00104 { return m; };
const T& inf | ( | ) | const [inline] |
Definition at line 102 of file Interval.hpp.
00102 { return lower(); };
T& lower | ( | ) | [inline] |
Definition at line 100 of file Interval.hpp.
00100 { return m; };
const T& lower | ( | ) | const [inline] |
Definition at line 98 of file Interval.hpp.
Referenced by mmx::abs(), mmx::bissect(), mmx::contain_zero(), mmx::hull(), mmx::in(), Interval< double >::inf(), mmx::lower(), Interval< T, r >::operator T(), and mmx::singleton().
00098 { return m; };
operator T | ( | ) | const [inline] |
Definition at line 128 of file Interval.hpp.
References Interval< T, r >::lower(), and Interval< T, r >::upper().
bool operator!= | ( | const X & | x | ) | const [inline] |
comparison with scalar value (!=)
Definition at line 94 of file Interval.hpp.
Definition at line 121 of file Interval.hpp.
00121 { mul(*this,x); return *this; };
Definition at line 119 of file Interval.hpp.
00119 { add(*this,x); return *this; };
Definition at line 120 of file Interval.hpp.
00120 { sub(*this,x); return *this; };
Definition at line 122 of file Interval.hpp.
00122 { div(*this,x); return *this; };
bool operator< | ( | const Interval< X, _r > & | i | ) | const [inline] |
Definition at line 95 of file Interval.hpp.
00095 { return M < i.m; };
bool operator< | ( | const X & | x | ) | const [inline] |
comparison with scalar value (<)
Definition at line 90 of file Interval.hpp.
00090 { return M < x; };
bool operator<= | ( | const X & | x | ) | const [inline] |
comparison with scalar value (<=)
Definition at line 92 of file Interval.hpp.
00092 { return M <= x; };
Interval& operator= | ( | const T & | x | ) | [inline] |
Definition at line 107 of file Interval.hpp.
Interval< C, R > & operator= | ( | const texp::template_expression< X > & | x | ) | [inline] |
Definition at line 169 of file Interval.hpp.
References Interval< T, r >::assign().
00169 { 00170 rnd_t rnd; // rounding mode verification 00171 let::assign(*this,x); // evaluation of template expression 00172 return *this; 00173 }
Definition at line 67 of file Interval.hpp.
bool operator== | ( | const Interval< X, r_ > & | b | ) | const [inline] |
Definition at line 83 of file Interval.hpp.
bool operator== | ( | const X & | k | ) | const [inline] |
true if the lower and upper bounds equals to k
Definition at line 82 of file Interval.hpp.
bool operator> | ( | const Interval< X, _r > & | i | ) | const [inline] |
Definition at line 96 of file Interval.hpp.
00096 { return m > i.M; };
bool operator> | ( | const X & | x | ) | const [inline] |
comparison with scalar value (>)
Definition at line 86 of file Interval.hpp.
00086 { return m > x; };
bool operator>= | ( | const X & | x | ) | const [inline] |
comparison with scalar value (>=)
Definition at line 88 of file Interval.hpp.
00088 { return m >= x; };
T size | ( | void | ) | const [inline] |
same as width
Definition at line 127 of file Interval.hpp.
Referenced by mmx::size(), and cell_uv_bernstein< C >::size().
00127 { return width(); };
T& sup | ( | ) | [inline] |
Definition at line 105 of file Interval.hpp.
00105 { return M; };
const T& sup | ( | ) | const [inline] |
Definition at line 103 of file Interval.hpp.
00103 { return upper(); };
static T upadd | ( | const T & | a, | |
const T & | b | |||
) | [inline, static, inherited] |
static T updiv | ( | const T & | a, | |
const T & | b | |||
) | [inline, static, inherited] |
static T upmul | ( | const T & | a, | |
const T & | b | |||
) | [inline, static, inherited] |
T& upper | ( | ) | [inline] |
Definition at line 101 of file Interval.hpp.
00101 { return M; };
const T& upper | ( | ) | const [inline] |
Definition at line 99 of file Interval.hpp.
Referenced by mmx::abs(), mmx::bissect(), mmx::contain_zero(), mmx::hull(), mmx::in(), Interval< T, r >::operator T(), mmx::singleton(), Interval< double >::sup(), and mmx::upper().
00099 { return M; };
static T upsub | ( | const T & | a, | |
const T & | b | |||
) | [inline, static, inherited] |
T width | ( | ) | const [inline] |
return the width of the interval
Definition at line 125 of file Interval.hpp.
Referenced by Interval< double >::size(), and mmx::width().
T M |
Definition at line 52 of file Interval.hpp.
Referenced by mmx::add(), Interval< double >::center(), mmx::div(), mmx::realroot::exclude1(), box_rep< POL >::exclude1(), mmx::realroot::exclude2(), solver_cffirst< Real, POL >::first_root_floor(), mmx::realroot::include1(), box_rep< POL >::include1(), mmx::realroot::include2(), box_rep< POL >::include2(), mmx::realroot::include3(), box_rep< POL >::include3(), Interval< T, r >::Interval(), mmx::mul(), mmx::neg(), Interval< double >::operator<(), Interval< double >::operator<=(), Interval< double >::operator=(), Interval< double >::operator==(), Interval< double >::operator>(), mmx::split(), mmx::sub(), Interval< double >::sup(), Interval< double >::upper(), and Interval< double >::width().
T m |
Definition at line 52 of file Interval.hpp.
Referenced by mmx::add(), Interval< double >::center(), mmx::div(), mmx::realroot::exclude1(), box_rep< POL >::exclude1(), mmx::realroot::exclude2(), solver_cffirst< Real, POL >::first_root_floor(), mmx::realroot::include1(), box_rep< POL >::include1(), mmx::realroot::include2(), box_rep< POL >::include2(), mmx::realroot::include3(), box_rep< POL >::include3(), Interval< double >::inf(), Interval< T, r >::Interval(), Interval< double >::lower(), mmx::mul(), mmx::neg(), Interval< double >::operator=(), Interval< double >::operator==(), Interval< double >::operator>(), Interval< double >::operator>=(), mmx::split(), mmx::sub(), and Interval< double >::width().