Ring Daemon 16.0.0
Loading...
Searching...
No Matches
jami::rational< I > Class Template Reference

Naive implementation of the boost::rational interface, described here: http://www.boost.org/doc/libs/1_57_0/libs/rational/rational.html. More...

#include <rational.h>

Inheritance diagram for jami::rational< I >:
Inheritance graph
Collaboration diagram for jami::rational< I >:
Collaboration graph

Public Member Functions

rationalassign (I n, I d)
 
constexpr I denominator () const
 
constexpr I numerator () const
 
constexpr operator AVRational () const
 
constexpr operator bool () const
 
constexpr bool operator! () const
 
constexpr bool operator!= (const rational &r) const
 
constexpr bool operator!= (I i) const
 
constexpr rational operator* (const rational &r) const
 
rationaloperator*= (const rational &r)
 
rationaloperator*= (I i)
 
constexpr rational operator+ (const rational &r) const
 
const rationaloperator++ ()
 
rationaloperator+= (const rational &r)
 
rationaloperator+= (I i)
 
constexpr rational operator- (const rational &r) const
 
const rationaloperator-- ()
 
rationaloperator-= (const rational &r)
 
rationaloperator-= (I i)
 
constexpr rational operator/ (const rational &r) const
 
rationaloperator/= (const rational &r)
 
rationaloperator/= (I i)
 
constexpr bool operator< (const rational &r) const
 
constexpr bool operator< (I i) const
 
rationaloperator= (I n)
 
constexpr bool operator== (const rational &r) const
 
constexpr bool operator== (I i) const
 
constexpr bool operator> (const rational &r) const
 
constexpr bool operator> (I i) const
 
constexpr rational ()
 
constexpr rational (AVRational r)
 
constexpr rational (I n)
 
constexpr rational (I n, I d)
 
template<typename R = double>
constexpr R real () const
 

Detailed Description

template<typename I>
class jami::rational< I >

Naive implementation of the boost::rational interface, described here: http://www.boost.org/doc/libs/1_57_0/libs/rational/rational.html.

Definition at line 37 of file rational.h.

Constructor & Destructor Documentation

◆ rational() [1/4]

template<typename I >
constexpr jami::rational< I >::rational ( )
inlineconstexpr

Definition at line 41 of file rational.h.

◆ rational() [2/4]

template<typename I >
constexpr jami::rational< I >::rational ( I  n)
inlineconstexpr

Definition at line 42 of file rational.h.

◆ rational() [3/4]

template<typename I >
constexpr jami::rational< I >::rational ( I  n,
I  d 
)
inlineconstexpr

Definition at line 44 of file rational.h.

◆ rational() [4/4]

template<typename I >
constexpr jami::rational< I >::rational ( AVRational  r)
inlineconstexpr

Definition at line 52 of file rational.h.

Member Function Documentation

◆ assign()

template<typename I >
rational & jami::rational< I >::assign ( I  n,
I  d 
)
inline

Definition at line 68 of file rational.h.

References jami::emitSignal().

Here is the call graph for this function:

◆ denominator()

template<typename I >
constexpr I jami::rational< I >::denominator ( ) const
inlineconstexpr

Definition at line 78 of file rational.h.

Referenced by jami::abs(), jami::operator-(), jami::operator/(), and jami::operator<<().

◆ numerator()

template<typename I >
constexpr I jami::rational< I >::numerator ( ) const
inlineconstexpr

◆ operator AVRational()

template<typename I >
constexpr jami::rational< I >::operator AVRational ( ) const
inlineconstexpr

Definition at line 55 of file rational.h.

References jami::emitSignal().

Here is the call graph for this function:

◆ operator bool()

template<typename I >
constexpr jami::rational< I >::operator bool ( ) const
inlineexplicitconstexpr

Definition at line 166 of file rational.h.

◆ operator!()

template<typename I >
constexpr bool jami::rational< I >::operator! ( ) const
inlineconstexpr

Definition at line 163 of file rational.h.

◆ operator!=() [1/2]

template<typename I >
constexpr bool jami::rational< I >::operator!= ( const rational< I > &  r) const
inlineconstexpr

Definition at line 180 of file rational.h.

◆ operator!=() [2/2]

template<typename I >
constexpr bool jami::rational< I >::operator!= ( I  i) const
inlineconstexpr

Definition at line 186 of file rational.h.

References jami::emitSignal().

Here is the call graph for this function:

◆ operator*()

template<typename I >
constexpr rational jami::rational< I >::operator* ( const rational< I > &  r) const
inlineconstexpr

Definition at line 98 of file rational.h.

◆ operator*=() [1/2]

template<typename I >
rational & jami::rational< I >::operator*= ( const rational< I > &  r)
inline

Definition at line 111 of file rational.h.

◆ operator*=() [2/2]

template<typename I >
rational & jami::rational< I >::operator*= ( I  i)
inline

Definition at line 137 of file rational.h.

References jami::emitSignal().

Here is the call graph for this function:

◆ operator+()

template<typename I >
constexpr rational jami::rational< I >::operator+ ( const rational< I > &  r) const
inlineconstexpr

Definition at line 90 of file rational.h.

◆ operator++()

template<typename I >
const rational & jami::rational< I >::operator++ ( )
inline

Definition at line 151 of file rational.h.

◆ operator+=() [1/2]

template<typename I >
rational & jami::rational< I >::operator+= ( const rational< I > &  r)
inline

Definition at line 101 of file rational.h.

◆ operator+=() [2/2]

template<typename I >
rational & jami::rational< I >::operator+= ( I  i)
inline

Definition at line 127 of file rational.h.

References jami::emitSignal().

Here is the call graph for this function:

◆ operator-()

template<typename I >
constexpr rational jami::rational< I >::operator- ( const rational< I > &  r) const
inlineconstexpr

Definition at line 94 of file rational.h.

◆ operator--()

template<typename I >
const rational & jami::rational< I >::operator-- ( )
inline

Definition at line 156 of file rational.h.

◆ operator-=() [1/2]

template<typename I >
rational & jami::rational< I >::operator-= ( const rational< I > &  r)
inline

Definition at line 106 of file rational.h.

◆ operator-=() [2/2]

template<typename I >
rational & jami::rational< I >::operator-= ( I  i)
inline

Definition at line 132 of file rational.h.

References jami::emitSignal().

Here is the call graph for this function:

◆ operator/()

template<typename I >
constexpr rational jami::rational< I >::operator/ ( const rational< I > &  r) const
inlineconstexpr

Definition at line 99 of file rational.h.

◆ operator/=() [1/2]

template<typename I >
rational & jami::rational< I >::operator/= ( const rational< I > &  r)
inline

Definition at line 118 of file rational.h.

◆ operator/=() [2/2]

template<typename I >
rational & jami::rational< I >::operator/= ( I  i)
inline

Definition at line 143 of file rational.h.

References jami::emitSignal().

Here is the call graph for this function:

◆ operator<() [1/2]

template<typename I >
constexpr bool jami::rational< I >::operator< ( const rational< I > &  r) const
inlineconstexpr

Definition at line 169 of file rational.h.

References jami::emitSignal().

Here is the call graph for this function:

◆ operator<() [2/2]

template<typename I >
constexpr bool jami::rational< I >::operator< ( I  i) const
inlineconstexpr

Definition at line 183 of file rational.h.

References jami::emitSignal().

Here is the call graph for this function:

◆ operator=()

template<typename I >
rational & jami::rational< I >::operator= ( I  n)
inline

Definition at line 60 of file rational.h.

References jami::emitSignal().

Here is the call graph for this function:

◆ operator==() [1/2]

template<typename I >
constexpr bool jami::rational< I >::operator== ( const rational< I > &  r) const
inlineconstexpr

Definition at line 179 of file rational.h.

◆ operator==() [2/2]

template<typename I >
constexpr bool jami::rational< I >::operator== ( I  i) const
inlineconstexpr

Definition at line 185 of file rational.h.

References jami::emitSignal().

Here is the call graph for this function:

◆ operator>() [1/2]

template<typename I >
constexpr bool jami::rational< I >::operator> ( const rational< I > &  r) const
inlineconstexpr

Definition at line 174 of file rational.h.

References jami::emitSignal().

Here is the call graph for this function:

◆ operator>() [2/2]

template<typename I >
constexpr bool jami::rational< I >::operator> ( I  i) const
inlineconstexpr

Definition at line 184 of file rational.h.

References jami::emitSignal().

Here is the call graph for this function:

◆ real()

template<typename I >
template<typename R = double>
constexpr R jami::rational< I >::real ( ) const
inlineconstexpr

Definition at line 81 of file rational.h.

References jami::emitSignal().

Here is the call graph for this function:

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