CoxIter  1.3
CoxIter - Computing invariants of hyperbolic Coxeter groups
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
Rational< T > Class Template Reference

#include <rational.h>

Public Member Functions

 Rational ()
 
 Rational (T a, T b)
 
 Rational (T a)
 
 Rational (const int &i)
 
bool operator> (Rational const &) const
 
bool operator< (Rational const &) const
 
bool operator>= (int const &) const
 
bool operator== (int const &) const
 
bool operator== (Rational const &) const
 
bool operator!= (Rational const &) const
 
Rationaloperator= (long int)
 
Rational operator+ (Rational const &n) const
 
Rationaloperator+= (Rational const &n)
 
Rational operator- (Rational const &n) const
 
Rational operator- () const
 
void opp (Rational *&_c) const
 
Rationaloperator-= (Rational const &n)
 
Rational operator* (Rational const &n) const
 
Rationaloperator*= (Rational const &n)
 
Rational operator/ (Rational const &n) const
 
Rationaloperator/= (Rational const &n)
 
void print (ostream &) const
 
string to_string () const
 
bool get_hasDenominatorOne () const
 

Public Attributes

a
 
b
 

Private Member Functions

void update ()
 Met à jour les attributs (gcd, isInt, ...) More...
 

Private Attributes

bool isZero
 
bool hasDenominatorOne
 
bool isOne
 
bool isMinusOne
 

Constructor & Destructor Documentation

◆ Rational() [1/4]

template<typename T >
Rational< T >::Rational ( )

◆ Rational() [2/4]

template<typename T >
Rational< T >::Rational ( a,
b 
)

◆ Rational() [3/4]

template<typename T >
Rational< T >::Rational ( a)

◆ Rational() [4/4]

template<typename T >
Rational< T >::Rational ( const int &  i)

Member Function Documentation

◆ get_hasDenominatorOne()

template<typename T >
bool Rational< T >::get_hasDenominatorOne ( ) const

◆ operator!=()

template<typename T >
bool Rational< T >::operator!= ( Rational< T > const &  ) const

◆ operator*()

template<typename T >
Rational Rational< T >::operator* ( Rational< T > const &  n) const

◆ operator*=()

template<typename T >
Rational& Rational< T >::operator*= ( Rational< T > const &  n)

◆ operator+()

template<typename T >
Rational Rational< T >::operator+ ( Rational< T > const &  n) const

◆ operator+=()

template<typename T >
Rational& Rational< T >::operator+= ( Rational< T > const &  n)

◆ operator-() [1/2]

template<typename T >
Rational Rational< T >::operator- ( ) const

◆ operator-() [2/2]

template<typename T >
Rational Rational< T >::operator- ( Rational< T > const &  n) const

◆ operator-=()

template<typename T >
Rational& Rational< T >::operator-= ( Rational< T > const &  n)

◆ operator/()

template<typename T >
Rational Rational< T >::operator/ ( Rational< T > const &  n) const

◆ operator/=()

template<typename T >
Rational& Rational< T >::operator/= ( Rational< T > const &  n)

◆ operator<()

template<typename T >
bool Rational< T >::operator< ( Rational< T > const &  ) const

◆ operator=()

template<typename T >
Rational& Rational< T >::operator= ( long int  )

◆ operator==() [1/2]

template<typename T >
bool Rational< T >::operator== ( int const &  ) const

◆ operator==() [2/2]

template<typename T >
bool Rational< T >::operator== ( Rational< T > const &  ) const

◆ operator>()

template<typename T >
bool Rational< T >::operator> ( Rational< T > const &  ) const

◆ operator>=()

template<typename T >
bool Rational< T >::operator>= ( int const &  ) const

◆ opp()

template<typename T >
void Rational< T >::opp ( Rational< T > *&  _c) const

◆ print()

template<typename T >
void Rational< T >::print ( ostream &  ) const

◆ to_string()

template<typename T >
string Rational< T >::to_string ( ) const

◆ update()

template<typename T >
Rational< T >::update ( )
private

Met à jour les attributs (gcd, isInt, ...)

Member Data Documentation

◆ a

template<typename T >
T Rational< T >::a

◆ b

template<typename T >
T Rational< T >::b

◆ hasDenominatorOne

template<typename T >
bool Rational< T >::hasDenominatorOne
private

◆ isMinusOne

template<typename T >
bool Rational< T >::isMinusOne
private

◆ isOne

template<typename T >
bool Rational< T >::isOne
private

◆ isZero

template<typename T >
bool Rational< T >::isZero
private

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