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

is a forward iterator that iterates a boost::real::real_explicit 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_explicit.hpp>

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

Public Member Functions

 const_precision_iterator ()=default
 Default constructor: Constructs an empty boost::real::real_explicit::const_precision_iterator that points to nullptr.
 
 const_precision_iterator (const const_precision_iterator &other)=default
 Copy constructor: Construct a new boost::real::real_explicit::const_precision_iterator which is a copy of the other iterator. More...
 
 const_precision_iterator (real_explicit const *real_number)
 Pointer constructor: Construct a new boost::real::real_explicit::const_precision_iterator pointing to the boost::real::real_explicit 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.
 
void iterate_n_times (int n)
 It recalculates the approximation interval boundaries increasing the used precision n times, 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_explicit::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_explicit::const_precision_iterators. More...
 

Public Attributes

boost::real::interval approximation_interval
 

Detailed Description

is a forward iterator that iterates a boost::real::real_explicit 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_explicit::const_precision_iterator::const_precision_iterator ( const const_precision_iterator other)
default

Copy constructor: Construct a new boost::real::real_explicit::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_explicit::const_precision_iterator::const_precision_iterator ( real_explicit const *  real_number)
inlineexplicit

Pointer constructor: Construct a new boost::real::real_explicit::const_precision_iterator pointing to the boost::real::real_explicit 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.

Member Function Documentation

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

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

Parameters
other- A boost::real::real_explicit::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_explicit::const_precision_iterator::operator== ( const const_precision_iterator other) const
inline

It compare by value equality; two boost::real::real_explicit::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_explicit::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: