atlas
0.6
|
#include <arithmetic.h>
Public Member Functions | |
Rational (Numer_t n=0, Denom_t d=1) | |
Numer_t | numerator () const |
Numer_t | denominator () const |
Rational | operator+ (Rational q) const |
Rational | operator- (Rational q) const |
Rational | operator* (Rational q) const |
Rational | operator/ (Rational q) const |
Rational | operator% (Rational q) const |
Rational & | operator= (Rational q) |
Rational & | operator+= (Rational q) |
Rational & | operator-= (Rational q) |
Rational & | operator*= (Rational q) |
Rational & | operator/= (Rational q) |
Rational & | operator%= (Rational q) |
Rational & | operator+= (Numer_t n) |
Rational & | operator-= (Numer_t n) |
Rational & | operator*= (Numer_t n) |
Rational & | operator/= (Numer_t n) |
Rational & | operator%= (Numer_t n) |
bool | operator== (Rational q) const |
bool | operator!= (Rational q) const |
bool | operator< (Rational q) const |
bool | operator<= (Rational q) const |
bool | operator> (Rational q) const |
bool | operator>= (Rational q) const |
Rational & | normalize () |
Rational & | power (int n) |
Private Attributes | |
Numer_t | num |
Denom_t | denom |
|
inline |
|
inline |
|
inline |
|
inline |
Rational atlas::arithmetic::Rational::operator% | ( | Rational | q | ) | const |
|
inline |
Rational atlas::arithmetic::Rational::operator* | ( | Rational | q | ) | const |
|
inline |
Rational atlas::arithmetic::Rational::operator+ | ( | Rational | q | ) | const |
|
inline |
Rational atlas::arithmetic::Rational::operator- | ( | Rational | q | ) | const |
|
inline |
Rational atlas::arithmetic::Rational::operator/ | ( | Rational | q | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Rational & atlas::arithmetic::Rational::power | ( | int | n | ) |
|
private |
|
private |