linbox  1
Public Member Functions
NTL_zz_pX Class Reference

#include <ntl-lzz_pX.h>

Inherits UnparametricField< K >.

List of all members.

Public Member Functions

 NTL_zz_pX (const integer &p, size_t e=1)
 NTL_zz_pX (CoeffField cf)
template<class ANY >
Element & init (Element &p, const ANY &y) const
Element & init (Element &p, const Coeff &y) const
template<class ANY >
Element & init (Element &p, const std::vector< ANY > &v) const
Element & init (Element &p, const std::vector< Coeff > &v) const
template<class ANY >
std::vector< ANY > & convert (std::vector< ANY > &v, const Element &p) const
std::vector< Coeff > & convert (std::vector< Coeff > &v, const Element &p) const
bool isZero (const Element &x) const
bool isOne (const Element &x) const
const CoeffFieldgetCoeffField () const
size_t deg (const Element &p) const
Element & rev (Element &r, const Element &p)
Element & revin (Element &r)
Coeff & leadCoeff (Coeff &c, const Element &p) const
Coeff & getCoeff (Coeff &c, const Element &p, size_t i) const
Element & setCoeff (Element &p, size_t i, const Coeff &c) const
Element & quo (Element &res, const Element &a, const Element &b) const
Element & quoin (Element &a, const Element &b) const
Element & rem (Element &res, const Element &a, const Element &b) const
Element & remin (Element &a, const Element &b) const
void quorem (Element &q, Element &r, const Element &a, const Element &b) const
integercharacteristic (integer &c) const
integercardinality (integer &c) const
- Public Member Functions inherited from UnparametricField< K >
template<>
NTL::zz_p & init (NTL::zz_p &x, const integer &y) const
template<>
integerconvert (integer &x, const NTL::zz_p &y) const
template<>
integercardinality (integer &c) const
template<>
integercharacteristic (integer &c) const
template<>
NTL::zz_p & inv (NTL::zz_p &x, const NTL::zz_p &y) const
template<>
bool isZero (const NTL::zz_p &x) const
template<>
bool isOne (const NTL::zz_p &x) const
template<>
NTL::zz_p & invin (NTL::zz_p &x) const
template<>
std::ostream & write (std::ostream &os) const
template<>
std::ostream & write (std::ostream &os) const
template<>
std::ostream & write (std::ostream &os) const
 UnparametricField (integer q=0, size_t e=1)
 UnparametricField (const UnparametricField &F)
 construct this field as copy of F.
 ~UnparametricField ()
const UnparametricField & operator= (const UnparametricField &F) const
Element & init (Element &x, const integer &y=0) const
 x := y. Caution: it is via cast to long. Good candidate for specialization.
integerconvert (integer &x, const Element &y) const
 x := y. Caution: it is via cast to long. Good candidate for specialization.
double & convert (double &x, const Element &y) const
 x := y. Caution: it is via cast to long. Good candidate for specialization. –dpritcha
Element & assign (Element &x, const Element &y) const
integercardinality (integer &c) const
 c := cardinality of this field (-1 if infinite).
integercharacteristic (integer &c) const
 c := characteristic of this field (zero or prime).
bool areEqual (const Element &x, const Element &y) const
 x == y
bool isZero (const Element &x) const
 x == 0
bool isOne (const Element &x) const
 x == 1
Element & add (Element &x, const Element &y, const Element &z) const
 x := y + z
Element & sub (Element &x, const Element &y, const Element &z) const
 x := y - z
Element & mul (Element &x, const Element &y, const Element &z) const
 x := y*z
Element & div (Element &x, const Element &y, const Element &z) const
 x := y/z
Element & neg (Element &x, const Element &y) const
 x := -y
Element & inv (Element &x, const Element &y) const
 x := 1/y
Element & axpy (Element &z, const Element &a, const Element &x, const Element &y) const
 z := a*x + y
Element & addin (Element &x, const Element &y) const
 x := x + y
Element & subin (Element &x, const Element &y) const
 x := x - y
Element & mulin (Element &x, const Element &y) const
 x := x*y
Element & divin (Element &x, const Element &y) const
 x := x/y
Element & negin (Element &x) const
 x := -x
Element & invin (Element &x) const
 x := 1/x
Element & axpyin (Element &y, const Element &a, const Element &x) const
 y := a*x + y
std::ostream & write (std::ostream &os) const
std::istream & read (std::istream &is) const
std::ostream & write (std::ostream &os, const Element &x) const
std::istream & read (std::istream &is, Element &x) const
 UnparametricField (const K &A)
 Default constructor.
const K & operator() (void) const
K & operator() (void)
template<>
NTL::RR & init (NTL::RR &x, const integer &y) const
template<>
integerconvert (integer &x, const NTL::RR &y) const
template<>
NTL::RR & inv (NTL::RR &x, const NTL::RR &y) const
template<>
bool isZero (const NTL::RR &x) const
template<>
bool isOne (const NTL::RR &x) const
template<>
NTL::RR & invin (NTL::RR &x) const
template<>
std::ostream & write (std::ostream &os) const
template<>
 UnparametricField (integer q, size_t e)
template<>
NTL::ZZ_p & init (NTL::ZZ_p &x, const integer &y) const
template<>
integerconvert (integer &x, const NTL::ZZ_p &y) const
template<>
integercardinality (integer &c) const
template<>
integercharacteristic (integer &c) const
template<>
NTL::ZZ_p & inv (NTL::ZZ_p &x, const NTL::ZZ_p &y) const
template<>
bool isZero (const NTL::ZZ_p &x) const
template<>
bool isOne (const NTL::ZZ_p &x) const
template<>
NTL::ZZ_p & invin (NTL::ZZ_p &x) const
template<>
std::ostream & write (std::ostream &os) const

Additional Inherited Members

- Public Types inherited from UnparametricField< K >
typedef K Element
typedef UnparametricRandIter< K > RandIter
 Type of random field element generators.

Detailed Description

Ring (in fact, a unique factorization domain) of polynomial with coefficients in class NTL_zz_p (integers mod a wordsize prime). All the same functions as any other ring, with the addition of: Coeff (type), CoeffField (type), getCoeffField, setCoeff, getCoeff, leadCoeff, deg


Constructor & Destructor Documentation

NTL_zz_pX ( const integer p,
size_t  e = 1 
)
inline

Standard LinBox field constructor. The paramters here (prime, exponent) are only used to initialize the coefficient field.

NTL_zz_pX ( CoeffField  cf)
inline

Constructor from a coefficient field


Member Function Documentation

Element& init ( Element &  p,
const ANY &  y 
) const
inline

Initialize p to the constant y (p = y*x^0)

Element& init ( Element &  p,
const Coeff &  y 
) const
inline

Initialize p to the constant y (p = y*x^0)

Element& init ( Element &  p,
const std::vector< ANY > &  v 
) const
inline

Initialize p from a vector of coefficients. The vector should be ordered the same way NTL does it: the front of the vector corresponds to the trailing coefficients, and the back of the vector corresponds to the leading coefficients. That is, v[i] = coefficient of x^i.

Element& init ( Element &  p,
const std::vector< Coeff > &  v 
) const
inline

Initialize p from a vector of coefficients. The vector should be ordered the same way NTL does it: the front of the vector corresponds to the trailing coefficients, and the back of the vector corresponds to the leading coefficients. That is, v[i] = coefficient of x^i.

std::vector<ANY>& convert ( std::vector< ANY > &  v,
const Element &  p 
) const
inline

Convert p to a vector of coefficients. The vector will be ordered the same way NTL does it: the front of the vector corresponds to the trailing coefficients, and the back of the vector corresponds to the leading coefficients. That is, v[i] = coefficient of x^i.

std::vector<Coeff>& convert ( std::vector< Coeff > &  v,
const Element &  p 
) const
inline

Convert p to a vector of coefficients. The vector will be ordered the same way NTL does it: the front of the vector corresponds to the trailing coefficients, and the back of the vector corresponds to the leading coefficients. That is, v[i] = coefficient of x^i.

bool isZero ( const Element &  x) const
inline

Test if an element equals zero

bool isOne ( const Element &  x) const
inline

Test if an element equals one

const CoeffField& getCoeffField ( ) const
inline

The LinBox field for coefficients

size_t deg ( const Element &  p) const
inline

Get the degree of a polynomial Unlike NTL, deg(0)=0.

Element& rev ( Element &  r,
const Element &  p 
)
inline

r will be set to the reverse of p.

Element& revin ( Element &  r)
inline

r is itself reversed.

Coeff& leadCoeff ( Coeff &  c,
const Element &  p 
) const
inline

Get the leading coefficient of this polynomial.

Coeff& getCoeff ( Coeff &  c,
const Element &  p,
size_t  i 
) const
inline

Get the coefficient of x^i in a given polynomial

Element& setCoeff ( Element &  p,
size_t  i,
const Coeff &  c 
) const
inline

Set the coefficient of x^i in a given polynomial

Element& quo ( Element &  res,
const Element &  a,
const Element &  b 
) const
inline

Get the quotient of two polynomials

Element& quoin ( Element &  a,
const Element &  b 
) const
inline

a = quotient of a, b

Element& rem ( Element &  res,
const Element &  a,
const Element &  b 
) const
inline

Get the remainder under polynomial division

Element& remin ( Element &  a,
const Element &  b 
) const
inline

a = remainder of a,b

void quorem ( Element &  q,
Element &  r,
const Element &  a,
const Element &  b 
) const
inline

Get the quotient and remainder under polynomial division

integer& characteristic ( integer c) const
inline

Get characteristic of the field - same as characteristic of coefficient field.

integer& cardinality ( integer c) const
inline

Get the cardinality of the field. Since the cardinality is infinite, by convention we return -1.


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