ARTS  2.2.66
Rational Class Reference

#include <rational.h>

Public Member Functions

 Rational ()
 
 Rational (const Index &n1)
 
 Rational (const int &n1)
 
 Rational (const Index &n1, const Index &n2)
 
Index Nom () const
 
Index Denom () const
 
bool isUndefined () const
 
Index toIndex () const
 
Numeric toNumeric () const
 
void Simplify ()
 
Rationaloperator+= (const Rational &a)
 
Rationaloperator-= (const Rational &a)
 
Rationaloperator/= (const Rational &a)
 
Rationaloperator*= (const Rational &a)
 
Rational operator++ (int)
 
Rational operator-- (int)
 
Rationaloperator++ ()
 
Rationaloperator-- ()
 

Private Attributes

Index mnom
 
Index mdenom
 

Detailed Description

Definition at line 34 of file rational.h.

Constructor & Destructor Documentation

◆ Rational() [1/4]

Rational::Rational ( )
inline

Definition at line 39 of file rational.h.

◆ Rational() [2/4]

Rational::Rational ( const Index n1)
inline

Definition at line 40 of file rational.h.

◆ Rational() [3/4]

Rational::Rational ( const int &  n1)
inline

Definition at line 41 of file rational.h.

◆ Rational() [4/4]

Rational::Rational ( const Index n1,
const Index n2 
)
inline

Definition at line 42 of file rational.h.

References Simplify().

Member Function Documentation

◆ Denom()

Index Rational::Denom ( ) const
inline

◆ isUndefined()

bool Rational::isUndefined ( ) const
inline

Definition at line 48 of file rational.h.

References mdenom, and mnom.

Referenced by propmat_clearskyAddZeeman().

◆ Nom()

Index Rational::Nom ( ) const
inline

◆ operator*=()

Rational& Rational::operator*= ( const Rational a)
inline

Definition at line 61 of file rational.h.

References Denom(), mdenom, mnom, Nom(), and Simplify().

◆ operator++() [1/2]

Rational& Rational::operator++ ( )
inline

Definition at line 66 of file rational.h.

References mdenom, and mnom.

◆ operator++() [2/2]

Rational Rational::operator++ ( int  )
inline

Definition at line 64 of file rational.h.

References mdenom, and mnom.

◆ operator+=()

Rational& Rational::operator+= ( const Rational a)
inline

Definition at line 58 of file rational.h.

References Denom(), mdenom, mnom, Nom(), and Simplify().

◆ operator--() [1/2]

Rational& Rational::operator-- ( )
inline

Definition at line 67 of file rational.h.

References mdenom, and mnom.

◆ operator--() [2/2]

Rational Rational::operator-- ( int  )
inline

Definition at line 65 of file rational.h.

References mdenom, and mnom.

◆ operator-=()

Rational& Rational::operator-= ( const Rational a)
inline

Definition at line 59 of file rational.h.

References Denom(), mdenom, mnom, Nom(), and Simplify().

◆ operator/=()

Rational& Rational::operator/= ( const Rational a)
inline

Definition at line 60 of file rational.h.

References Denom(), mdenom, mnom, Nom(), and Simplify().

◆ Simplify()

void Rational::Simplify ( )

Definition at line 44 of file rational.cc.

References mdenom, and mnom.

Referenced by operator*=(), operator+=(), operator-=(), operator/=(), and Rational().

◆ toIndex()

Index Rational::toIndex ( ) const

Definition at line 32 of file rational.cc.

References mdenom, and mnom.

Referenced by fac(), wigner3j(), and wigner6j().

◆ toNumeric()

Numeric Rational::toNumeric ( ) const
inline

Definition at line 52 of file rational.h.

References mdenom, and mnom.

Referenced by frequency_change_casea(), frequency_change_caseb(), propmat_clearskyAddZeeman(), test45(), and wigner6j().

Member Data Documentation

◆ mdenom

Index Rational::mdenom
private

◆ mnom

Index Rational::mnom
private

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