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

Rational Domain. More...

#include <qfield.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 int64_t Residu_t
 
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
 
Residu_t characteristic () const
 
Residu_t cardinality () const
 
template<typename T >
T & cardinality (T &c) const
 
template<typename T >
T & characteristic (T &c) 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
 
Repnegin (Rep &r) const
 
Repinv (Rep &r, const Rep &a) 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 isUnit (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
 
virtual bool isZero (const Element &a) const =0
 
virtual bool isOne (const Element &a) const =0
 
virtual bool isMOne (const Element &a) const =0
 
virtual bool isUnit (const Element &a) const =0
 
virtual bool areEqual (const Element &a, const Element &b) const =0
 
virtual Elementinit (Element &r) const =0
 
virtual Elementassign (Element &r, const Element &a) const =0
 
virtual Elementmul (Element &r, const Element &a, const Element &b) const =0
 
virtual Elementadd (Element &r, const Element &a, const Element &b) const =0
 
virtual Elementsub (Element &r, const Element &a, const Element &b) const =0
 
virtual Elementneg (Element &r, const Element &a) const =0
 
virtual Elementmulin (Element &r, const Element &a) const =0
 
virtual Elementaddin (Element &r, const Element &a) const =0
 
virtual Elementsubin (Element &r, const Element &a) const =0
 
virtual Elementnegin (Element &r) const =0
 
virtual Elementaxpy (Element &r, const Element &a, const Element &x, const Element &y) const =0
 
virtual Elementaxpyin (Element &r, const Element &a, const Element &x) const =0
 
virtual Elementaxmy (Element &r, const Element &a, const Element &x, const Element &y) const =0
 
virtual Elementaxmyin (Element &r, const Element &a, const Element &x) const =0
 
virtual Elementmaxpy (Element &r, const Element &a, const Element &x, const Element &y) const =0
 
virtual Elementmaxpyin (Element &r, const Element &a, const Element &x) const =0
 
virtual std::ostream & write (std::ostream &s, const Element &a) const =0
 
virtual std::istream & read (std::istream &s, Element &a) const =0
 

Data Fields

const Element one
 
const Element mOne
 
const Element zero
 

Detailed Description

Rational Domain.

Member Typedef Documentation

◆ Self_t

using Self_t = QField<Element>

◆ Element

typedef Rational Element

◆ Rep

typedef Rational Rep

◆ Residu_t

typedef int64_t Residu_t

◆ RandIter

◆ NonZeroRandIter

◆ Element_ptr

typedef Element* Element_ptr
inherited

◆ ConstElement

typedef const Element ConstElement
inherited

◆ ConstElement_ptr

typedef const Element* ConstElement_ptr
inherited

Constructor & Destructor Documentation

◆ QField() [1/2]

QField ( )
inline

◆ QField() [2/2]

QField ( const X &  x)
inline

Member Function Documentation

◆ operator==()

int operator== ( const QField< Element > &  ) const
inline

◆ operator!=()

int operator!= ( const QField< Element > &  ) const
inline

◆ characteristic() [1/2]

Residu_t characteristic ( ) const
inline

◆ cardinality() [1/2]

Residu_t cardinality ( ) const
inline

◆ cardinality() [2/2]

T& cardinality ( T &  c) const
inline

◆ characteristic() [2/2]

T& characteristic ( T &  c) const
inline

◆ init() [1/4]

Rep& init ( Rep a) const
inline

◆ init() [2/4]

Rep& init ( Rep a,
const Integer n,
const Integer d 
) const
inline

◆ init() [3/4]

Rep& init ( Rep r,
const XXX &  x 
) const
inline

◆ convert()

XXX& convert ( XXX &  x,
const Rep a 
) const
inline

◆ assign() [1/2]

Rep& assign ( Rep a,
const Rep b 
) const
inline

◆ get_num()

Integer& get_num ( Integer n,
const Element r 
) const
inline

◆ get_den()

Integer& get_den ( Integer d,
const Element r 
) const
inline

◆ mul() [1/2]

Rep& mul ( Rep r,
const Rep a,
const Rep b 
) const
inline

◆ div()

Rep& div ( Rep r,
const Rep a,
const Rep b 
) const
inlinevirtual

◆ add() [1/2]

Rep& add ( Rep r,
const Rep a,
const Rep b 
) const
inline

◆ sub() [1/2]

Rep& sub ( Rep r,
const Rep a,
const Rep b 
) const
inline

◆ mulin() [1/2]

Rep& mulin ( Rep r,
const Rep a 
) const
inline

◆ divin()

Rep& divin ( Rep r,
const Rep a 
) const
inlinevirtual

◆ addin() [1/2]

Rep& addin ( Rep r,
const Rep a 
) const
inline

◆ subin() [1/2]

Rep& subin ( Rep r,
const Rep a 
) const
inline

◆ axpy() [1/2]

Rep& axpy ( Rep r,
const Rep a,
const Rep b,
const Rep c 
) const
inline

◆ axpyin() [1/2]

Rep& axpyin ( Rep r,
const Rep a,
const Rep b 
) const
inline

◆ maxpy() [1/2]

Rep& maxpy ( Rep r,
const Rep a,
const Rep b,
const Rep c 
) const
inline

◆ axmy() [1/2]

Rep& axmy ( Rep r,
const Rep a,
const Rep b,
const Rep c 
) const
inline

◆ axmyin() [1/2]

Rep& axmyin ( Rep r,
const Rep a,
const Rep b 
) const
inline

◆ maxpyin() [1/2]

Rep& maxpyin ( Rep r,
const Rep a,
const Rep b 
) const
inline

◆ neg() [1/2]

Rep& neg ( Rep r,
const Rep a 
) const
inline

◆ negin() [1/2]

Rep& negin ( Rep r) const
inline

◆ inv()

Rep& inv ( Rep r,
const Rep a 
) const
inlinevirtual

◆ invin()

Rep& invin ( Rep r) const
inlinevirtual

◆ pow() [1/2]

Rep& pow ( Rep r,
const Rep n,
const uint64_t  l 
) const
inline

◆ pow() [2/2]

Rep& pow ( Rep r,
const Rep n,
const uint32_t  l 
) const
inline

◆ ratrecon() [1/2]

Rep& ratrecon ( Rep r,
const Integer f,
const Integer m,
const Integer k,
bool  recurs = false 
) const
inline

◆ ratrecon() [2/2]

Rep& ratrecon ( Rep r,
const Integer f,
const Integer m,
bool  recurs = true 
) const
inline

◆ length()

size_t length ( const Rep a) const
inline

◆ sign()

int sign ( const Rep a) const
inline

◆ isOne() [1/2]

bool isOne ( const Rep a) const
inline

◆ isMOne() [1/2]

bool isMOne ( const Rep a) const
inline

◆ isUnit() [1/2]

bool isUnit ( const Rep a) const
inline

◆ isZero() [1/2]

bool isZero ( const Rep a) const
inline

◆ areEqual() [1/2]

bool areEqual ( const Rep a,
const Rep b 
) const
inline

◆ areNEqual()

int areNEqual ( const Rep a,
const Rep b 
) const
inline

◆ random() [1/2]

Rep& random ( MyRandIter &  g,
Rep r,
int64_t  s = 1 
) const
inline

◆ random() [2/2]

Rep& random ( MyRandIter &  g,
Rep r,
const Rep b 
) const
inline

◆ nonzerorandom() [1/2]

Rep& nonzerorandom ( MyRandIter &  g,
Rep r,
int64_t  s = 1 
) const
inline

◆ nonzerorandom() [2/2]

Rep& nonzerorandom ( MyRandIter &  g,
Rep r,
const Rep b 
) const
inline

◆ read() [1/3]

std::istream& read ( std::istream &  i)
inline

◆ write() [1/3]

std::ostream& write ( std::ostream &  o) const
inlinevirtual

◆ read() [2/3]

std::istream& read ( std::istream &  i,
Rep n 
) const
inline

◆ write() [2/3]

std::ostream& write ( std::ostream &  o,
const Rep n 
) const
inline

◆ isZero() [2/2]

virtual bool isZero ( const Element a) const
pure virtualinherited

◆ isOne() [2/2]

virtual bool isOne ( const Element a) const
pure virtualinherited

◆ isMOne() [2/2]

virtual bool isMOne ( const Element a) const
pure virtualinherited

◆ isUnit() [2/2]

virtual bool isUnit ( const Element a) const
pure virtualinherited

◆ areEqual() [2/2]

virtual bool areEqual ( const Element a,
const Element b 
) const
pure virtualinherited

◆ init() [4/4]

virtual Element& init ( Element r) const
pure virtualinherited

◆ assign() [2/2]

virtual Element& assign ( Element r,
const Element a 
) const
pure virtualinherited

◆ mul() [2/2]

virtual Element& mul ( Element r,
const Element a,
const Element b 
) const
pure virtualinherited

◆ add() [2/2]

virtual Element& add ( Element r,
const Element a,
const Element b 
) const
pure virtualinherited

◆ sub() [2/2]

virtual Element& sub ( Element r,
const Element a,
const Element b 
) const
pure virtualinherited

◆ neg() [2/2]

virtual Element& neg ( Element r,
const Element a 
) const
pure virtualinherited

◆ mulin() [2/2]

virtual Element& mulin ( Element r,
const Element a 
) const
pure virtualinherited

◆ addin() [2/2]

virtual Element& addin ( Element r,
const Element a 
) const
pure virtualinherited

◆ subin() [2/2]

virtual Element& subin ( Element r,
const Element a 
) const
pure virtualinherited

◆ negin() [2/2]

virtual Element& negin ( Element r) const
pure virtualinherited

◆ axpy() [2/2]

virtual Element& axpy ( Element r,
const Element a,
const Element x,
const Element y 
) const
pure virtualinherited

◆ axpyin() [2/2]

virtual Element& axpyin ( Element r,
const Element a,
const Element x 
) const
pure virtualinherited

◆ axmy() [2/2]

virtual Element& axmy ( Element r,
const Element a,
const Element x,
const Element y 
) const
pure virtualinherited

◆ axmyin() [2/2]

virtual Element& axmyin ( Element r,
const Element a,
const Element x 
) const
pure virtualinherited

◆ maxpy() [2/2]

virtual Element& maxpy ( Element r,
const Element a,
const Element x,
const Element y 
) const
pure virtualinherited

◆ maxpyin() [2/2]

virtual Element& maxpyin ( Element r,
const Element a,
const Element x 
) const
pure virtualinherited

◆ write() [3/3]

virtual std::ostream& write ( std::ostream &  s,
const Element a 
) const
pure virtualinherited

◆ read() [3/3]

virtual std::istream& read ( std::istream &  s,
Element a 
) const
pure virtualinherited

Field Documentation

◆ one

const Element one

◆ mOne

const Element mOne

◆ zero

const Element zero

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