|
linbox
|
long ints modulo a positive integer. More...
#include <ntl-lzz_p.h>
Inheritance diagram for NTL_zz_p:Public Types | |
| typedef NTL::zz_p | Element |
| typedef Givaro::UnparametricOperations< Element > | Father_t |
| typedef UnparametricRandIter< NTL::zz_p > | RandIter |
Public Member Functions | |
| NTL_zz_p (integer p, size_t e=1) | |
| NTL_zz_p () | |
| Element & | init (Element &x) const |
| Element & | init (Element &x, const double &y) const |
| Element & | init (Element &x, const integer &y) const |
| Element & | init (Element &x, const NTL::zz_p &y) const |
| template<class ANY> | |
| ANY & | convert (ANY &x, const Element &y) const |
| Element & | pow (Element &res, const Element &x, long exp) const |
| Element & | powin (Element &x, long exp) const |
| template<typename Residu_t> | |
| Residu_t & | cardinality (Residu_t &c) const |
| Cardinality. | |
| integer | cardinality () const |
| template<typename Residu_t> | |
| Residu_t & | characteristic (Residu_t &c) const |
| Characteristic. | |
| integer | characteristic () const |
| Element & | inv (Element &x, const Element &y) const |
| Multiplicative Inverse. | |
| bool | isZero (const Element &x) const |
| Zero equality. | |
| bool | isOne (const Element &x) const |
| One equality. | |
| bool | isUnit (const Element &x) const |
| Unit test. | |
| bool | isMOne (const Element &x) const |
| MOne equality. | |
| Element & | invin (Element &x) const |
| Inplace Multiplicative Inverse. | |
| std::ostream & | write (std::ostream &os) const |
| Print field. | |
| std::ostream & | write (std::ostream &os, const std::string &) const |
| std::ostream & | write (std::ostream &os, const Element &x) const |
Static Public Member Functions | |
| static integer | maxCardinality () |
Data Fields | |
| const Element | zero |
| const Element | one |
| const Element | mOne |
long ints modulo a positive integer.
While NTL allows any int to serve as the modulus, only prime moduli yield fields. The primality of the modulus will not be checked, so it is the programmer's responsibility to supply a prime modulus if a field is wanted. These specializations allow the Givaro::ZRing template class to be used to wrap NTL's zz_p class as a LinBox field. Uses nice trick for mod p via floating point.
| typedef NTL::zz_p Element |
| typedef UnparametricRandIter<NTL::zz_p> RandIter |
|
inline |
|
inline |
|
inlinestatic |
|
inline |
Cardinality.
Return integer representing cardinality of the field. Returns the modulus of the field, which should be prime.
|
inline |
|
inline |
Characteristic.
Return integer representing characteristic of the field. Returns the modulus of the field, which should be prime.
|
inline |
Multiplicative Inverse.
x = 1 / y This function assumes both field elements have already been constructed and initialized.
| x | field element (reference returned). |
| y | field element. |
|
inline |
Zero equality.
Test if field element is equal to zero. This function assumes the field element has already been constructed and initialized. In this specialization, NTL's IsZero function is called.
| x | field element. |
|
inline |
One equality.
Test if field element is equal to one. This function assumes the field element has already been constructed and initialized. In this specialization, NTL's IsOne function is called.
| x | field element. |
|
inline |
Unit test.
Test if field element is invertible. This function assumes the field element has already been constructed and initialized.
| x | field element. |
|
inline |
MOne equality.
Test if field element is equal to one. This function assumes the field element has already been constructed and initialized. In this specialization, NTL's IsMOne function is called.
| x | field element. |
Inplace Multiplicative Inverse.
x = 1 / x This function assumes both field elements have already been constructed and initialized.
| x | field element (reference returned). |
|
inline |
Print field.
| os | output stream to which field is written. |
|
inline |
|
inline |
| const Element zero |
| const Element one |
| const Element mOne |