continued_fraction Class Template Reference

Continued fraction as rational number. More...

#include <continued_fraction.h>

List of all members.

Public Types

typedef IntType integral_type
typedef boost::rational< IntType > rational_type

Public Member Functions

 continued_fraction (integral_type a0)
 Construct the continued fraction [a0].
void append (integral_type a)
 [a_0, ... , a_n] --> [a_0, ... , a_n, a]
rational_type as_rational ()
 Rational value.
template<typename FloatType>
FloatType as_real ()
 Real value.

Static Public Member Functions

template<typename FloatType>
static continued_fraction from_real (FloatType x, FloatType eps=std::numeric_limits< FloatType >::epsilon())
 A continued fraction approximating x with the given precision.


Detailed Description

template<typename IntType>
class scitbx::math::continued_fraction< IntType >

Continued fraction as rational number.
The documentation for this class was generated from the following file:

Generated on Tue Sep 1 17:12:36 2009 for cctbx by  doxygen 1.5.6