The Sparta Modeling Framework
|
Class to represent a Rational number. More...
#include <Rational.hpp>
Public Member Functions | |
Rational (const T &numerator=0, const T &denominator=1) | |
Rational (const Rational< T > &r) | |
T | getNumerator () const |
T | getDenominator () const |
operator T () const | |
operator double () const | |
Rational< T > & | operator= (const Rational< T > &r) |
operator std::string () const | |
void | print (std::ostream &os) const |
void | simplify () |
Rational< T > | operator* (const Rational< T > &r) const |
Rational< T > & | operator*= (const Rational< T > &r) |
Rational< T > | operator/ (const Rational< T > &r) const |
Rational< T > & | operator/= (const Rational< T > &r) |
Rational< T > | operator+ (const Rational< T > &r) const |
Rational< T > & | operator+= (const Rational< T > &r) |
Rational< T > | operator- (const Rational< T > &r) const |
Rational< T > & | operator-= (const Rational< T > &r) |
Rational< T > | inv () |
bool | operator== (const Rational< T > &r) |
Class to represent a Rational number.
Definition at line 20 of file Rational.hpp.
|
inline |
Definition at line 23 of file Rational.hpp.
|
inline |
Definition at line 31 of file Rational.hpp.
|
inline |
Definition at line 40 of file Rational.hpp.
|
inline |
Definition at line 35 of file Rational.hpp.
|
inline |
Definition at line 186 of file Rational.hpp.
|
inlineexplicit |
Definition at line 51 of file Rational.hpp.
|
inlineexplicit |
Definition at line 65 of file Rational.hpp.
|
inlineexplicit |
Definition at line 45 of file Rational.hpp.
|
inline |
Definition at line 106 of file Rational.hpp.
|
inline |
Definition at line 111 of file Rational.hpp.
|
inline |
Definition at line 138 of file Rational.hpp.
|
inline |
Definition at line 148 of file Rational.hpp.
|
inline |
Definition at line 162 of file Rational.hpp.
|
inline |
Definition at line 172 of file Rational.hpp.
|
inline |
Definition at line 119 of file Rational.hpp.
|
inline |
Definition at line 124 of file Rational.hpp.
|
inline |
Definition at line 56 of file Rational.hpp.
|
inline |
Definition at line 191 of file Rational.hpp.
|
inline |
Definition at line 86 of file Rational.hpp.
|
inline |
Definition at line 91 of file Rational.hpp.