Basic Polynomial Algebra Subprograms (BPAS)  v. 1.791
Public Member Functions | Static Public Attributes | Friends | List of all members
DenseUnivariateIntegerPolynomial Class Reference

A univariate polynomial with Integer coefficients using a dense representation. More...

#include <uzpolynomial.h>

Simplified semantic inheritance diagram for DenseUnivariateIntegerPolynomial:
- Full inheritance diagram for DenseUnivariateIntegerPolynomial:
[legend]

Public Member Functions

 DenseUnivariateIntegerPolynomial ()
 Construct a polynomial. More...
 
 DenseUnivariateIntegerPolynomial (int s)
 Construct a polynomial with degree. More...
 
 DenseUnivariateIntegerPolynomial (const Integer &e)
 Construct a polynomial with a coeffient. More...
 
 DenseUnivariateIntegerPolynomial (const RationalNumber &e)
 
 DenseUnivariateIntegerPolynomial (const DenseUnivariateIntegerPolynomial &b)
 Copy constructor. More...
 
 ~DenseUnivariateIntegerPolynomial ()
 Destroy the polynomial. More...
 
Integer degree () const
 Get degree of the polynomial. More...
 
Integer leadingCoefficient () const
 Get the leading coefficient. More...
 
Integer trailingCoefficient () const
 
Integer numberOfTerms () const
 
mpz_class * coefficients (int k=0) const
 Get coefficients of the polynomial, given start offset. More...
 
Integer coefficient (int k) const
 Get a coefficient of the polynomial. More...
 
void setCoefficient (int k, const mpz_class value)
 Set a coefficient of the polynomial. More...
 
void setCoefficient (int k, const Integer &value)
 Set the coefficient of the monomial with degree d to be the Ring element r. More...
 
void setCoefficient (int k, const int value)
 
void setCoefficient (Integer k, const Integer &value)
 Set a coefficient of the polynomial. More...
 
Symbol variable () const
 Get variable's name. More...
 
void setVariableName (const Symbol &x)
 Set variable's name. More...
 
DenseUnivariateIntegerPolynomialoperator= (const DenseUnivariateIntegerPolynomial &b)
 Overload operator =. More...
 
DenseUnivariateIntegerPolynomialoperator= (const Integer &i)
 
bool operator!= (const DenseUnivariateIntegerPolynomial &b) const
 Overload operator !=. More...
 
bool operator== (const DenseUnivariateIntegerPolynomial &b) const
 Overload operator ==. More...
 
bool isZero () const
 Is zero polynomial. More...
 
void zero ()
 Zero polynomial. More...
 
bool isOne () const
 Is polynomial a constatn 1. More...
 
void one ()
 Set polynomial to 1. More...
 
bool isNegativeOne () const
 Is polynomial a constatn -1. More...
 
void negativeOne ()
 Set polynomial to -1. More...
 
int isConstant () const
 Is a constant. More...
 
DenseUnivariateIntegerPolynomial unitCanonical (DenseUnivariateIntegerPolynomial *u=NULL, DenseUnivariateIntegerPolynomial *v=NULL) const
 Obtain the unit normal (a.k.a canonical associate) of an element. More...
 
Integer content () const
 Content of the polynomial. More...
 
DenseUnivariateIntegerPolynomial primitivePart () const
 
bool isConstantTermZero () const
 Is the least signficant coefficient zero. More...
 
DenseUnivariateIntegerPolynomial operator^ (long long int e) const
 Overload operator ^ replace xor operation by exponentiation. More...
 
DenseUnivariateIntegerPolynomialoperator^= (long long int e)
 Overload operator ^= replace xor operation by exponentiation. More...
 
DenseUnivariateIntegerPolynomial operator<< (int k) const
 Overload operator << replace by muplitying x^k. More...
 
DenseUnivariateIntegerPolynomialoperator<<= (int k)
 Overload operator << replace by muplitying x^k. More...
 
DenseUnivariateIntegerPolynomial operator>> (int k) const
 Overload operator >> replace by dividing x^k, and return the quotient. More...
 
DenseUnivariateIntegerPolynomialoperator>>= (int k)
 Overload operator >>= replace by dividing x^k, and return the quotient. More...
 
DenseUnivariateIntegerPolynomial operator+ (const DenseUnivariateIntegerPolynomial &b) const
 Overload operator +. More...
 
DenseUnivariateIntegerPolynomialoperator+= (const DenseUnivariateIntegerPolynomial &b)
 Overload Operator +=. More...
 
void add (const DenseUnivariateIntegerPolynomial &b)
 Add another polynomial to itself. More...
 
DenseUnivariateIntegerPolynomial operator+ (const Integer &c) const
 Overload Operator +. More...
 
DenseUnivariateIntegerPolynomial operator+ (const mpz_class &c) const
 
DenseUnivariateIntegerPolynomial operator+ (int c) const
 
DenseUnivariateIntegerPolynomialoperator+= (const Integer &c)
 Overload Operator +=. More...
 
DenseUnivariateIntegerPolynomialoperator+= (const mpz_class &c)
 
DenseUnivariateIntegerPolynomialoperator+= (int c)
 
DenseUnivariateIntegerPolynomial operator- (const DenseUnivariateIntegerPolynomial &b) const
 Subtract another polynomial. More...
 
DenseUnivariateIntegerPolynomialoperator-= (const DenseUnivariateIntegerPolynomial &b)
 Overload operator -=. More...
 
DenseUnivariateIntegerPolynomial operator- () const
 Overload operator -, negate. More...
 
void negate ()
 Compute -f(x) More...
 
void subtract (const DenseUnivariateIntegerPolynomial &b)
 Subtract another polynomial from itself. More...
 
DenseUnivariateIntegerPolynomial operator- (const Integer &c) const
 Overload operator -. More...
 
DenseUnivariateIntegerPolynomial operator- (const mpz_class &c) const
 
DenseUnivariateIntegerPolynomial operator- (int c) const
 
DenseUnivariateIntegerPolynomialoperator-= (const Integer &c)
 Overload operator -=. More...
 
DenseUnivariateIntegerPolynomialoperator-= (const mpz_class &c)
 
DenseUnivariateIntegerPolynomialoperator-= (int c)
 
DenseUnivariateIntegerPolynomial operator* (const DenseUnivariateIntegerPolynomial &b) const
 Multiply to another polynomial. More...
 
DenseUnivariateIntegerPolynomialoperator*= (const DenseUnivariateIntegerPolynomial &b)
 Overload operator *=. More...
 
DenseUnivariateIntegerPolynomial operator* (const Integer &e) const
 Overload operator *. More...
 
DenseUnivariateIntegerPolynomial operator* (const mpz_class &e) const
 
DenseUnivariateIntegerPolynomial operator* (int e) const
 
DenseUnivariateIntegerPolynomialoperator*= (const Integer &e)
 Overload operator *=. More...
 
DenseUnivariateIntegerPolynomialoperator*= (const mpz_class &e)
 
DenseUnivariateIntegerPolynomialoperator*= (int e)
 Overload operator *=. More...
 
DenseUnivariateIntegerPolynomial operator/ (const DenseUnivariateIntegerPolynomial &b) const
 Overload operator / ExactDivision. More...
 
DenseUnivariateIntegerPolynomialoperator/= (const DenseUnivariateIntegerPolynomial &b)
 Overload operator /= ExactDivision. More...
 
DenseUnivariateIntegerPolynomial operator/ (const Integer &e) const
 Overload operator /. More...
 
DenseUnivariateIntegerPolynomial operator/ (const mpz_class &e) const
 
DenseUnivariateIntegerPolynomial operator/ (int e) const
 
DenseUnivariateIntegerPolynomialoperator/= (const Integer &e)
 Overload operator /=. More...
 
DenseUnivariateIntegerPolynomialoperator/= (const mpz_class &e)
 
DenseUnivariateIntegerPolynomialoperator/= (int e)
 
DenseUnivariateIntegerPolynomial monicDivide (const DenseUnivariateIntegerPolynomial &b)
 Monic division Return quotient and itself become the remainder. More...
 
DenseUnivariateIntegerPolynomial monicDivide (const DenseUnivariateIntegerPolynomial &b, DenseUnivariateIntegerPolynomial *rem) const
 Monic division Return quotient. More...
 
DenseUnivariateIntegerPolynomial lazyPseudoDivide (const DenseUnivariateIntegerPolynomial &b, Integer *c, Integer *d=NULL)
 Lazy pseudo dividsion Return the quotient and itself becomes remainder e is the exact number of division steps. More...
 
DenseUnivariateIntegerPolynomial lazyPseudoDivide (const DenseUnivariateIntegerPolynomial &b, DenseUnivariateIntegerPolynomial *rem, Integer *c, Integer *d) const
 Lazy pseudo dividsion Return the quotient e is the exact number of division steps. More...
 
DenseUnivariateIntegerPolynomial pseudoDivide (const DenseUnivariateIntegerPolynomial &b, Integer *d=NULL)
 Pseudo dividsion Return the quotient and itself becomes remainder. More...
 
DenseUnivariateIntegerPolynomial pseudoDivide (const DenseUnivariateIntegerPolynomial &b, DenseUnivariateIntegerPolynomial *rem, Integer *d) const
 Pseudo dividsion Return the quotient. More...
 
DenseUnivariateIntegerPolynomial gcd (const DenseUnivariateIntegerPolynomial &q, int type) const
 GCD(p, q) More...
 
DenseUnivariateIntegerPolynomial gcd (const DenseUnivariateIntegerPolynomial &q) const
 
void differentiate (int k)
 Convert current object to its k-th derivative. More...
 
void differentiate ()
 Convert current object to its derivative. More...
 
DenseUnivariateIntegerPolynomial derivative (int k) const
 Return k-th derivative. More...
 
DenseUnivariateIntegerPolynomial derivative () const
 Compute derivative. More...
 
void integrate ()
 Convert current object to its integral with constant of integration 0. More...
 
DenseUnivariateIntegerPolynomial integral ()
 Compute integral with constant of integration 0. More...
 
Integer evaluate (const Integer &x) const
 /** Evaluate f(x) More...
 
Factors< DenseUnivariateIntegerPolynomialsquareFree () const
 Square free. More...
 
void print (std::ostream &out) const
 Overload stream operator <<. More...
 
ExpressionTree convertToExpressionTree () const
 Convert this DUZP into an expression tree.
 

Static Public Attributes

static mpz_class characteristic
 

Friends

DenseUnivariateIntegerPolynomial operator+ (const mpz_class &c, const DenseUnivariateIntegerPolynomial &p)
 
DenseUnivariateIntegerPolynomial operator+ (int c, const DenseUnivariateIntegerPolynomial &p)
 
DenseUnivariateIntegerPolynomial operator- (const mpz_class &c, const DenseUnivariateIntegerPolynomial &p)
 
DenseUnivariateIntegerPolynomial operator- (int c, const DenseUnivariateIntegerPolynomial &p)
 
DenseUnivariateIntegerPolynomial operator* (const mpz_class &e, const DenseUnivariateIntegerPolynomial &p)
 
DenseUnivariateIntegerPolynomial operator* (int e, const DenseUnivariateIntegerPolynomial &p)
 
DenseUnivariateIntegerPolynomial operator/ (const mpz_class &e, const DenseUnivariateIntegerPolynomial &p)
 

Detailed Description

A univariate polynomial with Integer coefficients using a dense representation.

This representation stores all possible coefficients, up to a maximum degree, even if they are zero.

Constructor & Destructor Documentation

◆ DenseUnivariateIntegerPolynomial() [1/4]

DenseUnivariateIntegerPolynomial::DenseUnivariateIntegerPolynomial ( )
inline

Construct a polynomial.

Parameters
d

◆ DenseUnivariateIntegerPolynomial() [2/4]

DenseUnivariateIntegerPolynomial::DenseUnivariateIntegerPolynomial ( int  s)
inline

Construct a polynomial with degree.

Parameters
dSize of the polynomial

◆ DenseUnivariateIntegerPolynomial() [3/4]

DenseUnivariateIntegerPolynomial::DenseUnivariateIntegerPolynomial ( const Integer e)
inline

Construct a polynomial with a coeffient.

Parameters
eThe coefficient

◆ DenseUnivariateIntegerPolynomial() [4/4]

DenseUnivariateIntegerPolynomial::DenseUnivariateIntegerPolynomial ( const DenseUnivariateIntegerPolynomial b)
inline

Copy constructor.

Parameters
bA densed univariate rationl polynomial

◆ ~DenseUnivariateIntegerPolynomial()

DenseUnivariateIntegerPolynomial::~DenseUnivariateIntegerPolynomial ( )
inline

Destroy the polynomial.

Parameters

Member Function Documentation

◆ add()

void DenseUnivariateIntegerPolynomial::add ( const DenseUnivariateIntegerPolynomial b)

Add another polynomial to itself.

Parameters
bA univariate integer polynomial

◆ coefficient()

Integer DenseUnivariateIntegerPolynomial::coefficient ( int  k) const
inlinevirtual

Get a coefficient of the polynomial.

Parameters
kOffset

Implements BPASUnivariatePolynomial< Integer, DenseUnivariateIntegerPolynomial >.

◆ coefficients()

mpz_class* DenseUnivariateIntegerPolynomial::coefficients ( int  k = 0) const
inline

Get coefficients of the polynomial, given start offset.

Parameters
kOffset

◆ content()

Integer DenseUnivariateIntegerPolynomial::content ( ) const
inline

Content of the polynomial.

Parameters

◆ degree()

Integer DenseUnivariateIntegerPolynomial::degree ( ) const
inline

Get degree of the polynomial.

Parameters

◆ derivative() [1/2]

DenseUnivariateIntegerPolynomial DenseUnivariateIntegerPolynomial::derivative ( int  k) const
inlinevirtual

Return k-th derivative.

Parameters
kOrder of the k-th derivative, k > 0

Implements BPASUnivariatePolynomial< Integer, DenseUnivariateIntegerPolynomial >.

◆ derivative() [2/2]

DenseUnivariateIntegerPolynomial DenseUnivariateIntegerPolynomial::derivative ( ) const
inlinevirtual

◆ differentiate() [1/2]

void DenseUnivariateIntegerPolynomial::differentiate ( int  k)
virtual

Convert current object to its k-th derivative.

Parameters
kOrder of the derivative, k > 0

Implements BPASUnivariatePolynomial< Integer, DenseUnivariateIntegerPolynomial >.

◆ differentiate() [2/2]

void DenseUnivariateIntegerPolynomial::differentiate ( )
inlinevirtual

Convert current object to its derivative.

Implements BPASUnivariatePolynomial< Integer, DenseUnivariateIntegerPolynomial >.

◆ evaluate()

Integer DenseUnivariateIntegerPolynomial::evaluate ( const Integer x) const
virtual

/** Evaluate f(x)

Parameters
xEvaluation point Evaluate f(x)
xEvaluation point

Implements BPASUnivariatePolynomial< Integer, DenseUnivariateIntegerPolynomial >.

◆ gcd()

DenseUnivariateIntegerPolynomial DenseUnivariateIntegerPolynomial::gcd ( const DenseUnivariateIntegerPolynomial q,
int  type 
) const

GCD(p, q)

Parameters
qThe other polynomial

◆ integral()

DenseUnivariateIntegerPolynomial DenseUnivariateIntegerPolynomial::integral ( )
inline

Compute integral with constant of integration 0.

◆ integrate()

void DenseUnivariateIntegerPolynomial::integrate ( )

Convert current object to its integral with constant of integration 0.

◆ isConstant()

int DenseUnivariateIntegerPolynomial::isConstant ( ) const
inline

Is a constant.

Parameters

◆ isConstantTermZero()

bool DenseUnivariateIntegerPolynomial::isConstantTermZero ( ) const
inline

Is the least signficant coefficient zero.

Parameters

◆ isNegativeOne()

bool DenseUnivariateIntegerPolynomial::isNegativeOne ( ) const
inline

Is polynomial a constatn -1.

Parameters

◆ isOne()

bool DenseUnivariateIntegerPolynomial::isOne ( ) const
inline

Is polynomial a constatn 1.

Parameters

◆ isZero()

bool DenseUnivariateIntegerPolynomial::isZero ( ) const
inline

Is zero polynomial.

Parameters

◆ lazyPseudoDivide() [1/2]

DenseUnivariateIntegerPolynomial DenseUnivariateIntegerPolynomial::lazyPseudoDivide ( const DenseUnivariateIntegerPolynomial b,
Integer c,
Integer d = NULL 
)
virtual

Lazy pseudo dividsion Return the quotient and itself becomes remainder e is the exact number of division steps.

Parameters
bThe dividend polynomial
cThe leading coefficient of b to the power e
dThat to the power deg(a) - deg(b) + 1 - e

Implements BPASUnivariatePolynomial< Integer, DenseUnivariateIntegerPolynomial >.

◆ lazyPseudoDivide() [2/2]

DenseUnivariateIntegerPolynomial DenseUnivariateIntegerPolynomial::lazyPseudoDivide ( const DenseUnivariateIntegerPolynomial b,
DenseUnivariateIntegerPolynomial rem,
Integer c,
Integer d 
) const
inlinevirtual

Lazy pseudo dividsion Return the quotient e is the exact number of division steps.

Parameters
bThe divident polynomial
remThe remainder polynomial
cThe leading coefficient of b to the power e
dThat to the power deg(a) - deg(b) + 1 - e

Implements BPASUnivariatePolynomial< Integer, DenseUnivariateIntegerPolynomial >.

◆ leadingCoefficient()

Integer DenseUnivariateIntegerPolynomial::leadingCoefficient ( ) const
inline

Get the leading coefficient.

Parameters

◆ monicDivide() [1/2]

DenseUnivariateIntegerPolynomial DenseUnivariateIntegerPolynomial::monicDivide ( const DenseUnivariateIntegerPolynomial b)
virtual

Monic division Return quotient and itself become the remainder.

Parameters
bThe dividend polynomial

Implements BPASUnivariatePolynomial< Integer, DenseUnivariateIntegerPolynomial >.

◆ monicDivide() [2/2]

DenseUnivariateIntegerPolynomial DenseUnivariateIntegerPolynomial::monicDivide ( const DenseUnivariateIntegerPolynomial b,
DenseUnivariateIntegerPolynomial rem 
) const
inlinevirtual

Monic division Return quotient.

Parameters
bThe dividend polynomial
remThe remainder polynomial

Implements BPASUnivariatePolynomial< Integer, DenseUnivariateIntegerPolynomial >.

◆ negate()

void DenseUnivariateIntegerPolynomial::negate ( )
inline

Compute -f(x)

Parameters

◆ negativeOne()

void DenseUnivariateIntegerPolynomial::negativeOne ( )
inline

Set polynomial to -1.

Parameters

◆ one()

void DenseUnivariateIntegerPolynomial::one ( )
inline

Set polynomial to 1.

Parameters

◆ operator!=()

bool DenseUnivariateIntegerPolynomial::operator!= ( const DenseUnivariateIntegerPolynomial b) const
inline

Overload operator !=.

Parameters
bA univariate integer polynoial

◆ operator*() [1/2]

DenseUnivariateIntegerPolynomial DenseUnivariateIntegerPolynomial::operator* ( const DenseUnivariateIntegerPolynomial b) const

Multiply to another polynomial.

Parameters
bA univariate integer polynomial

◆ operator*() [2/2]

DenseUnivariateIntegerPolynomial DenseUnivariateIntegerPolynomial::operator* ( const Integer e) const
inline

Overload operator *.

Parameters
eAn integer

◆ operator*=() [1/3]

DenseUnivariateIntegerPolynomial& DenseUnivariateIntegerPolynomial::operator*= ( const DenseUnivariateIntegerPolynomial b)
inline

Overload operator *=.

Parameters
bA univariate integer polynomial

◆ operator*=() [2/3]

DenseUnivariateIntegerPolynomial& DenseUnivariateIntegerPolynomial::operator*= ( const Integer e)
inline

Overload operator *=.

Parameters
eAn integer

◆ operator*=() [3/3]

DenseUnivariateIntegerPolynomial& DenseUnivariateIntegerPolynomial::operator*= ( int  e)
inline

Overload operator *=.

Parameters
eA constant

◆ operator+() [1/2]

DenseUnivariateIntegerPolynomial DenseUnivariateIntegerPolynomial::operator+ ( const DenseUnivariateIntegerPolynomial b) const

Overload operator +.

Parameters
bA univariate integer polynomial

◆ operator+() [2/2]

DenseUnivariateIntegerPolynomial DenseUnivariateIntegerPolynomial::operator+ ( const Integer c) const
inline

Overload Operator +.

Parameters
cAn integer

◆ operator+=() [1/2]

DenseUnivariateIntegerPolynomial& DenseUnivariateIntegerPolynomial::operator+= ( const DenseUnivariateIntegerPolynomial b)
inline

Overload Operator +=.

Parameters
bA univariate integer polynomial

◆ operator+=() [2/2]

DenseUnivariateIntegerPolynomial& DenseUnivariateIntegerPolynomial::operator+= ( const Integer c)
inline

Overload Operator +=.

Parameters
cAn integer

◆ operator-() [1/3]

DenseUnivariateIntegerPolynomial DenseUnivariateIntegerPolynomial::operator- ( const DenseUnivariateIntegerPolynomial b) const

Subtract another polynomial.

Parameters
bA univariate integer polynomial

◆ operator-() [2/3]

DenseUnivariateIntegerPolynomial DenseUnivariateIntegerPolynomial::operator- ( ) const

Overload operator -, negate.

Parameters

◆ operator-() [3/3]

DenseUnivariateIntegerPolynomial DenseUnivariateIntegerPolynomial::operator- ( const Integer c) const
inline

Overload operator -.

Parameters
cAn integer

◆ operator-=() [1/2]

DenseUnivariateIntegerPolynomial& DenseUnivariateIntegerPolynomial::operator-= ( const DenseUnivariateIntegerPolynomial b)
inline

Overload operator -=.

Parameters
bA univariate integer polynomial

◆ operator-=() [2/2]

DenseUnivariateIntegerPolynomial& DenseUnivariateIntegerPolynomial::operator-= ( const Integer c)
inline

Overload operator -=.

Parameters
cAn integer

◆ operator/() [1/2]

DenseUnivariateIntegerPolynomial DenseUnivariateIntegerPolynomial::operator/ ( const DenseUnivariateIntegerPolynomial b) const
inline

Overload operator / ExactDivision.

Parameters
bA univariate integer polynomial

◆ operator/() [2/2]

DenseUnivariateIntegerPolynomial DenseUnivariateIntegerPolynomial::operator/ ( const Integer e) const
inline

Overload operator /.

Parameters
eAn integer

◆ operator/=() [1/2]

DenseUnivariateIntegerPolynomial& DenseUnivariateIntegerPolynomial::operator/= ( const DenseUnivariateIntegerPolynomial b)

Overload operator /= ExactDivision.

Parameters
bA univariate integer polynomial

◆ operator/=() [2/2]

DenseUnivariateIntegerPolynomial& DenseUnivariateIntegerPolynomial::operator/= ( const Integer e)
inline

Overload operator /=.

Parameters
eAn integer

◆ operator<<()

DenseUnivariateIntegerPolynomial DenseUnivariateIntegerPolynomial::operator<< ( int  k) const
virtual

Overload operator << replace by muplitying x^k.

Parameters
kThe exponent of variable, k > 0

Implements BPASUnivariatePolynomial< Integer, DenseUnivariateIntegerPolynomial >.

◆ operator<<=()

DenseUnivariateIntegerPolynomial& DenseUnivariateIntegerPolynomial::operator<<= ( int  k)
inlinevirtual

Overload operator << replace by muplitying x^k.

Parameters
kThe exponent of variable, k > 0

Implements BPASUnivariatePolynomial< Integer, DenseUnivariateIntegerPolynomial >.

◆ operator=()

DenseUnivariateIntegerPolynomial& DenseUnivariateIntegerPolynomial::operator= ( const DenseUnivariateIntegerPolynomial b)
inline

Overload operator =.

Parameters
bA univariate integer polynoial

◆ operator==()

bool DenseUnivariateIntegerPolynomial::operator== ( const DenseUnivariateIntegerPolynomial b) const
inline

Overload operator ==.

Parameters
bA univariate integer polynoial

◆ operator>>()

DenseUnivariateIntegerPolynomial DenseUnivariateIntegerPolynomial::operator>> ( int  k) const
virtual

Overload operator >> replace by dividing x^k, and return the quotient.

Parameters
kThe exponent of variable, k > 0

Implements BPASUnivariatePolynomial< Integer, DenseUnivariateIntegerPolynomial >.

◆ operator>>=()

DenseUnivariateIntegerPolynomial& DenseUnivariateIntegerPolynomial::operator>>= ( int  k)
inlinevirtual

Overload operator >>= replace by dividing x^k, and return the quotient.

Parameters
kThe exponent of variable, k > 0

Implements BPASUnivariatePolynomial< Integer, DenseUnivariateIntegerPolynomial >.

◆ operator^()

DenseUnivariateIntegerPolynomial DenseUnivariateIntegerPolynomial::operator^ ( long long int  e) const

Overload operator ^ replace xor operation by exponentiation.

Parameters
eThe exponentiation, e > 0

◆ operator^=()

DenseUnivariateIntegerPolynomial& DenseUnivariateIntegerPolynomial::operator^= ( long long int  e)
inline

Overload operator ^= replace xor operation by exponentiation.

Parameters
eThe exponentiation, e > 0

◆ print()

void DenseUnivariateIntegerPolynomial::print ( std::ostream &  out) const

Overload stream operator <<.

Parameters
outStream object
bA univariate Integer polynoial

◆ pseudoDivide() [1/2]

DenseUnivariateIntegerPolynomial DenseUnivariateIntegerPolynomial::pseudoDivide ( const DenseUnivariateIntegerPolynomial b,
Integer d = NULL 
)
virtual

Pseudo dividsion Return the quotient and itself becomes remainder.

Parameters
bThe divident polynomial
dThe leading coefficient of b to the power deg(a) - deg(b) + 1

Implements BPASUnivariatePolynomial< Integer, DenseUnivariateIntegerPolynomial >.

◆ pseudoDivide() [2/2]

DenseUnivariateIntegerPolynomial DenseUnivariateIntegerPolynomial::pseudoDivide ( const DenseUnivariateIntegerPolynomial b,
DenseUnivariateIntegerPolynomial rem,
Integer d 
) const
virtual

Pseudo dividsion Return the quotient.

Parameters
bThe divident polynomial
remThe remainder polynomial
dThe leading coefficient of b to the power deg(a) - deg(b) + 1

Implements BPASUnivariatePolynomial< Integer, DenseUnivariateIntegerPolynomial >.

◆ setCoefficient() [1/3]

void DenseUnivariateIntegerPolynomial::setCoefficient ( int  k,
const mpz_class  value 
)
inline

Set a coefficient of the polynomial.

Parameters
kOffset
valCoefficient

◆ setCoefficient() [2/3]

void DenseUnivariateIntegerPolynomial::setCoefficient ( int  d,
const Integer r 
)
inlinevirtual

Set the coefficient of the monomial with degree d to be the Ring element r.

Parameters
dthe degree of the monomial.
rthe ring element

Implements BPASUnivariatePolynomial< Integer, DenseUnivariateIntegerPolynomial >.

◆ setCoefficient() [3/3]

void DenseUnivariateIntegerPolynomial::setCoefficient ( Integer  k,
const Integer value 
)
inline

Set a coefficient of the polynomial.

Parameters
kDegree of the term of which you are setting the coefficient
valCoefficient value

◆ setVariableName()

void DenseUnivariateIntegerPolynomial::setVariableName ( const Symbol x)
inlinevirtual

Set variable's name.

Parameters
xVarable's name

Implements BPASUnivariatePolynomial< Integer, DenseUnivariateIntegerPolynomial >.

◆ squareFree()

Factors<DenseUnivariateIntegerPolynomial> DenseUnivariateIntegerPolynomial::squareFree ( ) const

Square free.

Parameters

◆ subtract()

void DenseUnivariateIntegerPolynomial::subtract ( const DenseUnivariateIntegerPolynomial b)

Subtract another polynomial from itself.

Parameters
bA univariate integer polynomial

◆ unitCanonical()

DenseUnivariateIntegerPolynomial DenseUnivariateIntegerPolynomial::unitCanonical ( DenseUnivariateIntegerPolynomial u = NULL,
DenseUnivariateIntegerPolynomial v = NULL 
) const
inline

Obtain the unit normal (a.k.a canonical associate) of an element.

If either parameters u, v, are non-NULL then the units are returned such that b = ua, v = u^-1. Where b is the unit normal of a, and is the returned value.

◆ variable()

Symbol DenseUnivariateIntegerPolynomial::variable ( ) const
inlinevirtual

Get variable's name.

Parameters

Implements BPASUnivariatePolynomial< Integer, DenseUnivariateIntegerPolynomial >.

◆ zero()

void DenseUnivariateIntegerPolynomial::zero ( )
inline

Zero polynomial.

Parameters

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