algebramix_doc 0.3
quotient< NT, DT > Class Template Reference

#include <quotient.hpp>

List of all members.

Public Member Functions

Friends


Detailed Description

template<typename NT, typename DT>
class mmx::quotient< NT, DT >

Definition at line 53 of file quotient.hpp.


Constructor & Destructor Documentation

quotient ( ) [inline]

Definition at line 59 of file quotient.hpp.

: n (0), d (1) {}
quotient ( const format< T > &  fm) [inline]

Definition at line 60 of file quotient.hpp.

                                                            :
    n (promote (0, fm)), d (promote (1, fm)) {}
quotient ( const T &  x) [inline]

Definition at line 62 of file quotient.hpp.

                                                   :
    n (x), d (1) {}
quotient ( const quotient< NT2, DT2 > &  x) [inline]

Definition at line 65 of file quotient.hpp.

                                              :
    n (numerator (x)), d (denominator (x)) {}
quotient ( const NT2 &  x,
const DT2 &  y 
) [inline]

Definition at line 68 of file quotient.hpp.

References mmx::normalize().

                                       :
    n (x), d (y) { if (n == 0) d= 1; else
      quotient_normalization_helper<NT,DT>::normalize (n, d); }
quotient ( const NT2 &  x,
const DT2 &  y,
bool  simplify 
) [inline]

Definition at line 72 of file quotient.hpp.

References mmx::DT, mmx::gcd(), and mmx::normalize().

                                                      :
    n (x), d (y) {
    assert (simplify);
    if (n == 0)
      d= 1;
    else {
      DT g= gcd (n, d);
      n /= g;
      d /= g;
    }
    quotient_normalization_helper<NT,DT>::normalize (n, d); }

Friends And Related Function Documentation

NT numerator LESSGTR ( const quotient< NT, DT > &  x) [friend]
DT denominator LESSGTR ( const quotient< NT, DT > &  x) [friend]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Friends Defines