Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::rational< IntType > Class Template Reference

#include <rational.hpp>

Inheritance diagram for boost::rational< IntType >:
Collaboration diagram for boost::rational< IntType >:

Public Types

typedef IntType int_type
 

Public Member Functions

 rational ()
 
 rational (param_type n)
 
 rational (param_type n, param_type d)
 
rationaloperator= (param_type n)
 
rationalassign (param_type n, param_type d)
 
IntType numerator () const
 
IntType denominator () const
 
rationaloperator+= (const rational &r)
 
rationaloperator-= (const rational &r)
 
rationaloperator*= (const rational &r)
 
rationaloperator/= (const rational &r)
 
rationaloperator+= (param_type i)
 
rationaloperator-= (param_type i)
 
rationaloperator*= (param_type i)
 
rationaloperator/= (param_type i)
 
const rationaloperator++ ()
 
const rationaloperator-- ()
 
bool operator! () const
 
 operator bool_type () const
 
bool operator< (const rational &r) const
 
bool operator== (const rational &r) const
 
bool operator< (param_type i) const
 
bool operator> (param_type i) const
 
bool operator== (param_type i) const
 

Member Typedef Documentation

template<typename IntType>
typedef IntType boost::rational< IntType >::int_type

Constructor & Destructor Documentation

template<typename IntType>
boost::rational< IntType >::rational ( )
inline
template<typename IntType>
boost::rational< IntType >::rational ( param_type  n)
inline
template<typename IntType>
boost::rational< IntType >::rational ( param_type  n,
param_type  d 
)
inline

Member Function Documentation

template<typename IntType>
IntType boost::rational< IntType >::denominator ( ) const
inline
template<typename IntType>
boost::rational< IntType >::operator bool_type ( ) const
inline
template<typename IntType>
bool boost::rational< IntType >::operator! ( ) const
inline
template<typename IntType >
rational< IntType > & boost::rational< IntType >::operator*= ( const rational< IntType > &  r)

References boost::math::gcd().

template<typename IntType >
rational< IntType > & boost::rational< IntType >::operator*= ( param_type  i)
inline
template<typename IntType >
const rational< IntType > & boost::rational< IntType >::operator++ ( void  )
inline
template<typename IntType >
rational< IntType > & boost::rational< IntType >::operator+= ( const rational< IntType > &  r)

References boost::math::gcd().

template<typename IntType >
rational< IntType > & boost::rational< IntType >::operator+= ( param_type  i)
inline
template<typename IntType >
const rational< IntType > & boost::rational< IntType >::operator-- ( void  )
inline
template<typename IntType >
rational< IntType > & boost::rational< IntType >::operator-= ( const rational< IntType > &  r)

References boost::math::gcd().

template<typename IntType >
rational< IntType > & boost::rational< IntType >::operator-= ( param_type  i)
inline
template<typename IntType >
rational< IntType > & boost::rational< IntType >::operator/= ( const rational< IntType > &  r)

References boost::math::gcd().

template<typename IntType >
rational< IntType > & boost::rational< IntType >::operator/= ( param_type  i)
inline
template<typename IntType >
bool boost::rational< IntType >::operator< ( const rational< IntType > &  r) const
template<typename IntType >
bool boost::rational< IntType >::operator< ( param_type  i) const
template<typename IntType>
rational& boost::rational< IntType >::operator= ( param_type  n)
inline
template<typename IntType >
bool boost::rational< IntType >::operator== ( const rational< IntType > &  r) const
inline
template<typename IntType >
bool boost::rational< IntType >::operator== ( param_type  i) const
inline
template<typename IntType >
bool boost::rational< IntType >::operator> ( param_type  i) const

References boost::operator<().


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