![]() |
Boost.Real
1.0.0
Boost.Real numerical data type for real numbers representation using range arithmetic.
|
is a forward iterator that iterates a boost::real::real number approximation intervals. The iterator calculates the initial interval with the initial precision and then it increase the precision in each iteration (++) and recalculate the interval. More...
#include <real.hpp>
Public Member Functions | |
const_precision_iterator ()=default | |
Default constructor: Constructs an empty boost::real::real::const_precision_iterator that points to nullptr. | |
const_precision_iterator (const const_precision_iterator &other)=default | |
Copy constructor: Construct a new boost::real::real::const_precision_iterator which is a copy of the other iterator. More... | |
const_precision_iterator (real const *real_number) | |
Pointer constructor: Construct a new boost::real::real::const_precision_iterator pointing to the boost::real::real number to iterate the number approximation intervals. More... | |
const_precision_iterator (real const *real_number, bool cend) | |
Pointer constructor for cend: Construct a new boost::real::real::const_precision_iterator pointing to the boost::real::real number real_number to iterate the number approximation intervals. More... | |
void | operator++ () |
It recalculates the approximation interval boundaries increasing the used precision, the new pointed approximation interval is smaller than the current one. | |
bool | operator== (const const_precision_iterator &other) const |
It compare by value equality; two boost::real::real::const_precision_iterators are equals if they are pointing to the same real number and are in the same precision iteration. More... | |
bool | operator!= (const const_precision_iterator &other) const |
It compare by value not equal; two boost::real::real::const_precision_iterators. More... | |
Public Attributes | |
boost::real::interval | approximation_interval |
is a forward iterator that iterates a boost::real::real number approximation intervals. The iterator calculates the initial interval with the initial precision and then it increase the precision in each iteration (++) and recalculate the interval.
|
default |
Copy constructor: Construct a new boost::real::real::const_precision_iterator which is a copy of the other iterator.
other | - the boost::real::real::const_precision_iterator to copy. |
|
inlineexplicit |
Pointer constructor: Construct a new boost::real::real::const_precision_iterator pointing to the boost::real::real number to iterate the number approximation intervals.
The iterator will start pointing the lowest precision interval.
real_number | - the boost::real::real number to iterate. |
|
inlineexplicit |
Pointer constructor for cend: Construct a new boost::real::real::const_precision_iterator pointing to the boost::real::real number real_number to iterate the number approximation intervals.
If the cend parameter is set to true, the iterator will point to the highest precision interval allowed by the maximum precision. If is set to false, this constructor is equivalent to the Pointer constructor.
real_number | - the boost::real::real number to iterate. |
cend | - a bool indicating if the iterator must point the lowest of highest precision interval. |
|
inline |
It compare by value not equal; two boost::real::real::const_precision_iterators.
other | - A boost::real::real::const_precision_iterator that is the right side operand |
|
inline |
It compare by value equality; two boost::real::real::const_precision_iterators are equals if they are pointing to the same real number and are in the same precision iteration.
other | - A boost::real::real::const_precision_iterator that is the right side operand |