ESTER
Evolution STEllaire en Rotation
 All Classes Files Functions Variables Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
rational Class Reference

#include <symbolic.h>

Public Member Functions

 rational (int num=1, int den=1)
 
int num () const
 
int den () const
 
double eval () const
 
rational operator+ (const rational &q) const
 
rational operator+ () const
 
rational operator- () const
 
rational operator- (const rational &q) const
 
rational operator* (const rational &q) const
 
rational inv () const
 
rational operator/ (const rational &q) const
 
rationaloperator+= (const rational &q)
 
rationaloperator-= (const rational &q)
 
rationaloperator*= (const rational &q)
 
rationaloperator/= (const rational &q)
 
rational pow (int) const
 
bool operator== (const rational &q) const
 
bool operator!= (const rational &q) const
 
bool operator> (const rational &q) const
 
bool operator< (const rational &q) const
 
bool operator>= (const rational &q) const
 
bool operator<= (const rational &q) const
 

Private Member Functions

rationalreduce ()
 

Static Private Member Functions

static int gcd (int a, int b)
 

Private Attributes

int n
 
int d
 

Friends

std::ostream & operator<< (std::ostream &os, const rational &)
 

Constructor & Destructor Documentation

rational::rational ( int  num = 1,
int  den = 1 
)

Here is the call graph for this function:

Member Function Documentation

int rational::den ( ) const
double rational::eval ( ) const
int rational::gcd ( int  a,
int  b 
)
staticprivate

Here is the call graph for this function:

rational rational::inv ( ) const

Here is the call graph for this function:

int rational::num ( ) const
bool rational::operator!= ( const rational q) const
inline
rational rational::operator* ( const rational q) const
rational& rational::operator*= ( const rational q)
inline
rational rational::operator+ ( const rational q) const

Here is the call graph for this function:

rational rational::operator+ ( ) const
inline
rational& rational::operator+= ( const rational q)
inline
rational rational::operator- ( ) const
rational rational::operator- ( const rational q) const
inline
rational& rational::operator-= ( const rational q)
inline
rational rational::operator/ ( const rational q) const
inline

Here is the call graph for this function:

rational& rational::operator/= ( const rational q)
inline
bool rational::operator< ( const rational q) const

Here is the call graph for this function:

bool rational::operator<= ( const rational q) const
inline
bool rational::operator== ( const rational q) const
bool rational::operator> ( const rational q) const

Here is the call graph for this function:

bool rational::operator>= ( const rational q) const
inline
rational rational::pow ( int  q) const

Here is the call graph for this function:

rational & rational::reduce ( )
private

Here is the call graph for this function:

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const rational q 
)
friend

Member Data Documentation

int rational::d
private
int rational::n
private

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