CAPD DynSys Library  5.2.0
rationalNumber< intType > Class Template Reference

#include <capd/fields/rationalNumber.h>

Public Member Functions

void normalize ()
 
 rationalNumber ()
 
 rationalNumber (int k)
 
 rationalNumber (intType k, intType l)
 
rationalNumberoperator= (const rationalNumber &s)
 
rationalNumberoperator+= (const rationalNumber &s)
 
rationalNumberoperator-= (const rationalNumber &s)
 
rationalNumberoperator*= (const rationalNumber &s)
 
rationalNumberoperator/= (const rationalNumber &s)
 
 operator double ()
 

Friends

rationalNumber operator- (const rationalNumber &v)
 
rationalNumber operator+ (const rationalNumber &v1, const rationalNumber &v2)
 
rationalNumber operator- (const rationalNumber &v1, const rationalNumber &v2)
 
rationalNumber operator* (const rationalNumber &v1, const rationalNumber &v2)
 
rationalNumber operator/ (const rationalNumber &v1, const rationalNumber &v2)
 
int operator< (const rationalNumber &v1, const rationalNumber &v2)
 
int operator> (const rationalNumber &v1, const rationalNumber &v2)
 
int operator<= (const rationalNumber &v1, const rationalNumber &v2)
 
int operator>= (const rationalNumber &v1, const rationalNumber &v2)
 
int operator== (const rationalNumber &v1, const rationalNumber &v2)
 
int operator!= (const rationalNumber &v1, const rationalNumber &v2)
 
std::ostream & operator<< (std::ostream &out, const rationalNumber &v)
 
std::istream & operator>> (std::istream &inp, rationalNumber &v)
 
bool isZero (const rationalNumber &v)
 

Constructor & Destructor Documentation

◆ rationalNumber() [1/3]

template<class intType >
rationalNumber< intType >::rationalNumber ( )
inline

◆ rationalNumber() [2/3]

template<class intType >
rationalNumber< intType >::rationalNumber ( int  k)
inline

◆ rationalNumber() [3/3]

template<class intType >
rationalNumber< intType >::rationalNumber ( intType  k,
intType  l 
)
inline

Member Function Documentation

◆ normalize()

template<class intType >
void rationalNumber< intType >::normalize

◆ operator double()

template<class intType >
rationalNumber< intType >::operator double

◆ operator*=()

template<class intType >
rationalNumber< intType > & rationalNumber< intType >::operator*= ( const rationalNumber< intType > &  s)

◆ operator+=()

template<class intType >
rationalNumber< intType > & rationalNumber< intType >::operator+= ( const rationalNumber< intType > &  s)

◆ operator-=()

template<class intType >
rationalNumber< intType > & rationalNumber< intType >::operator-= ( const rationalNumber< intType > &  s)

◆ operator/=()

template<class intType >
rationalNumber< intType > & rationalNumber< intType >::operator/= ( const rationalNumber< intType > &  s)

◆ operator=()

template<class intType >
rationalNumber< intType > & rationalNumber< intType >::operator= ( const rationalNumber< intType > &  s)

Friends And Related Function Documentation

◆ isZero

template<class intType >
bool isZero ( const rationalNumber< intType > &  v)
friend

◆ operator!=

template<class intType >
int operator!= ( const rationalNumber< intType > &  v1,
const rationalNumber< intType > &  v2 
)
friend

◆ operator*

template<class intType >
rationalNumber operator* ( const rationalNumber< intType > &  v1,
const rationalNumber< intType > &  v2 
)
friend

◆ operator+

template<class intType >
rationalNumber operator+ ( const rationalNumber< intType > &  v1,
const rationalNumber< intType > &  v2 
)
friend

◆ operator- [1/2]

template<class intType >
rationalNumber operator- ( const rationalNumber< intType > &  v)
friend

◆ operator- [2/2]

template<class intType >
rationalNumber operator- ( const rationalNumber< intType > &  v1,
const rationalNumber< intType > &  v2 
)
friend

◆ operator/

template<class intType >
rationalNumber operator/ ( const rationalNumber< intType > &  v1,
const rationalNumber< intType > &  v2 
)
friend

◆ operator<

template<class intType >
int operator< ( const rationalNumber< intType > &  v1,
const rationalNumber< intType > &  v2 
)
friend

◆ operator<<

template<class intType >
std::ostream& operator<< ( std::ostream &  out,
const rationalNumber< intType > &  v 
)
friend

◆ operator<=

template<class intType >
int operator<= ( const rationalNumber< intType > &  v1,
const rationalNumber< intType > &  v2 
)
friend

◆ operator==

template<class intType >
int operator== ( const rationalNumber< intType > &  v1,
const rationalNumber< intType > &  v2 
)
friend

◆ operator>

template<class intType >
int operator> ( const rationalNumber< intType > &  v1,
const rationalNumber< intType > &  v2 
)
friend

◆ operator>=

template<class intType >
int operator>= ( const rationalNumber< intType > &  v1,
const rationalNumber< intType > &  v2 
)
friend

◆ operator>>

template<class intType >
std::istream& operator>> ( std::istream &  inp,
rationalNumber< intType > &  v 
)
friend