 Basic Polynomial Algebra Subprograms (BPAS)  v. 1.791
DenseUnivariatePolynomial< Field > Class Template Reference

A univariate polynomial with arbitrary BPASField coefficients represented densely. More...

`#include <dupolynomial.h>`

Simplified semantic inheritance diagram for DenseUnivariatePolynomial< Field >: Full inheritance diagram for DenseUnivariatePolynomial< Field >:
[legend]

## Public Member Functions

DenseUnivariatePolynomial ()
Construct a polynomial. More...

DenseUnivariatePolynomial (int s)
Construct a polynomial with degree. More...

DenseUnivariatePolynomial (Field e)

DenseUnivariatePolynomial (const DenseUnivariatePolynomial< Field > &b)
Copy constructor. More...

~DenseUnivariatePolynomial ()
Destroy the polynomial. More...

Integer degree () const
Get degree of the polynomial. More...

Field trailingCoefficient () const

Integer numberOfTerms () const

Field * coefficients (int k=0)
Get coefficients of the polynomial, given start offset. More...

Field coefficient (int k) const
Get a coefficient of the polynomial. More...

void setCoefficient (int k, const Field &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...

DenseUnivariatePolynomial< Field > & operator= (const DenseUnivariatePolynomial< Field > &b)

DenseUnivariatePolynomial< Field > & operator= (const Field &f)

bool operator!= (const DenseUnivariatePolynomial< Field > &b) const

bool operator== (const DenseUnivariatePolynomial< Field > &b) const

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...

DenseUnivariatePolynomial< Field > unitCanonical (DenseUnivariatePolynomial< Field > *u, DenseUnivariatePolynomial< Field > *v) const
Obtain the unit normal (a.k.a canonical associate) of an element. More...

Field content () const
Content of the polynomial. More...

DenseUnivariatePolynomial< Field > primitivePart () const

DenseUnivariatePolynomial< Field > operator^ (long long int e) const
Overload operator ^ replace xor operation by exponentiation. More...

DenseUnivariatePolynomial< Field > & operator^= (long long int e)
Overload operator ^= replace xor operation by exponentiation. More...

DenseUnivariatePolynomial< Field > operator<< (int k) const
Overload operator << replace by muplitying x^k. More...

DenseUnivariatePolynomial< Field > & operator<<= (int k)
Overload operator <<= replace by muplitying x^k. More...

DenseUnivariatePolynomial< Field > operator>> (int k) const
Overload operator >> replace by dividing x^k, and return the quotient. More...

DenseUnivariatePolynomial< Field > & operator>>= (int k)
Overload operator >>= replace by dividing x^k, and return the quotient. More...

DenseUnivariatePolynomial< Field > operator+ (const DenseUnivariatePolynomial< Field > &b) const

DenseUnivariatePolynomial< Field > & operator+= (const DenseUnivariatePolynomial< Field > &b)

void add (const DenseUnivariatePolynomial< Field > &b)
Add another polynomial to itself. More...

DenseUnivariatePolynomial< Field > operator+ (const Field &c) const

DenseUnivariatePolynomial< Field > & operator+= (const Field &c)

DenseUnivariatePolynomial< Field > operator- (const DenseUnivariatePolynomial< Field > &b) const
Subtract another polynomial. More...

DenseUnivariatePolynomial< Field > & operator-= (const DenseUnivariatePolynomial< Field > &b)

DenseUnivariatePolynomial< Field > operator- () const

void subtract (const DenseUnivariatePolynomial< Field > &b)
Subtract another polynomial from itself. More...

DenseUnivariatePolynomial< Field > operator- (const Field &c) const

DenseUnivariatePolynomial< Field > & operator-= (const Field &c)

bool SRGFNcmp (mpz_class &p)
Helper function to compare a given prime number with manually computed Generalized Fermat Numbers. More...

DenseUnivariatePolynomial< Field > operator* (const DenseUnivariatePolynomial< Field > &b) const
Multiply to another polynomial. More...

void FFT (SmallPrimeField *field, int K, int e, SmallPrimeField &omega)

void FFT (BigPrimeField *field, int K, int e, BigPrimeField &omega)

void FFT (GeneralizedFermatPrimeField *field, int K, int e, GeneralizedFermatPrimeField &omega)

void IFFT (SmallPrimeField *field, int K, int e, SmallPrimeField &omega)

void IFFT (BigPrimeField *field, int K, int e, BigPrimeField &omega)

void IFFT (GeneralizedFermatPrimeField *field, int K, int e, GeneralizedFermatPrimeField &omega)

DenseUnivariatePolynomial< Field > & operator*= (const DenseUnivariatePolynomial< Field > &b)

DenseUnivariatePolynomial< Field > operator* (const Field &e) const

DenseUnivariatePolynomial< Field > & operator*= (const Field &e)

DenseUnivariatePolynomial< Field > operator/ (const DenseUnivariatePolynomial< Field > &b) const

DenseUnivariatePolynomial< Field > & operator/= (const DenseUnivariatePolynomial< Field > &b)

DenseUnivariatePolynomial< Field > operator/ (const Field &e) const

DenseUnivariatePolynomial< Field > & operator/= (const Field &e)

DenseUnivariatePolynomial< Field > monicDivide (const DenseUnivariatePolynomial< Field > &b)
Monic division Return quotient and itself become the remainder. More...

DenseUnivariatePolynomial< Field > monicDivide (const DenseUnivariatePolynomial< Field > &b, DenseUnivariatePolynomial< Field > *rem) const
Monic division Return quotient. More...

DenseUnivariatePolynomial< Field > lazyPseudoDivide (const DenseUnivariatePolynomial< Field > &b, Field *c, Field *d)
Lazy pseudo dividsion Return the quotient and itself becomes remainder e is the exact number of division steps. More...

DenseUnivariatePolynomial< Field > lazyPseudoDivide (const DenseUnivariatePolynomial< Field > &b, DenseUnivariatePolynomial< Field > *rem, Field *c, Field *d) const
Lazy pseudo dividsion Return the quotient e is the exact number of division steps. More...

DenseUnivariatePolynomial< Field > pseudoDivide (const DenseUnivariatePolynomial< Field > &b, Field *d=NULL)
Pseudo dividsion Return the quotient and itself becomes remainder. More...

DenseUnivariatePolynomial< Field > pseudoDivide (const DenseUnivariatePolynomial< Field > &b, DenseUnivariatePolynomial< Field > *rem, Field *d) const
Pseudo dividsion Return the quotient. More...

DenseUnivariatePolynomial< Field > halfExtendedEuclidean (const DenseUnivariatePolynomial< Field > &b, DenseUnivariatePolynomial< Field > *g)
s * a g (mod b), where g = gcd(a, b) More...

void diophantinEquationSolve (const DenseUnivariatePolynomial< Field > &a, const DenseUnivariatePolynomial< Field > &b, DenseUnivariatePolynomial< Field > *s, DenseUnivariatePolynomial< Field > *t)
s*a + t*b = c, where c in the ideal (a,b) More...

void differentiate (int k)
Compute k-th differentiate. More...

void differentiate ()
Differentiate this polynomial, setting itself to its derivative.

DenseUnivariatePolynomial< Field > derivative (int k) const
Obtain the kth derivative of this polynomial. More...

DenseUnivariatePolynomial< Field > derivative () const
Obtain the derivative of this polynomial. More...

DenseUnivariatePolynomial< Field > integrate () const
Compute the integral with constant of integration 0. More...

Field evaluate (const Field &x) const
Evaluate f(x) More...

bool isConstantTermZero () const
Is the least signficant coefficient zero. More...

DenseUnivariatePolynomial< Field > gcd (const DenseUnivariatePolynomial< Field > &q, int type) const
GCD(p, q) More...

DenseUnivariatePolynomial< Field > gcd (const DenseUnivariatePolynomial< Field > &q) const
Get GCD of *this and other. More...

Factors< DenseUnivariatePolynomial< Field > > squareFree () const
Square free. More...

bool divideByVariableIfCan ()
Divide by variable if it is zero. More...

void reciprocal ()
Number of coefficient sign variation. More...

void homothetic (int k)
Homothetic operation. More...

void scaleTransform (int k)
Scale transform operation. More...

void negativeVariable ()
Compute f(-x) More...

void negate ()
Compute -f(x) More...

void print (std::ostream &out) const

ExpressionTree convertToExpressionTree () const
Convert this to an expression tree. More...

Integer euclideanSize () const
Euclidean domain methods.

DenseUnivariatePolynomial< Field > euclideanDivision (const DenseUnivariatePolynomial< Field > &b, DenseUnivariatePolynomial< Field > *q=NULL) const
Perform the eucldiean division of *this and b. More...

DenseUnivariatePolynomial< Field > extendedEuclidean (const DenseUnivariatePolynomial< Field > &b, DenseUnivariatePolynomial< Field > *s=NULL, DenseUnivariatePolynomial< Field > *t=NULL) const
Perform the extended euclidean division on *this and b. More...

DenseUnivariatePolynomial< Field > quotient (const DenseUnivariatePolynomial< Field > &b) const
Get the quotient of *this and b. More...

DenseUnivariatePolynomial< Field > remainder (const DenseUnivariatePolynomial< Field > &b) const
Get the remainder of *this and b. More...

DenseUnivariatePolynomial< Field > operator% (const DenseUnivariatePolynomial< Field > &b) const
Get the remainder of *this and b;. More...

DenseUnivariatePolynomial< Field > & operator%= (const DenseUnivariatePolynomial< Field > &b)
Assign *this to be the remainder of *this and b. More...

DenseUnivariatePolynomial< Field > Reverse () const
Reverse a polynomial (based on Modern Computer Algebra , Newton Iteration Chapter 9) More...

DenseUnivariatePolynomial< Field > NewtonIterationInversion (int l)
Does Newton Iteration to compute the Reverse Inverse of a polynomial (based on Modern Computer Algebra , Newton Iteration Chapter 9) More...

void NewtonDivisionQuotient (DenseUnivariatePolynomial< Field > &b, DenseUnivariatePolynomial< Field > &q, DenseUnivariatePolynomial< Field > &r, int l)
Fast Division (based on Modern Computer Algebra , Newton Iteration Chapter 9) More...

## Public Attributes

mpz_class characteristic

## Static Public Attributes

static mpz_class p1

static mpz_class p2

static mpz_class p3

static mpz_class p4

static mpz_class p5

static mpz_class p6

static mpz_class p7

## Friends

DenseUnivariatePolynomial< Field > operator+ (Field c, DenseUnivariatePolynomial< Field > p)

DenseUnivariatePolynomial< Field > operator- (const Field &c, const DenseUnivariatePolynomial< Field > &p)

DenseUnivariatePolynomial< Field > operator* (const Field &c, const DenseUnivariatePolynomial< Field > &p)

DenseUnivariatePolynomial< Field > operator/ (const Field &c, const DenseUnivariatePolynomial< Field > &p)

## Detailed Description

### template<class Field> class DenseUnivariatePolynomial< Field >

A univariate polynomial with arbitrary BPASField coefficients represented densely.

This class is templated by a Field which should be a BPASField.

## ◆ DenseUnivariatePolynomial() [1/3]

template<class Field>
 DenseUnivariatePolynomial< Field >::DenseUnivariatePolynomial ( )
inline

Construct a polynomial.

Parameters
 d

## ◆ DenseUnivariatePolynomial() [2/3]

template<class Field>
 DenseUnivariatePolynomial< Field >::DenseUnivariatePolynomial ( int s )
inline

Construct a polynomial with degree.

Parameters
 d Size of the polynomial

## ◆ DenseUnivariatePolynomial() [3/3]

template<class Field>
 DenseUnivariatePolynomial< Field >::DenseUnivariatePolynomial ( const DenseUnivariatePolynomial< Field > & b )
inline

Copy constructor.

Parameters
 b A dense univariate rational polynomial

## ◆ ~DenseUnivariatePolynomial()

template<class Field>
 DenseUnivariatePolynomial< Field >::~DenseUnivariatePolynomial ( )
inline

Destroy the polynomial.

Parameters

## Member Function Documentation

template<class Field>
 void DenseUnivariatePolynomial< Field >::add ( const DenseUnivariatePolynomial< Field > & b )
inline

Parameters
 b A univariate rational polynomial

## ◆ coefficient()

template<class Field>
 Field DenseUnivariatePolynomial< Field >::coefficient ( int k ) const
inlinevirtual

Get a coefficient of the polynomial.

Parameters
 k Offset

## ◆ coefficients()

template<class Field>
 Field* DenseUnivariatePolynomial< Field >::coefficients ( int k = `0` )
inline

Get coefficients of the polynomial, given start offset.

Parameters
 k Offset

## ◆ content()

template<class Field>
 Field DenseUnivariatePolynomial< Field >::content ( ) const
inline

Content of the polynomial.

Parameters

## ◆ convertToExpressionTree()

template<class Field>
 ExpressionTree DenseUnivariatePolynomial< Field >::convertToExpressionTree ( ) const
inlinevirtual

Convert this to an expression tree.

returns an expression tree describing *this.

Implements ExpressionTreeConvert.

## ◆ degree()

template<class Field>
 Integer DenseUnivariatePolynomial< Field >::degree ( ) const
inline

Get degree of the polynomial.

Parameters

## ◆ derivative() [1/2]

template<class Field>
 DenseUnivariatePolynomial DenseUnivariatePolynomial< Field >::derivative ( int ) const
inlinevirtual

Obtain the kth derivative of this polynomial.

Parameters
 k the number of times to differentiate.
Returns
the kth derivative.

## ◆ derivative() [2/2]

template<class Field>
 DenseUnivariatePolynomial DenseUnivariatePolynomial< Field >::derivative ( ) const
inlinevirtual

Obtain the derivative of this polynomial.

Returns
the derivative.

## ◆ differentiate()

template<class Field>
 void DenseUnivariatePolynomial< Field >::differentiate ( int k )
inlinevirtual

Compute k-th differentiate.

Parameters
 k k-th differentiate, k > 0

## ◆ diophantinEquationSolve()

template<class Field>
 void DenseUnivariatePolynomial< Field >::diophantinEquationSolve ( const DenseUnivariatePolynomial< Field > & a, const DenseUnivariatePolynomial< Field > & b, DenseUnivariatePolynomial< Field > * s, DenseUnivariatePolynomial< Field > * t )
inline

s*a + t*b = c, where c in the ideal (a,b)

Parameters
 a A univariate polynomial b: A univariate polynomial s Either s = 0 or degree(s) < degree(b) t

## ◆ divideByVariableIfCan()

template<class Field>
 bool DenseUnivariatePolynomial< Field >::divideByVariableIfCan ( )
inline

Divide by variable if it is zero.

Parameters

## ◆ euclideanDivision()

template<class Field>
 DenseUnivariatePolynomial DenseUnivariatePolynomial< Field >::euclideanDivision ( const DenseUnivariatePolynomial< Field > & b, DenseUnivariatePolynomial< Field > * q = `NULL` ) const
inlinevirtual

Perform the eucldiean division of *this and b.

Returns the remainder. If q is not NULL, then returns the quotient in q.

Parameters
 b the divisor. [out] q a pointer to store the quotient in.
Returns
the remainder.

## ◆ evaluate()

template<class Field>
 Field DenseUnivariatePolynomial< Field >::evaluate ( const Field & x ) const
inlinevirtual

Evaluate f(x)

Parameters
 x Evaluation point

## ◆ extendedEuclidean()

template<class Field>
 DenseUnivariatePolynomial DenseUnivariatePolynomial< Field >::extendedEuclidean ( const DenseUnivariatePolynomial< Field > & b, DenseUnivariatePolynomial< Field > * s = `NULL`, DenseUnivariatePolynomial< Field > * t = `NULL` ) const
inlinevirtual

Perform the extended euclidean division on *this and b.

Returns the GCD. If s and t are not NULL, returns the bezout coefficients in them.

Parameters
 b the divisor. [out] s the bezout coefficient of this. [out] t the bezout coefficient of b.
Returns
the remainder.

## ◆ gcd() [1/2]

template<class Field>
 DenseUnivariatePolynomial DenseUnivariatePolynomial< Field >::gcd ( const DenseUnivariatePolynomial< Field > & q, int type ) const
inline

GCD(p, q)

Parameters
 q The other polynomial

## ◆ gcd() [2/2]

template<class Field>
 DenseUnivariatePolynomial DenseUnivariatePolynomial< Field >::gcd ( const DenseUnivariatePolynomial< Field > & other ) const
inlinevirtual

Get GCD of *this and other.

Parameters
 other the other element to get a gcd with.
Returns
the gcd.

## ◆ halfExtendedEuclidean()

template<class Field>
 DenseUnivariatePolynomial DenseUnivariatePolynomial< Field >::halfExtendedEuclidean ( const DenseUnivariatePolynomial< Field > & b, DenseUnivariatePolynomial< Field > * g )
inline

s * a g (mod b), where g = gcd(a, b)

Parameters
 b A univariate polynomial g The GCD of a and b

## ◆ homothetic()

template<class Field>
 void DenseUnivariatePolynomial< Field >::homothetic ( int k )
inline

Homothetic operation.

Parameters
 k > 0: 2^(k*d) * f(2^(-k)*x);

## ◆ integrate()

template<class Field>
 DenseUnivariatePolynomial DenseUnivariatePolynomial< Field >::integrate ( ) const
inline

Compute the integral with constant of integration 0.

Parameters

## ◆ isConstant()

template<class Field>
 int DenseUnivariatePolynomial< Field >::isConstant ( ) const
inline

Is a constant.

Parameters

## ◆ isConstantTermZero()

template<class Field>
 bool DenseUnivariatePolynomial< Field >::isConstantTermZero ( ) const
inline

Is the least signficant coefficient zero.

Parameters

## ◆ isNegativeOne()

template<class Field>
 bool DenseUnivariatePolynomial< Field >::isNegativeOne ( ) const
inline

Is polynomial a constatn -1.

Parameters

## ◆ isOne()

template<class Field>
 bool DenseUnivariatePolynomial< Field >::isOne ( ) const
inlinevirtual

Is polynomial a constatn 1.

Parameters

## ◆ isZero()

template<class Field>
 bool DenseUnivariatePolynomial< Field >::isZero ( ) const
inlinevirtual

Is zero polynomial.

Parameters

## ◆ lazyPseudoDivide() [1/2]

template<class Field>
 DenseUnivariatePolynomial DenseUnivariatePolynomial< Field >::lazyPseudoDivide ( const DenseUnivariatePolynomial< Field > & b, Field * c, Field * d )
inlinevirtual

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

Parameters
 b The dividend polynomial c The leading coefficient of b to the power e d That to the power deg(a) - deg(b) + 1 - e

## ◆ lazyPseudoDivide() [2/2]

template<class Field>
 DenseUnivariatePolynomial DenseUnivariatePolynomial< Field >::lazyPseudoDivide ( const DenseUnivariatePolynomial< Field > & b, DenseUnivariatePolynomial< Field > * rem, Field * c, Field * d ) const
inlinevirtual

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

Parameters
 b The divident polynomial rem The remainder polynomial c The leading coefficient of b to the power e d That to the power deg(a) - deg(b) + 1 - e

template<class Field>
 Field DenseUnivariatePolynomial< Field >::leadingCoefficient ( ) const
inline

Parameters

## ◆ monicDivide() [1/2]

template<class Field>
 DenseUnivariatePolynomial DenseUnivariatePolynomial< Field >::monicDivide ( const DenseUnivariatePolynomial< Field > & b )
inlinevirtual

Monic division Return quotient and itself become the remainder.

Parameters
 b The dividend polynomial

## ◆ monicDivide() [2/2]

template<class Field>
 DenseUnivariatePolynomial DenseUnivariatePolynomial< Field >::monicDivide ( const DenseUnivariatePolynomial< Field > & b, DenseUnivariatePolynomial< Field > * rem ) const
inlinevirtual

Monic division Return quotient.

Parameters
 b The dividend polynomial rem The remainder polynomial

## ◆ negate()

template<class Field>
 void DenseUnivariatePolynomial< Field >::negate ( )
inline

Compute -f(x)

Parameters

## ◆ negativeOne()

template<class Field>
 void DenseUnivariatePolynomial< Field >::negativeOne ( )
inline

Set polynomial to -1.

Parameters

## ◆ negativeVariable()

template<class Field>
 void DenseUnivariatePolynomial< Field >::negativeVariable ( )
inline

Compute f(-x)

Parameters

## ◆ NewtonDivisionQuotient()

template<class Field>
 void DenseUnivariatePolynomial< Field >::NewtonDivisionQuotient ( DenseUnivariatePolynomial< Field > & b, DenseUnivariatePolynomial< Field > & q, DenseUnivariatePolynomial< Field > & r, int l )
inline

Fast Division (based on Modern Computer Algebra , Newton Iteration Chapter 9)

Parameters
 b divisor q (out) qoutient r (out) remainder fieldVal prime field l number of newton iteration

## ◆ NewtonIterationInversion()

template<class Field>
 DenseUnivariatePolynomial DenseUnivariatePolynomial< Field >::NewtonIterationInversion ( int l )
inline

Does Newton Iteration to compute the Reverse Inverse of a polynomial (based on Modern Computer Algebra , Newton Iteration Chapter 9)

Parameters
 l number of newton iteration (n - m + 1)

## ◆ one()

template<class Field>
 void DenseUnivariatePolynomial< Field >::one ( )
inlinevirtual

Set polynomial to 1.

Parameters

## ◆ operator!=()

template<class Field>
 bool DenseUnivariatePolynomial< Field >::operator!= ( const DenseUnivariatePolynomial< Field > & b ) const
inlinevirtual

Parameters
 b A univariate rational polynoial

## ◆ operator%()

template<class Field>
 DenseUnivariatePolynomial DenseUnivariatePolynomial< Field >::operator% ( const DenseUnivariatePolynomial< Field > & b ) const
inlinevirtual

Get the remainder of *this and b;.

Parameters
 b the divisor
Returns
the remainder

## ◆ operator%=()

template<class Field>
 DenseUnivariatePolynomial& DenseUnivariatePolynomial< Field >::operator%= ( const DenseUnivariatePolynomial< Field > & b )
inlinevirtual

Assign *this to be the remainder of *this and b.

Parameters
 b the divisor
Returns
this after assignment.

## ◆ operator*() [1/2]

template<class Field>
 DenseUnivariatePolynomial DenseUnivariatePolynomial< Field >::operator* ( const DenseUnivariatePolynomial< Field > & b ) const
inlinevirtual

Multiply to another polynomial.

Parameters
 b A univariate rational polynomial

## ◆ operator*() [2/2]

template<class Field>
 DenseUnivariatePolynomial DenseUnivariatePolynomial< Field >::operator* ( const Field & e ) const
inline

Parameters
 e A rational number

## ◆ operator*=() [1/2]

template<class Field>
 DenseUnivariatePolynomial& DenseUnivariatePolynomial< Field >::operator*= ( const DenseUnivariatePolynomial< Field > & b )
inlinevirtual

Parameters
 b A univariate rational polynomial

## ◆ operator*=() [2/2]

template<class Field>
 DenseUnivariatePolynomial& DenseUnivariatePolynomial< Field >::operator*= ( const Field & e )
inline

Parameters
 e A rational number

## ◆ operator+() [1/2]

template<class Field>
 DenseUnivariatePolynomial DenseUnivariatePolynomial< Field >::operator+ ( const DenseUnivariatePolynomial< Field > & b ) const
inlinevirtual

Parameters
 b A univariate rational polynomial

## ◆ operator+() [2/2]

template<class Field>
 DenseUnivariatePolynomial DenseUnivariatePolynomial< Field >::operator+ ( const Field & c ) const
inline

Parameters
 c A rational number

## ◆ operator+=() [1/2]

template<class Field>
 DenseUnivariatePolynomial& DenseUnivariatePolynomial< Field >::operator+= ( const DenseUnivariatePolynomial< Field > & b )
inlinevirtual

Parameters
 b A univariate rational polynomial

## ◆ operator+=() [2/2]

template<class Field>
 DenseUnivariatePolynomial& DenseUnivariatePolynomial< Field >::operator+= ( const Field & c )
inline

Parameters
 c A rational number

## ◆ operator-() [1/3]

template<class Field>
 DenseUnivariatePolynomial DenseUnivariatePolynomial< Field >::operator- ( const DenseUnivariatePolynomial< Field > & b ) const
inlinevirtual

Subtract another polynomial.

Parameters
 b A univariate rational polynomial

## ◆ operator-() [2/3]

template<class Field>
 DenseUnivariatePolynomial DenseUnivariatePolynomial< Field >::operator- ( ) const
inlinevirtual

Parameters

## ◆ operator-() [3/3]

template<class Field>
 DenseUnivariatePolynomial DenseUnivariatePolynomial< Field >::operator- ( const Field & c ) const
inline

Parameters
 c A rational number

## ◆ operator-=() [1/2]

template<class Field>
 DenseUnivariatePolynomial& DenseUnivariatePolynomial< Field >::operator-= ( const DenseUnivariatePolynomial< Field > & b )
inlinevirtual

Parameters
 b A univariate rational polynomial

## ◆ operator-=() [2/2]

template<class Field>
 DenseUnivariatePolynomial& DenseUnivariatePolynomial< Field >::operator-= ( const Field & c )
inline

Parameters
 c A rational number

## ◆ operator/() [1/2]

template<class Field>
 DenseUnivariatePolynomial DenseUnivariatePolynomial< Field >::operator/ ( const DenseUnivariatePolynomial< Field > & b ) const
inlinevirtual

Parameters
 b A univariate rational polynomial

## ◆ operator/() [2/2]

template<class Field>
 DenseUnivariatePolynomial DenseUnivariatePolynomial< Field >::operator/ ( const Field & e ) const
inline

Parameters
 e A rational number

## ◆ operator/=() [1/2]

template<class Field>
 DenseUnivariatePolynomial& DenseUnivariatePolynomial< Field >::operator/= ( const DenseUnivariatePolynomial< Field > & b )
inlinevirtual

Parameters
 b A univariate rational polynomial

## ◆ operator/=() [2/2]

template<class Field>
 DenseUnivariatePolynomial& DenseUnivariatePolynomial< Field >::operator/= ( const Field & e )
inline

Parameters
 e A rational number

## ◆ operator<<()

template<class Field>
 DenseUnivariatePolynomial DenseUnivariatePolynomial< Field >::operator<< ( int k ) const
inlinevirtual

Overload operator << replace by muplitying x^k.

Parameters
 k The exponent of variable, k > 0

## ◆ operator<<=()

template<class Field>
 DenseUnivariatePolynomial& DenseUnivariatePolynomial< Field >::operator<<= ( int k )
inlinevirtual

Overload operator <<= replace by muplitying x^k.

Parameters
 k The exponent of variable, k > 0

## ◆ operator=()

template<class Field>
 DenseUnivariatePolynomial& DenseUnivariatePolynomial< Field >::operator= ( const DenseUnivariatePolynomial< Field > & b )
inlinevirtual

Parameters
 b A univariate rational polynoial

## ◆ operator==()

template<class Field>
 bool DenseUnivariatePolynomial< Field >::operator== ( const DenseUnivariatePolynomial< Field > & b ) const
inlinevirtual

Parameters
 b A univariate rational polynoial

## ◆ operator>>()

template<class Field>
 DenseUnivariatePolynomial DenseUnivariatePolynomial< Field >::operator>> ( int k ) const
inlinevirtual

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

Parameters
 k The exponent of variable, k > 0

## ◆ operator>>=()

template<class Field>
 DenseUnivariatePolynomial& DenseUnivariatePolynomial< Field >::operator>>= ( int k )
inlinevirtual

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

Parameters
 k The exponent of variable, k > 0

## ◆ operator^()

template<class Field>
 DenseUnivariatePolynomial DenseUnivariatePolynomial< Field >::operator^ ( long long int e ) const
inlinevirtual

Overload operator ^ replace xor operation by exponentiation.

Parameters
 e The exponentiation, e > 0

## ◆ operator^=()

template<class Field>
 DenseUnivariatePolynomial& DenseUnivariatePolynomial< Field >::operator^= ( long long int e )
inlinevirtual

Overload operator ^= replace xor operation by exponentiation.

Parameters
 e The exponentiation, e > 0

## ◆ print()

template<class Field>
 void DenseUnivariatePolynomial< Field >::print ( std::ostream & out ) const
inlinevirtual

Parameters
 out Stream object b A univariate rational polynoial

Reimplemented from BPASRing< DenseUnivariatePolynomial< Field > >.

## ◆ pseudoDivide() [1/2]

template<class Field>
 DenseUnivariatePolynomial DenseUnivariatePolynomial< Field >::pseudoDivide ( const DenseUnivariatePolynomial< Field > & b, Field * d = `NULL` )
inlinevirtual

Pseudo dividsion Return the quotient and itself becomes remainder.

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

## ◆ pseudoDivide() [2/2]

template<class Field>
 DenseUnivariatePolynomial DenseUnivariatePolynomial< Field >::pseudoDivide ( const DenseUnivariatePolynomial< Field > & b, DenseUnivariatePolynomial< Field > * rem, Field * d ) const
inlinevirtual

Pseudo dividsion Return the quotient.

Parameters
 b The divident polynomial rem The remainder polynomial d The leading coefficient of b to the power deg(a) - deg(b) + 1

## ◆ quotient()

template<class Field>
 DenseUnivariatePolynomial DenseUnivariatePolynomial< Field >::quotient ( const DenseUnivariatePolynomial< Field > & b ) const
inlinevirtual

Get the quotient of *this and b.

Parameters
 b the divisor
Returns
the quotient

## ◆ reciprocal()

template<class Field>
 void DenseUnivariatePolynomial< Field >::reciprocal ( )
inline

Number of coefficient sign variation.

Parameters
 Revert coefficients

## ◆ remainder()

template<class Field>
 DenseUnivariatePolynomial DenseUnivariatePolynomial< Field >::remainder ( const DenseUnivariatePolynomial< Field > & b ) const
inlinevirtual

Get the remainder of *this and b.

Parameters
 b the divisor
Returns
the remainder

## ◆ Reverse()

template<class Field>
 DenseUnivariatePolynomial DenseUnivariatePolynomial< Field >::Reverse ( ) const
inline

Reverse a polynomial (based on Modern Computer Algebra , Newton Iteration Chapter 9)

Parameters

## ◆ scaleTransform()

template<class Field>
 void DenseUnivariatePolynomial< Field >::scaleTransform ( int k )
inline

Scale transform operation.

Parameters
 k > 0: f(2^k*x)

## ◆ setCoefficient()

template<class Field>
 void DenseUnivariatePolynomial< Field >::setCoefficient ( int k, const Field & value )
inlinevirtual

Set a coefficient of the polynomial.

Parameters
 k Offset val Coefficient

## ◆ setVariableName()

template<class Field>
 void DenseUnivariatePolynomial< Field >::setVariableName ( const Symbol & x )
inlinevirtual

Set variable's name.

Parameters
 x Varable's name

## ◆ squareFree()

template<class Field>
 Factors > DenseUnivariatePolynomial< Field >::squareFree ( ) const
inlinevirtual

Square free.

Parameters

## ◆ SRGFNcmp()

template<class Field>
 bool DenseUnivariatePolynomial< Field >::SRGFNcmp ( mpz_class & p )
inline

Helper function to compare a given prime number with manually computed Generalized Fermat Numbers.

Parameters
 p prime number

## ◆ subtract()

template<class Field>
 void DenseUnivariatePolynomial< Field >::subtract ( const DenseUnivariatePolynomial< Field > & b )
inline

Subtract another polynomial from itself.

Parameters
 b A univariate rational polynomial

## ◆ unitCanonical()

template<class Field>
 DenseUnivariatePolynomial DenseUnivariatePolynomial< Field >::unitCanonical ( DenseUnivariatePolynomial< Field > * u, DenseUnivariatePolynomial< Field > * v ) const
inlinevirtual

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()

template<class Field>
 Symbol DenseUnivariatePolynomial< Field >::variable ( ) const
inlinevirtual

Get variable's name.

Parameters

## ◆ zero()

template<class Field>
 void DenseUnivariatePolynomial< Field >::zero ( )
inlinevirtual

Zero polynomial.

Parameters

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