|
realroot_doc 0.1.1
|
Generic class for intervals. More...
#include <Interval.hpp>
Generic class for intervals.
Definition at line 43 of file Interval.hpp.
| typedef numerics::interval_base<T,((unsigned)r)%4> base_t |
Definition at line 47 of file Interval.hpp.
| typedef T boundary_type |
Definition at line 46 of file Interval.hpp.
| typedef T coeff_t |
Definition at line 45 of file Interval.hpp.
| typedef base_t::rnd rnd_t |
Definition at line 48 of file Interval.hpp.
Definition at line 49 of file Interval.hpp.
| typedef T value_type |
Definition at line 44 of file Interval.hpp.
| Interval | ( | const texp::template_expression< S > & | e | ) |
| Interval | ( | ) | [inline] |
default constructor sets values to zero
Definition at line 72 of file Interval_fcts.hpp.
| Interval | ( | int | n | ) | [inline] |
| 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] |
build an interval from a scalar value
Definition at line 78 of file Interval_fcts.hpp.
| 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.
| Interval | ( | const char * | s | ) | [inline] |
build an interval from a string
Definition at line 85 of file Interval_fcts.hpp.
References mmx::let::assign().
{ let::assign(*this,s); };
| Interval | ( | const texp::template_expression< X > & | x | ) | [inline] |
Definition at line 176 of file Interval.hpp.
References mmx::assign().
{
rnd_t rnd; // rounding mode verification
std::cout<<"assign "<<x<<std::endl;
let::assign(*this,x); // evaluation of template expression
}
| void assign | ( | const T & | m, |
| const T & | M | ||
| ) | [inline] |
Definition at line 77 of file Interval.hpp.
| void assign | ( | const Interval< T, r > & | b | ) | [inline] |
Definition at line 78 of file Interval.hpp.
{ *this = b; };
| T center | ( | ) | const [inline] |
return the center of the interval
Definition at line 129 of file Interval.hpp.
| void define | ( | const T & | m, |
| const T & | M | ||
| ) | [inline] |
Definition at line 76 of file Interval.hpp.
Referenced by 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] |
| const T& inf | ( | ) | const [inline] |
Definition at line 101 of file Interval.hpp.
{ return lower(); };
| T& inf | ( | ) | [inline] |
Definition at line 103 of file Interval.hpp.
{ return m; };
| T& lower | ( | ) | [inline] |
Definition at line 99 of file Interval.hpp.
{ return m; };
| const T& lower | ( | ) | const [inline] |
Definition at line 97 of file Interval.hpp.
Referenced by mmx::abs(), mmx::let::assign(), mmx::bissect(), mmx::contain_zero(), mmx::hull(), mmx::in(), mmx::lower(), mmx::print(), and mmx::singleton().
{ return m; };
| operator T | ( | ) | const [inline] |
Definition at line 127 of file Interval.hpp.
References mmx::lower(), and mmx::upper().
| bool operator!= | ( | const X & | x | ) | const [inline] |
comparison with scalar value (!=)
Definition at line 93 of file Interval.hpp.
{ return !(*this == x); };
Definition at line 120 of file Interval.hpp.
{ mul(*this,x); return *this; };
Definition at line 118 of file Interval.hpp.
{ add(*this,x); return *this; };
Definition at line 119 of file Interval.hpp.
{ sub(*this,x); return *this; };
Definition at line 121 of file Interval.hpp.
{ div(*this,x); return *this; };
| bool operator< | ( | const X & | x | ) | const [inline] |
| bool operator< | ( | const Interval< X, _r > & | i | ) | const [inline] |
Definition at line 94 of file Interval.hpp.
{ return M < i.m; };
| bool operator<= | ( | const X & | x | ) | const [inline] |
| Interval< C, R > & operator= | ( | const texp::template_expression< X > & | x | ) | [inline] |
Definition at line 168 of file Interval.hpp.
References mmx::assign().
{
rnd_t rnd; // rounding mode verification
let::assign(*this,x); // evaluation of template expression
return *this;
}
| Interval& operator= | ( | const T & | x | ) | [inline] |
Definition at line 106 of file Interval.hpp.
Definition at line 184 of file Interval.hpp.
References mmx::assign().
{
let::assign(*this,x);
return *this;
};
Definition at line 66 of file Interval.hpp.
| bool operator== | ( | const Interval< X, r_ > & | b | ) | const [inline] |
Definition at line 82 of file Interval.hpp.
| bool operator== | ( | const X & | k | ) | const [inline] |
true if the lower and upper bounds equals to k
Definition at line 81 of file Interval.hpp.
| bool operator> | ( | const X & | x | ) | const [inline] |
| bool operator> | ( | const Interval< X, _r > & | i | ) | const [inline] |
Definition at line 95 of file Interval.hpp.
{ return m > i.M; };
| bool operator>= | ( | const X & | x | ) | const [inline] |
| T size | ( | void | ) | const [inline] |
same as width
Definition at line 126 of file Interval.hpp.
Referenced by mmx::size(), and cell_uv_bernstein< C >::size().
{ return width(); };
| const T& sup | ( | ) | const [inline] |
Definition at line 102 of file Interval.hpp.
{ return upper(); };
| T& sup | ( | ) | [inline] |
Definition at line 104 of file Interval.hpp.
{ return M; };
| 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] |
| const T& upper | ( | ) | const [inline] |
Definition at line 98 of file Interval.hpp.
Referenced by mmx::abs(), mmx::let::assign(), mmx::bissect(), mmx::contain_zero(), mmx::hull(), mmx::in(), mmx::print(), mmx::singleton(), and mmx::upper().
{ return M; };
| T& upper | ( | ) | [inline] |
Definition at line 100 of file Interval.hpp.
{ 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 124 of file Interval.hpp.
Referenced by mmx::width().
| T m |
Definition at line 51 of file Interval.hpp.
Referenced by mmx::add(), mmx::let::assign(), 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(), mmx::mul(), mmx::neg(), Interval< double >::operator=(), Interval< double >::operator==(), mmx::split(), and mmx::sub().
| T M |
Definition at line 51 of file Interval.hpp.
Referenced by mmx::add(), mmx::let::assign(), 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(), mmx::mul(), mmx::neg(), Interval< double >::operator=(), Interval< double >::operator==(), Interval< double >::operator>(), mmx::split(), and mmx::sub().