2 #ifndef _BPAS_UPOLYNOMIAL_H_ 3 #define _BPAS_UPOLYNOMIAL_H_ 5 #include "BPASPolynomial.hpp" 7 #include "BPASEuclideanPolynomial.hpp" 8 #include "../Ring/BPASField.hpp" 21 template <
class Ring,
class Derived>
22 class BPASUnivariatePolynomial :
public virtual std::conditional<std::is_base_of<BPASField<Ring>, Ring>::value, BPASEuclideanPolynomial<Ring,Derived>, BPASPolynomial<Ring, Derived> >::type
61 virtual Ring
evaluate(
const Ring& r)
const = 0;
81 virtual Derived
monicDivide(
const Derived& d, Derived* q = NULL)
const = 0;
111 virtual Derived
lazyPseudoDivide(
const Derived& d, Derived* q, Ring* h1, Ring* h2)
const = 0;
124 virtual Derived
pseudoDivide(
const Derived& d, Ring* he) = 0;
138 virtual Derived
pseudoDivide(
const Derived& d, Derived* q, Ring* he)
const = 0;
virtual Derived lazyPseudoDivide(const Derived &d, Ring *h1, Ring *h2)=0
Perform a lazy pseudo-divison, also known as sparse pseudo-division.
virtual Derived derivative() const =0
Obtain the derivative of this polynomial.
virtual Symbol variable() const =0
Get the indeterminate of this polynomial.
virtual void setVariableName(const Symbol &sym)=0
Set the indeterminate of this polynomial to be the input symbol.
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 ...
virtual Derived operator>>(int) const =0
Shift this polynomial right i times, that is, divide by x^i, where x is this polynomial's indetermina...
An abstract class defining the interface of a univariate polynomial over an arbitrary BPASRing...
Definition: BPASUnivarPolynomial.hpp:22
virtual Derived monicDivide(const Derived &d)=0
Divide this polynomial by the monic polynomial d, setting this polynomial to be the remainder...
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 indetermin...
virtual Derived & operator>>=(int)=0
Shift this polynomial right i times, that is, divide by x^i, where x is this polynomial's indetermina...
virtual void setCoefficient(int d, const Ring &r)=0
Set the coefficient of the monomial with degree d to be the Ring element r.
An encapsulation of a mathematical symbol.
Definition: Symbol.hpp:23
virtual Ring evaluate(const Ring &r) const =0
Evaluate this polynomial by substituting the input ring element r for the indeterminate.
virtual Derived & operator<<=(int i)=0
Shift this polynomial left i times, that is, multiply by x^i, where x is this polynomial's indetermin...
virtual void differentiate()=0
Differentiate this polynomial, setting itself to its derivative.
virtual Ring coefficient(int d) const =0
Get the coefficient of the monomial with degree d.