|
linbox 1
|
#include <ntl-ZZ_pX.h>
Inherits UnparametricField< K >.
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 CoeffField & | getCoeffField () 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 |
| integer & | characteristic (integer &c) const |
| integer & | cardinality (integer &c) const |
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
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
| 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
Get characteristic of the field - same as characteristic of coefficient field.
Get the cardinality of the field. Since the cardinality is infinite, by convention we return -1.
1.7.4