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

class GFqDom More...

#include <gfq.h>

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

Public Types

typedef GFqDom< TT > Self_t
 
typedef Rep Element
 
typedef ElementElement_ptr
 
typedef const ElementConstElement_ptr
 
typedef UTT Residu_t
 
typedef RepArray
 
typedef const RepconstArray
 
typedef GIV_randIter< GFqDom< TT >, RepRandIter
 

Public Member Functions

UTT zech2padic (UTT x) const
 
UTT padic2zech (UTT x) const
 
 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
 
Integercharacteristic (Integer &p) const
 
uint64_t & characteristic (uint64_t &p) const
 
UTT cardinality () const
 
template<typename T >
T & cardinality (T &p) const
 
UTT size () const
 
UTT exponent () const
 
Repgenerator (Rep &) const
 
UTT generator () const
 
UTT irreducible () const
 
Rep sage_generator () const
 
Rep indeterminate () const
 
Repindeterminate (Rep &) const
 
Repinit (Rep &) const
 
Repinit (Rep &, const int32_t) const
 
Repinit (Rep &, const uint32_t) const
 
Repinit (Rep &, const int64_t) const
 
Repinit (Rep &, const uint64_t) const
 
Repinit (Rep &, const Integer) const
 
Repinit (Rep &, const float) const
 
Repinit (Rep &, const double) const
 
Repinit (Rep &a, std::istream &s) const
 
template<typename val_t , template< class, class > class Vector, template< class > class Alloc>
Repinit (Rep &, const Vector< val_t, Alloc< val_t > > &)
 
Repassign (Rep &, const Integer) const
 
Repassign (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::ostream & write (std::ostream &s, const std::string &) 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
 
int64_t & convert (int64_t &, const Rep) const
 
uint64_t & convert (uint64_t &, const Rep) const
 
int32_t & convert (int32_t &, const Rep) const
 
float & convert (float &, const Rep) const
 
double & convert (double &, const Rep) const
 
uint32_t & convert (uint32_t &, const Rep) const
 
Integerconvert (Integer &, 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 isMOne (const Rep) const
 
bool isunit (const Rep) const
 
size_t length (const Rep) 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
 
Repneg (Rep &r, const Rep a) const
 
Repinv (Rep &r, const Rep a) 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
 
Repnegin (Rep &r) const
 
Repinvin (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
 
Repaxpy (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
 
Repaxpyin (Rep &r, const Rep a, const Rep b) const
 
void axpyin (const size_t sz, Array r, Rep a, constArray x) const
 
Repaxmy (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
 
Repmaxpy (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
 
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
 
Repdotprod (Rep &r, const size_t sz, constArray a, constArray b) const
 
template<class RandIter >
Reprandom (RandIter &g, Rep &r) const
 
template<class RandIter >
Reprandom (RandIter &g, Rep &r, int64_t s) const
 
template<class RandIter >
Reprandom (RandIter &g, Rep &r, const Rep &b) const
 
template<class RandIter >
Repnonzerorandom (RandIter &g, Rep &r) const
 
template<class RandIter >
Repnonzerorandom (RandIter &g, Rep &r, int64_t s) const
 
template<class RandIter >
Repnonzerorandom (RandIter &g, Rep &r, const Rep &b) const
 
template<typename randIter >
GFqDom< TT >::Repnonzerorandom (randIter &g, Rep &a) const
 
template<typename randIter >
GFqDom< TT >::Reprandom (randIter &g, Rep &a) const
 
template<typename randIter >
GFqDom< TT >::Reprandom (randIter &g, Rep &r, int64_t s) const
 
template<typename randIter >
GFqDom< TT >::Reprandom (randIter &g, Rep &r, const Rep &b) const
 
template<typename randIter >
GFqDom< TT >::Repnonzerorandom (randIter &g, Rep &r, int64_t s) const
 
template<typename randIter >
GFqDom< TT >::Repnonzerorandom (randIter &g, Rep &r, const Rep &b) const
 

Static Public Member Functions

static Residu_t maxCardinality ()
 
static Residu_t minCardinality ()
 
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 Attributes

UTT _characteristic
 
UTT _exponent
 
UTT _irred
 
UTT _q
 
UTT _qm1
 
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 Element* Element_ptr
typedef const Element* ConstElement_ptr
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) const
inline
UTT padic2zech ( UTT  x) const
inline
GFqDom<TT>& operator= ( const GFqDom< TT > &  F)
inline
GFqDom< TT >::Residu_t residu ( ) const
inline
GFqDom< TT >::Residu_t characteristic ( ) const
inline
Integer& characteristic ( Integer p) const
inline
uint64_t& characteristic ( uint64_t &  p) const
inline
static Residu_t maxCardinality ( )
inlinestatic
static Residu_t minCardinality ( )
inlinestatic
GFqDom< TT >::Residu_t cardinality ( ) const
inline
T& cardinality ( T &  p) 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 int32_t  Residu 
) const
inline
GFqDom< TT >::Rep & init ( Rep r,
const uint32_t  Residu 
) const
inline
GFqDom< TT >::Rep & init ( Rep r,
const int64_t  Residu 
) const
inline
GFqDom< TT >::Rep & init ( Rep r,
const uint64_t  Residu 
) const
inline
GFqDom< TT >::Rep & init ( Rep r,
const Integer  Residu 
) const
inline
GFqDom< TT >::Rep & init ( Rep r,
const float  Residu 
) const
inline
GFqDom< TT >::Rep & init ( Rep r,
const double  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::ostream & write ( std::ostream &  s,
const std::string &  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
int64_t & convert ( int64_t &  r,
const Rep  a 
) const
inline
uint64_t & convert ( uint64_t &  r,
const Rep  a 
) const
inline
int32_t & convert ( int32_t &  r,
const Rep  a 
) const
inline
float & convert ( float &  r,
const Rep  a 
) const
inline
double & convert ( double &  r,
const Rep  a 
) const
inline
uint32_t & convert ( uint32_t &  r,
const Rep  a 
) const
inline
Integer & convert ( Integer 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 isMOne ( 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
Rep& random ( RandIter g,
Rep r 
) const
Rep& random ( RandIter g,
Rep r,
int64_t  s 
) const
Rep& random ( RandIter g,
Rep r,
const Rep b 
) const
Rep& nonzerorandom ( RandIter g,
Rep r 
) const
Rep& nonzerorandom ( RandIter g,
Rep r,
int64_t  s 
) const
Rep& nonzerorandom ( RandIter g,
Rep r,
const Rep b 
) const
void Init ( )
inlinestatic
void End ( )
inlinestatic
GFqDom<TT>::Rep& nonzerorandom ( randIter &  g,
Rep a 
) const
inline
GFqDom<TT>::Rep& random ( randIter &  g,
Rep a 
) const
inline
GFqDom<TT>::Rep& random ( randIter &  g,
Rep r,
int64_t  s 
) const
inline
GFqDom<TT>::Rep& random ( randIter &  g,
Rep r,
const Rep b 
) const
inline
GFqDom<TT>::Rep& nonzerorandom ( randIter &  g,
Rep r,
int64_t  s 
) const
inline
GFqDom<TT>::Rep& nonzerorandom ( randIter &  g,
Rep r,
const Rep b 
) const
inline

Field Documentation

Rep zero
Rep one
Rep mOne
UTT _characteristic
protected
UTT _exponent
protected
UTT _irred
protected
UTT _q
protected
UTT _qm1
protected
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: