An abstract class defining the interface of a univariate polynomial over an arbitrary BPASRing.
More...
|
virtual void | differentiate ()=0 |
| Differentiate this polynomial, setting itself to its derivative.
|
|
virtual void | differentiate (int k)=0 |
| Differentiate this polynomial k times, setting itself to the final derivative. More...
|
|
virtual Derived | derivative () const =0 |
| Obtain the derivative of this polynomial. More...
|
|
virtual Derived | derivative (int) const =0 |
| Obtain the kth derivative of this polynomial. More...
|
|
virtual Ring | evaluate (const Ring &r) const =0 |
| Evaluate this polynomial by substituting the input ring element r for the indeterminate. More...
|
|
virtual Derived | monicDivide (const Derived &d)=0 |
| Divide this polynomial by the monic polynomial d, setting this polynomial to be the remainder. More...
|
|
virtual Derived | monicDivide (const Derived &d, Derived *q=NULL) const =0 |
| Divide this polynomial by the monic polynomial d. More...
|
|
virtual Derived | lazyPseudoDivide (const Derived &d, Ring *h1, Ring *h2)=0 |
| Perform a lazy pseudo-divison, also known as sparse pseudo-division. More...
|
|
virtual Derived | lazyPseudoDivide (const Derived &d, Derived *q, Ring *h1, Ring *h2) const =0 |
| Perform a lazy pseudo-divison, also known as sparse pseudo-division. More...
|
|
virtual Derived | pseudoDivide (const Derived &d, Ring *he)=0 |
| Perform a pseudo-divison, specifically, determine q and r, as in division, but satisfying h^e * this = q*d + r, where h is the leading coefficient of d and e is a positive integer equal to deg(this) - deg(d) + 1 Return the quotient and this becomes the remainder. More...
|
|
virtual Derived | pseudoDivide (const Derived &d, Derived *q, Ring *he) const =0 |
| Perform a pseudo-divison, specifically, determine q and r, as in division, but satisfying h^e * this = q*d + r, where h is the leading coefficient of d and e is a positive integer equal to deg(this) - deg(d) + 1 Return the quotient and this becomes the remainder. More...
|
|
virtual Ring | coefficient (int d) const =0 |
| Get the coefficient of the monomial with degree d. More...
|
|
virtual void | setCoefficient (int d, const Ring &r)=0 |
| Set the coefficient of the monomial with degree d to be the Ring element r. More...
|
|
virtual void | setVariableName (const Symbol &sym)=0 |
| Set the indeterminate of this polynomial to be the input symbol. More...
|
|
virtual Symbol | variable () const =0 |
| Get the indeterminate of this polynomial. More...
|
|
virtual Derived | operator<< (int i) const =0 |
| Shift this polynomial left i times, that is, multiply by x^i, where x is this polynomial's indeterminate. More...
|
|
virtual Derived & | operator<<= (int i)=0 |
| Shift this polynomial left i times, that is, multiply by x^i, where x is this polynomial's indeterminate, and set this polynomial to the result. More...
|
|
virtual Derived | operator>> (int) const =0 |
| Shift this polynomial right i times, that is, divide by x^i, where x is this polynomial's indeterminate,. More...
|
|
virtual Derived & | operator>>= (int)=0 |
| Shift this polynomial right i times, that is, divide by x^i, where x is this polynomial's indeterminate, and set this polynomial to the result. More...
|
|
template<class Ring, class Derived>
class BPASUnivariatePolynomial< Ring, Derived >
An abstract class defining the interface of a univariate polynomial over an arbitrary BPASRing.
Depending on the specialization of the template Ring parameter, this class might form a Euclidean domain, and if so, fulfills the Euclidean domain interface also.
Derived should be the conrete class being implemented, following the Curiously Recurring Template Pattern.
template<class Ring, class Derived>
Perform a lazy pseudo-divison, also known as sparse pseudo-division.
Specifically, determine q and r, as in division, but satisfying h^e * this = q*d + r, where h is the leading coefficient of d and e is a positive integer equal to the number of division steps performed. Return the quotient and this becomes the remainder.
- Parameters
-
| d | the divisor. |
[out] | h1 | The leading coefficient of b to the power e |
[out] | h2 | h to the power deg(a) - deg(b) + 1 - e |
- Returns
- the quotient.
Implemented in SparseUnivariateTempPoly< Ring, Derived >, SparseUnivariateTempPoly< Field, Derived >, DenseUnivariatePolynomial< Field >, DenseUnivariateIntegerPolynomial, and DenseUnivariateRationalPolynomial.
template<class Ring, class Derived>
virtual Derived BPASUnivariatePolynomial< Ring, Derived >::lazyPseudoDivide |
( |
const Derived & |
d, |
|
|
Derived * |
q, |
|
|
Ring * |
h1, |
|
|
Ring * |
h2 |
|
) |
| const |
|
pure virtual |
Perform a lazy pseudo-divison, also known as sparse pseudo-division.
Specifically, determine q and r, as in division, but satisfying h^e * this = q*d + r, where h is the leading coefficient of d and e is a positive integer equal to the number of division steps performed. Return the quotient and this becomes the remainder.
- Parameters
-
| d | the divisor. |
[out] | q | a pointer to the quotient to output. |
[out] | h1 | The leading coefficient of b to the power e |
[out] | h2 | h to the power deg(this) - deg(d) + 1 - e |
- Returns
- the remainder.
Implemented in SparseUnivariateTempPoly< Ring, Derived >, SparseUnivariateTempPoly< Field, Derived >, DenseUnivariatePolynomial< Field >, DenseUnivariateIntegerPolynomial, and DenseUnivariateRationalPolynomial.
template<class Ring, class Derived>
Perform a pseudo-divison, specifically, determine q and r, as in division, but satisfying h^e * this = q*d + r, where h is the leading coefficient of d and e is a positive integer equal to deg(this) - deg(d) + 1 Return the quotient and this becomes the remainder.
- Parameters
-
| d | the divisor. |
[out] | he | h to the power deg(this) - deg(d) + 1 |
- Returns
- the quotient.
Implemented in SparseUnivariateTempPoly< Ring, Derived >, SparseUnivariateTempPoly< Field, Derived >, DenseUnivariatePolynomial< Field >, DenseUnivariateIntegerPolynomial, and DenseUnivariateRationalPolynomial.
template<class Ring, class Derived>
virtual Derived BPASUnivariatePolynomial< Ring, Derived >::pseudoDivide |
( |
const Derived & |
d, |
|
|
Derived * |
q, |
|
|
Ring * |
he |
|
) |
| const |
|
pure virtual |
Perform a pseudo-divison, specifically, determine q and r, as in division, but satisfying h^e * this = q*d + r, where h is the leading coefficient of d and e is a positive integer equal to deg(this) - deg(d) + 1 Return the quotient and this becomes the remainder.
- Parameters
-
| d | the divisor. |
[out] | q | a pointer to the quotient to output. |
[out] | he | h to the power deg(this) - deg(d) + 1 |
- Returns
- the remainder.
Implemented in SparseUnivariateTempPoly< Ring, Derived >, SparseUnivariateTempPoly< Field, Derived >, DenseUnivariatePolynomial< Field >, DenseUnivariateIntegerPolynomial, and DenseUnivariateRationalPolynomial.