Givaro
Public Types | Public Member Functions | Data Fields
QField< Rational > Class Template Reference

Rational Domain. More...

#include <givrational.h>

+ Inheritance diagram for QField< Rational >:
+ Collaboration diagram for QField< Rational >:

Public Types

using Self_t = QField< Element >
 
typedef Rational Element
 
typedef Rational Rep
 
typedef GeneralRingRandIter< Self_tRandIter
 
typedef GeneralRingNonZeroRandIter< Self_tNonZeroRandIter
 
typedef ElementElement_ptr
 
typedef const Element ConstElement
 
typedef const ElementConstElement_ptr
 

Public Member Functions

 QField ()
 
template<class X >
 QField (const X &x)
 
int operator== (const QField< Element > &) const
 
int operator!= (const QField< Element > &) const
 
uint64_t characteristic () const
 
Integercharacteristic (Integer &p) const
 
uint64_t cardinality () const
 
Integercardinality (Integer &p) const
 
Repinit (Rep &a) const
 
Repinit (Rep &a, const Integer &n, const Integer &d) const
 
template<class XXX >
Repinit (Rep &r, const XXX &x) const
 
template<class XXX >
XXX & convert (XXX &x, const Rep &a) const
 
Repassign (Rep &a, const Rep &b) const
 
Integerget_num (Integer &n, const Element &r) const
 
Integerget_den (Integer &d, const Element &r) const
 
Repmul (Rep &r, const Rep &a, const Rep &b) const
 
Repdiv (Rep &r, const Rep &a, const Rep &b) const
 
Repadd (Rep &r, const Rep &a, const Rep &b) const
 
Repsub (Rep &r, const Rep &a, const Rep &b) const
 
Repmulin (Rep &r, const Rep &a) const
 
Repdivin (Rep &r, const Rep &a) const
 
Repaddin (Rep &r, const Rep &a) const
 
Repsubin (Rep &r, const Rep &a) const
 
Repaxpy (Rep &r, const Rep &a, const Rep &b, const Rep &c) const
 
Repaxpyin (Rep &r, const Rep &a, const Rep &b) const
 
Repmaxpy (Rep &r, const Rep &a, const Rep &b, const Rep &c) const
 
Repaxmy (Rep &r, const Rep &a, const Rep &b, const Rep &c) const
 
Repaxmyin (Rep &r, const Rep &a, const Rep &b) const
 
Repmaxpyin (Rep &r, const Rep &a, const Rep &b) const
 
Repneg (Rep &r, const Rep &a) const
 
Repinv (Rep &r, const Rep &a) const
 
Repnegin (Rep &r) const
 
Repinvin (Rep &r) const
 
Reppow (Rep &r, const Rep &n, const uint64_t l) const
 
Reppow (Rep &r, const Rep &n, const uint32_t l) const
 
Repratrecon (Rep &r, const Integer &f, const Integer &m, const Integer &k, bool recurs=false) const
 
Repratrecon (Rep &r, const Integer &f, const Integer &m, bool recurs=true) const
 
size_t length (const Rep &a) const
 
int sign (const Rep &a) const
 
bool isOne (const Rep &a) const
 
bool isMOne (const Rep &a) const
 
bool isZero (const Rep &a) const
 
bool areEqual (const Rep &a, const Rep &b) const
 
int areNEqual (const Rep &a, const Rep &b) const
 
template<class MyRandIter >
Reprandom (MyRandIter &g, Rep &r, int64_t s=1) const
 
template<class MyRandIter >
Reprandom (MyRandIter &g, Rep &r, const Rep &b) const
 
template<class MyRandIter >
Repnonzerorandom (MyRandIter &g, Rep &r, int64_t s=1) const
 
template<class MyRandIter >
Repnonzerorandom (MyRandIter &g, Rep &r, const Rep &b) const
 
std::istream & read (std::istream &i)
 
std::ostream & write (std::ostream &o) const
 
std::istream & read (std::istream &i, Rep &n) const
 
std::ostream & write (std::ostream &o, const Rep &n) const
 

Data Fields

const Element one
 
const Element mOne
 
const Element zero
 

Detailed Description

template<>
class Givaro::QField< Rational >

Rational Domain.

Examples:
examples/Polynomial/PolynomialCRT.C, examples/Rational/iratrecon.C, and examples/Rational/polydouble.C.

Member Typedef Documentation

using Self_t = QField<Element>
typedef Rational Element
typedef Rational Rep
typedef Element* Element_ptr
inherited
typedef const Element ConstElement
inherited
typedef const Element* ConstElement_ptr
inherited

Constructor & Destructor Documentation

QField ( )
inline
QField ( const X &  x)
inline

Member Function Documentation

int operator== ( const QField< Element > &  ) const
inline
int operator!= ( const QField< Element > &  ) const
inline
uint64_t characteristic ( ) const
inline
Integer& characteristic ( Integer p) const
inline
uint64_t cardinality ( ) const
inline
Integer& cardinality ( Integer p) const
inline
Rep& init ( Rep a) const
inline
Rep& init ( Rep a,
const Integer n,
const Integer d 
) const
inline
Rep& init ( Rep r,
const XXX &  x 
) const
inline
XXX& convert ( XXX &  x,
const Rep a 
) const
inline
Rep& assign ( Rep a,
const Rep b 
) const
inline
Integer& get_num ( Integer n,
const Element r 
) const
inline
Integer& get_den ( Integer d,
const Element r 
) const
inline
Rep& mul ( Rep r,
const Rep a,
const Rep b 
) const
inlinevirtual
Rep& div ( Rep r,
const Rep a,
const Rep b 
) const
inlinevirtual
Rep& add ( Rep r,
const Rep a,
const Rep b 
) const
inlinevirtual
Rep& sub ( Rep r,
const Rep a,
const Rep b 
) const
inlinevirtual
Rep& mulin ( Rep r,
const Rep a 
) const
inlinevirtual
Rep& divin ( Rep r,
const Rep a 
) const
inlinevirtual
Rep& addin ( Rep r,
const Rep a 
) const
inlinevirtual
Rep& subin ( Rep r,
const Rep a 
) const
inlinevirtual
Rep& axpy ( Rep r,
const Rep a,
const Rep b,
const Rep c 
) const
inlinevirtual
Rep& axpyin ( Rep r,
const Rep a,
const Rep b 
) const
inlinevirtual
Rep& maxpy ( Rep r,
const Rep a,
const Rep b,
const Rep c 
) const
inlinevirtual
Rep& axmy ( Rep r,
const Rep a,
const Rep b,
const Rep c 
) const
inlinevirtual
Rep& axmyin ( Rep r,
const Rep a,
const Rep b 
) const
inlinevirtual
Rep& maxpyin ( Rep r,
const Rep a,
const Rep b 
) const
inlinevirtual
Rep& neg ( Rep r,
const Rep a 
) const
inlinevirtual
Rep& inv ( Rep r,
const Rep a 
) const
inlinevirtual
Rep& negin ( Rep r) const
inlinevirtual
Rep& invin ( Rep r) const
inlinevirtual
Rep& pow ( Rep r,
const Rep n,
const uint64_t  l 
) const
inline
Rep& pow ( Rep r,
const Rep n,
const uint32_t  l 
) const
inline
Rep& ratrecon ( Rep r,
const Integer f,
const Integer m,
const Integer k,
bool  recurs = false 
) const
inline
Rep& ratrecon ( Rep r,
const Integer f,
const Integer m,
bool  recurs = true 
) const
inline
size_t length ( const Rep a) const
inline
int sign ( const Rep a) const
inline
bool isOne ( const Rep a) const
inlinevirtual
bool isMOne ( const Rep a) const
inlinevirtual
bool isZero ( const Rep a) const
inlinevirtual
bool areEqual ( const Rep a,
const Rep b 
) const
inlinevirtual
int areNEqual ( const Rep a,
const Rep b 
) const
inline
Rep& random ( MyRandIter &  g,
Rep r,
int64_t  s = 1 
) const
inline
Rep& random ( MyRandIter &  g,
Rep r,
const Rep b 
) const
inline
Rep& nonzerorandom ( MyRandIter &  g,
Rep r,
int64_t  s = 1 
) const
inline
Rep& nonzerorandom ( MyRandIter &  g,
Rep r,
const Rep b 
) const
inline
std::istream& read ( std::istream &  i)
inline
std::ostream& write ( std::ostream &  o) const
inline
std::istream& read ( std::istream &  i,
Rep n 
) const
inline
std::ostream& write ( std::ostream &  o,
const Rep n 
) const
inline

Field Documentation

const Element one
const Element mOne
const Element zero

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