Givaro
Public Types | Public Member Functions | Static Public Member Functions | Data Fields | Protected Types | Protected Member Functions | Protected Attributes
GFqDom< TT > Class Template Reference

class GFqDom More...

#include <givgfq.h>

+ Inheritance diagram for GFqDom< TT >:
+ Collaboration diagram for GFqDom< TT >:

Public Types

typedef GFqDom< TT > Self_t
typedef Rep Element
typedef UTT Residu_t
typedef Rep * Array
typedef const Rep * constArray
typedef GIV_randIter< GFqDom
< TT >, Rep > 
randIter

Public Member Functions

 GFqDom ()
 GFqDom (const UTT P, const UTT e=1)
template<typename Vector >
 GFqDom (const UTT P, const UTT e, const Vector &modPoly)
 GFqDom (const GFqDom< TT > &F)
GFqDom< TT > operator= (const GFqDom< TT > &F)
UTT residu () const
UTT characteristic () const
Integer & characteristic (Integer &p) const
unsigned long & characteristic (unsigned long &p) const
UTT cardinality () const
UTT size () const
UTT exponent () const
Rep & generator (Rep &) const
UTT generator () const
UTT irreducible () const
Rep sage_generator () const
Rep indeterminate () const
Rep & indeterminate (Rep &) const
Rep & init (Rep &) const
Rep & init (Rep &, const int) const
Rep & init (Rep &, const unsigned int) const
Rep & init (Rep &, const long) const
Rep & init (Rep &, const unsigned long) const
Rep & init (Rep &, const Integer) const
Rep & init (Rep &, const float) const
Rep & init (Rep &, const double) const
Rep & init (Rep &, const long long) const
Rep & init (Rep &, const unsigned long long) const
Rep & init (Rep &a, std::istream &s) const
template<typename val_t , template< class, class > class Vector, template< class > class Alloc>
Rep & init (Rep &, const Vector< val_t, Alloc< val_t > > &)
Rep & assign (Rep &, const Integer) const
Rep & assign (Rep &, const Rep) const
void assign (const size_t sz, Array r, constArray a) const
std::istream & read (std::istream &s)
std::ostream & write (std::ostream &s) const
std::istream & read (std::istream &s, Rep &a) const
std::ostream & write (std::ostream &s, const Rep a) const
std::ostream & convert (std::ostream &s, const Rep a) const
TT convert (const Rep) const
long & convert (long &, const Rep) const
unsigned long & convert (unsigned long &, const Rep) const
int & convert (int &, const Rep) const
float & convert (float &, const Rep) const
double & convert (double &, const Rep) const
unsigned int & convert (unsigned int &, const Rep) const
Integer & convert (Integer &, const Rep) const
long long & convert (long long &, const Rep) const
unsigned long long & convert (unsigned long long &, const Rep) const
int operator== (const GFqDom< TT > &a) const
int operator!= (const GFqDom< TT > &a) const
bool areEqual (const Rep &, const Rep &) const
bool areNEqual (const Rep, const Rep) const
bool isZero (const Rep) const
bool isnzero (const Rep) const
bool isOne (const Rep) const
bool isunit (const Rep) const
size_t length (const Rep) const
Rep & mul (Rep &r, const Rep a, const Rep b) const
Rep & div (Rep &r, const Rep a, const Rep b) const
Rep & add (Rep &r, const Rep a, const Rep b) const
Rep & sub (Rep &r, const Rep a, const Rep b) const
Rep & neg (Rep &r, const Rep a) const
Rep & inv (Rep &r, const Rep a) const
Rep & mulin (Rep &r, const Rep a) const
Rep & divin (Rep &r, const Rep a) const
Rep & addin (Rep &r, const Rep a) const
Rep & subin (Rep &r, const Rep a) const
Rep & negin (Rep &r) const
Rep & invin (Rep &r) const
void mul (const size_t sz, Array r, constArray a, constArray b) const
void mul (const size_t sz, Array r, constArray a, Rep b) const
void div (const size_t sz, Array r, constArray a, constArray b) const
void div (const size_t sz, Array r, constArray a, Rep b) const
void add (const size_t sz, Array r, constArray a, constArray b) const
void add (const size_t sz, Array r, constArray a, Rep b) const
void sub (const size_t sz, Array r, constArray a, constArray b) const
void sub (const size_t sz, Array r, constArray a, Rep b) const
void neg (const size_t sz, Array r, constArray a) const
void inv (const size_t sz, Array r, constArray a) const
Rep & axpy (Rep &r, const Rep a, const Rep b, const Rep c) const
void axpy (const size_t sz, Array r, Rep a, constArray x, constArray y) const
void axpy (const size_t sz, Array r, Rep a, constArray x, Rep c) const
Rep & axpyin (Rep &r, const Rep a, const Rep b) const
void axpyin (const size_t sz, Array r, Rep a, constArray x) const
Rep & axmy (Rep &r, const Rep a, const Rep b, const Rep c) const
void axmy (const size_t sz, Array r, Rep a, constArray x, constArray y) const
void axmy (const size_t sz, Array r, Rep a, constArray x, Rep c) const
Rep & maxpy (Rep &r, const Rep a, const Rep b, const Rep c) const
Rep & axmyin (Rep &r, const Rep a, const Rep b) const
Rep & maxpyin (Rep &r, const Rep a, const Rep b) const
void maxpyin (const size_t sz, Array r, Rep a, constArray x) const
void reduceadd (Rep &r, const size_t sz, constArray a) const
void reducemul (Rep &r, const size_t sz, constArray a) const
Rep & dotprod (Rep &r, const size_t sz, constArray a, constArray b) const
template<class RandIter >
Rep & random (RandIter &g, Rep &r) const
template<class RandIter >
Rep & random (RandIter &g, Rep &r, long s) const
template<class RandIter >
Rep & random (RandIter &g, Rep &r, const Rep &b) const
template<class RandIter >
Rep & nonzerorandom (RandIter &g, Rep &r) const
template<class RandIter >
Rep & nonzerorandom (RandIter &g, Rep &r, long s) const
template<class RandIter >
Rep & nonzerorandom (RandIter &g, Rep &r, const Rep &b) const

Static Public Member Functions

static void Init ()
static void End ()

Data Fields

Rep zero
Rep one
Rep mOne

Protected Types

typedef Signed_Trait< TT >
::unsigned_type 
UTT
typedef TT Rep
typedef std::vector< UTT >
::size_type 
UT

Protected Member Functions

UTT zech2padic (UTT x)
UTT padic2zech (UTT x)

Protected Attributes

UTT _characteristic
UTT _exponent
UTT _irred
UTT _q
UTT _qm1
UTT _qm1o2
std::vector< UTT > _log2pol
std::vector< UTT > _pol2log
std::vector< TT > _plus1
double _dcharacteristic

Detailed Description

template<class TT>
class Givaro::GFqDom< TT >

class GFqDom

Examples:
examples/FiniteField/exponentiation.C, examples/FiniteField/ff_arith.C, examples/FiniteField/GF128.C, examples/FiniteField/GFirreducible.C, examples/FiniteField/gfq_atomic.C, examples/Polynomial/highorder.C, examples/Polynomial/isirred.C, examples/Polynomial/isprimitive.C, examples/Polynomial/pol_arith.C, examples/Polynomial/pol_eval.C, examples/Polynomial/pol_factor.C, and examples/Polynomial/trunc_arith.C.

Member Typedef Documentation

typedef Signed_Trait<TT>::unsigned_type UTT
protected
typedef TT Rep
protected
typedef std::vector<UTT>::size_type UT
protected
typedef GFqDom<TT> Self_t
typedef Rep Element
typedef UTT Residu_t
typedef Rep* Array
typedef const Rep* constArray
typedef GIV_randIter< GFqDom<TT> , Rep> randIter

Constructor & Destructor Documentation

GFqDom ( )
inline
GFqDom ( const UTT  P,
const UTT  e = 1 
)
inline
GFqDom ( const UTT  P,
const UTT  e,
const Vector &  modPoly 
)
inline
GFqDom ( const GFqDom< TT > &  F)
inline

Member Function Documentation

UTT zech2padic ( UTT  x)
inlineprotected
UTT padic2zech ( UTT  x)
inlineprotected
GFqDom<TT> operator= ( const GFqDom< TT > &  F)
inline
GFqDom< TT >::Residu_t residu ( ) const
inline
GFqDom< TT >::Residu_t characteristic ( ) const
inline

Reimplemented in GFqExtFast< TT >.

Integer& characteristic ( Integer &  p) const
inline
unsigned long& characteristic ( unsigned long &  p) const
inline
GFqDom< TT >::Residu_t cardinality ( ) const
inline
GFqDom< TT >::Residu_t size ( ) const
inline
GFqDom< TT >::Residu_t exponent ( ) const
inline
GFqDom< TT >::Rep & generator ( Rep &  g) const
inline
GFqDom< TT >::Residu_t generator ( ) const
inline
GFqDom< TT >::Residu_t irreducible ( ) const
inline
GFqDom< TT >::Rep sage_generator ( ) const
inline
GFqDom< TT >::Rep indeterminate ( ) const
inline
GFqDom< TT >::Rep & indeterminate ( Rep &  X) const
inline
GFqDom< TT >::Rep & init ( Rep &  r) const
inline
GFqDom< TT >::Rep & init ( Rep &  r,
const int  Residu 
) const
inline
GFqDom< TT >::Rep & init ( Rep &  r,
const unsigned int  Residu 
) const
inline
GFqDom< TT >::Rep & init ( Rep &  r,
const long  Residu 
) const
inline
GFqDom< TT >::Rep & init ( Rep &  r,
const unsigned long  Residu 
) const
inline

Reimplemented in GFqExtFast< TT >.

GFqDom< TT >::Rep & init ( Rep &  r,
const Integer  Residu 
) const
inline
GFqDom< TT >::Rep & init ( Rep &  r,
const float  Residu 
) const
inline

Reimplemented in GFqExtFast< TT >.

GFqDom< TT >::Rep & init ( Rep &  r,
const double  Residu 
) const
inline

Reimplemented in GFqExt< TT >, and GFqExtFast< TT >.

GFqDom< TT >::Rep & init ( Rep &  r,
const long long  Residu 
) const
inline
GFqDom< TT >::Rep & init ( Rep &  r,
const unsigned long long  Residu 
) const
inline
Rep& init ( Rep &  a,
std::istream &  s 
) const
inline
GFqDom< TT >::Rep & init ( Rep &  r,
const Vector< val_t, Alloc< val_t > > &  P 
)
inline
GFqDom< TT >::Rep & assign ( Rep &  r,
const Integer  a 
) const
inline
GFqDom< TT >::Rep & assign ( Rep &  r,
const Rep  a 
) const
inline
void assign ( const size_t  sz,
Array  r,
constArray  a 
) const
inline
std::istream & read ( std::istream &  s)
inline
std::ostream & write ( std::ostream &  s) const
inline
std::istream & read ( std::istream &  s,
Rep &  a 
) const
inline
std::ostream & write ( std::ostream &  s,
const Rep  a 
) const
inline
std::ostream& convert ( std::ostream &  s,
const Rep  a 
) const
inline
TT convert ( const Rep  a) const
inline
long & convert ( long &  r,
const Rep  a 
) const
inline
unsigned long & convert ( unsigned long &  r,
const Rep  a 
) const
inline
int & convert ( int &  r,
const Rep  a 
) const
inline
float & convert ( float &  r,
const Rep  a 
) const
inline

Reimplemented in GFqExtFast< TT >.

double & convert ( double &  r,
const Rep  a 
) const
inline

Reimplemented in GFqExtFast< TT >.

unsigned int & convert ( unsigned int &  r,
const Rep  a 
) const
inline
Integer & convert ( Integer &  r,
const Rep  a 
) const
inline
long long & convert ( long long &  r,
const Rep  a 
) const
inline
unsigned long long & convert ( unsigned long long &  r,
const Rep  a 
) const
inline
int operator== ( const GFqDom< TT > &  a) const
inline
int operator!= ( const GFqDom< TT > &  a) const
inline
bool areEqual ( const Rep &  a,
const Rep &  b 
) const
inline
bool areNEqual ( const Rep  a,
const Rep  b 
) const
inline
bool isZero ( const Rep  a) const
inline
bool isnzero ( const Rep  a) const
inline
bool isOne ( const Rep  a) const
inline
bool isunit ( const Rep  a) const
inline
size_t length ( const Rep  ) const
inline
GFqDom< TT >::Rep & mul ( Rep &  r,
const Rep  a,
const Rep  b 
) const
inline
GFqDom< TT >::Rep & div ( Rep &  r,
const Rep  a,
const Rep  b 
) const
inline
GFqDom< TT >::Rep & add ( Rep &  r,
const Rep  a,
const Rep  b 
) const
inline
GFqDom< TT >::Rep & sub ( Rep &  r,
const Rep  a,
const Rep  b 
) const
inline
GFqDom< TT >::Rep & neg ( Rep &  r,
const Rep  a 
) const
inline
GFqDom< TT >::Rep & inv ( Rep &  r,
const Rep  a 
) const
inline
GFqDom< TT >::Rep & mulin ( Rep &  r,
const Rep  a 
) const
inline
GFqDom< TT >::Rep & divin ( Rep &  r,
const Rep  a 
) const
inline
GFqDom< TT >::Rep & addin ( Rep &  r,
const Rep  a 
) const
inline
GFqDom< TT >::Rep & subin ( Rep &  r,
const Rep  a 
) const
inline
GFqDom< TT >::Rep & negin ( Rep &  r) const
inline
GFqDom< TT >::Rep & invin ( Rep &  r) const
inline
void mul ( const size_t  sz,
Array  r,
constArray  a,
constArray  b 
) const
inline
void mul ( const size_t  sz,
Array  r,
constArray  a,
Rep  b 
) const
inline
void div ( const size_t  sz,
Array  r,
constArray  a,
constArray  b 
) const
inline
void div ( const size_t  sz,
Array  r,
constArray  a,
Rep  b 
) const
inline
void add ( const size_t  sz,
Array  r,
constArray  a,
constArray  b 
) const
inline
void add ( const size_t  sz,
Array  r,
constArray  a,
Rep  b 
) const
inline
void sub ( const size_t  sz,
Array  r,
constArray  a,
constArray  b 
) const
inline
void sub ( const size_t  sz,
Array  r,
constArray  a,
Rep  b 
) const
inline
void neg ( const size_t  sz,
Array  r,
constArray  a 
) const
inline
void inv ( const size_t  sz,
Array  r,
constArray  a 
) const
inline
GFqDom< TT >::Rep & axpy ( Rep &  r,
const Rep  a,
const Rep  b,
const Rep  c 
) const
inline
void axpy ( const size_t  sz,
Array  r,
Rep  a,
constArray  x,
constArray  y 
) const
inline
void axpy ( const size_t  sz,
Array  r,
Rep  a,
constArray  x,
Rep  c 
) const
inline
GFqDom< TT >::Rep & axpyin ( Rep &  r,
const Rep  a,
const Rep  b 
) const
inline
void axpyin ( const size_t  sz,
Array  r,
Rep  a,
constArray  x 
) const
inline
GFqDom< TT >::Rep & axmy ( Rep &  r,
const Rep  a,
const Rep  b,
const Rep  c 
) const
inline
void axmy ( const size_t  sz,
Array  r,
Rep  a,
constArray  x,
constArray  y 
) const
inline
void axmy ( const size_t  sz,
Array  r,
Rep  a,
constArray  x,
Rep  c 
) const
inline
GFqDom< TT >::Rep & maxpy ( Rep &  r,
const Rep  a,
const Rep  b,
const Rep  c 
) const
inline
GFqDom< TT >::Rep & axmyin ( Rep &  r,
const Rep  a,
const Rep  b 
) const
inline
GFqDom< TT >::Rep & maxpyin ( Rep &  r,
const Rep  a,
const Rep  b 
) const
inline
void maxpyin ( const size_t  sz,
Array  r,
Rep  a,
constArray  x 
) const
inline
void reduceadd ( Rep &  r,
const size_t  sz,
constArray  a 
) const
void reducemul ( Rep &  r,
const size_t  sz,
constArray  a 
) const
GFqDom< TT >::Rep & dotprod ( Rep &  r,
const size_t  sz,
constArray  a,
constArray  b 
) const
inline
GFqDom< TT >::Rep & random ( RandIter &  g,
Rep &  r 
) const
inline
GFqDom< TT >::Rep & random ( RandIter &  g,
Rep &  r,
long  s 
) const
inline
GFqDom< TT >::Rep & random ( RandIter &  g,
Rep &  r,
const Rep &  b 
) const
inline
GFqDom< TT >::Rep & nonzerorandom ( RandIter &  g,
Rep &  r 
) const
inline
GFqDom< TT >::Rep & nonzerorandom ( RandIter &  g,
Rep &  r,
long  s 
) const
inline
GFqDom< TT >::Rep & nonzerorandom ( RandIter &  g,
Rep &  r,
const Rep &  b 
) const
inline
void Init ( )
inlinestatic
void End ( )
inlinestatic

Field Documentation

Rep zero
Rep one
UTT _characteristic
protected
UTT _exponent
protected
UTT _irred
protected
UTT _q
protected
UTT _qm1
protected
UTT _qm1o2
protected
Rep mOne
std::vector<UTT> _log2pol
protected
std::vector<UTT> _pol2log
protected
std::vector<TT> _plus1
protected
double _dcharacteristic
protected

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