Boost.Real  1.0.0
Boost.Real numerical data type for real numbers representation using range arithmetic.
boost::real::real::const_precision_iterator Class Reference

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>

Collaboration diagram for boost::real::real::const_precision_iterator:

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
 

Detailed Description

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.

Author
Laouen Mayal Louan Belloli

Constructor & Destructor Documentation

boost::real::real::const_precision_iterator::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.

Parameters
other- the boost::real::real::const_precision_iterator to copy.
boost::real::real::const_precision_iterator::const_precision_iterator ( real const *  real_number)
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.

Parameters
real_number- the boost::real::real number to iterate.
boost::real::real::const_precision_iterator::const_precision_iterator ( real const *  real_number,
bool  cend 
)
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.

Parameters
real_number- the boost::real::real number to iterate.
cend- a bool indicating if the iterator must point the lowest of highest precision interval.

Member Function Documentation

bool boost::real::real::const_precision_iterator::operator!= ( const const_precision_iterator other) const
inline

It compare by value not equal; two boost::real::real::const_precision_iterators.

Parameters
other- A boost::real::real::const_precision_iterator that is the right side operand
Returns
a bool that is true if and only if both iterators are not equals.
bool boost::real::real::const_precision_iterator::operator== ( const const_precision_iterator other) const
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.

Parameters
other- A boost::real::real::const_precision_iterator that is the right side operand
Returns
a bool that is true if and only if both iterators are equals.

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