Basic Polynomial Algebra Subprograms (BPAS)  v. 1.548
Public Member Functions | Public Attributes | Friends | List of all members
SparseUnivariatePolynomial< Ring > Class Template Reference

A univariate polynomial over an arbitrary BPASRing represented sparsely. More...

#include <upolynomial.h>

Simplified semantic inheritance diagram for SparseUnivariatePolynomial< Ring >:
- Full inheritance diagram for SparseUnivariatePolynomial< Ring >:
[legend]

Public Member Functions

 SparseUnivariatePolynomial ()
 Construct a polynomial. More...
 
 SparseUnivariatePolynomial (const SparseUnivariatePolynomial< Ring > &b)
 Copy constructor. More...
 
 SparseUnivariatePolynomial (int a)
 
 SparseUnivariatePolynomial (const Integer &c)
 
 SparseUnivariatePolynomial (const RationalNumber &c)
 
 SparseUnivariatePolynomial (const ComplexRationalNumber &c)
 
 SparseUnivariatePolynomial (const DenseUnivariateIntegerPolynomial &b)
 
 SparseUnivariatePolynomial (const DenseUnivariateRationalPolynomial &b)
 
 SparseUnivariatePolynomial (Symbol sym)
 
 ~SparseUnivariatePolynomial ()
 Destroy the polynomial. More...
 
Integer numberOfTerms () const
 Get the number of terms. More...
 
Integer degree () const
 Get the degree of the polynomial. More...
 
Ring leadingCoefficient () const
 Get the leading coefficient. More...
 
Ring trailingCoefficient () const
 
Ring coefficient (int k) const
 Get a coefficient. More...
 
void setCoefficient (int e, const Ring &c)
 Set a coeffcient with its exponent. More...
 
Symbol variable () const
 Get the variable name. More...
 
void setVariableName (const Symbol &c)
 Set the variable name. More...
 
SparseUnivariatePolynomial< Ring > unitCanonical (SparseUnivariatePolynomial< Ring > *u=NULL, SparseUnivariatePolynomial< Ring > *v=NULL) const
 
SparseUnivariatePolynomial< Ring > & operator= (const SparseUnivariatePolynomial< Ring > &b)
 Overload operator =. More...
 
SparseUnivariatePolynomial< Ring > & operator= (const Ring &r)
 Overload operator =. More...
 
bool operator!= (const SparseUnivariatePolynomial< Ring > &b) const
 Overload operator !=. More...
 
bool operator== (const SparseUnivariatePolynomial< Ring > &b) const
 Overload operator ==. More...
 
bool operator== (const DenseUnivariateRationalPolynomial &b) const
 
bool operator== (const DenseUnivariateIntegerPolynomial &b) const
 
bool isZero () const
 Is zero polynomial. More...
 
void zero ()
 Zero polynomial. More...
 
bool isOne () const
 Is polynomial a constant 1. More...
 
void one ()
 Set polynomial to 1. More...
 
bool isNegativeOne () const
 Is polynomial a constant -1. More...
 
void negativeOne ()
 Set polynomial to -1. More...
 
int isConstant () const
 Is a constant. More...
 
Ring convertToConstant ()
 Convert to a constant. More...
 
Ring content () const override
 Content of the polynomial. More...
 
SparseUnivariatePolynomial< Ring > primitivePart () const
 
SparseUnivariatePolynomial< Ring > operator^ (long long int e) const
 Overload operator ^ replace xor operation by exponentiation. More...
 
SparseUnivariatePolynomial< Ring > & operator^= (long long int e)
 Overload operator ^= replace xor operation by exponentiation. More...
 
SparseUnivariatePolynomial< Ring > operator<< (int k) const
 Overload operator << replace by muplitying x^k. More...
 
SparseUnivariatePolynomial< Ring > & operator<<= (int k)
 Overload operator <<= replace by muplitying x^k. More...
 
SparseUnivariatePolynomial< Ring > operator>> (int k) const
 Overload operator >> replace by dividing x^k, and return the quotient. More...
 
SparseUnivariatePolynomial< Ring > & operator>>= (int k)
 Overload operator >>= replace by dividing x^k, and return the quotient. More...
 
SparseUnivariatePolynomial< Ring > operator+ (const SparseUnivariatePolynomial< Ring > &b) const
 Overload operator +. More...
 
SparseUnivariatePolynomial< Ring > & operator+= (const SparseUnivariatePolynomial< Ring > &b)
 Overload operator+=. More...
 
SparseUnivariatePolynomial< Ring > operator+ (const Ring &e) const
 Overload operator +. More...
 
SparseUnivariatePolynomial< Ring > & operator+= (const Ring &e)
 Overload operator +=. More...
 
SparseUnivariatePolynomial< Ring > operator- () const
 Overload operator -, negate. More...
 
SparseUnivariatePolynomial< Ring > operator- (const SparseUnivariatePolynomial< Ring > &b) const
 Subtract another polynomial. More...
 
SparseUnivariatePolynomial< Ring > & operator-= (const SparseUnivariatePolynomial< Ring > &b)
 Overload operator -=. More...
 
SparseUnivariatePolynomial< Ring > operator- (const Ring &e) const
 Overload operator -. More...
 
SparseUnivariatePolynomial< Ring > & operator-= (const Ring &e)
 Overload operator -=. More...
 
SparseUnivariatePolynomial< Ring > operator* (const SparseUnivariatePolynomial< Ring > &b) const
 Multiply another polynomial. More...
 
SparseUnivariatePolynomial< Ring > & operator*= (const SparseUnivariatePolynomial< Ring > &b)
 Overload operator *=. More...
 
SparseUnivariatePolynomial< Ring > operator* (const Ring &c) const
 Overload operator *. More...
 
SparseUnivariatePolynomial< Ring > operator* (const sfixn &e) const
 
SparseUnivariatePolynomial< Ring > & operator*= (const Ring &c)
 Overload operator *=. More...
 
SparseUnivariatePolynomial< Ring > & operator*= (const sfixn &e)
 
SparseUnivariatePolynomial< Ring > operator/ (const SparseUnivariatePolynomial< Ring > &b) const
 Overload operator / EdeDivision. More...
 
SparseUnivariatePolynomial< Ring > & operator/= (const SparseUnivariatePolynomial< Ring > &b)
 Overload operator /= ExactDivision. More...
 
SparseUnivariatePolynomial< Ring > operator/ (const Ring &e) const
 Overload operator /. More...
 
SparseUnivariatePolynomial< Ring > & operator/= (const Ring &e)
 Overload operator /=. More...
 
void negate ()
 Negate the polynomial. More...
 
SparseUnivariatePolynomial< Ring > monicDivide (const SparseUnivariatePolynomial< Ring > &b)
 Monic division Assuming the leading coefficient of dividend is 1 Return quotient and itself becomes remainder. More...
 
SparseUnivariatePolynomial< Ring > monicDivide (const SparseUnivariatePolynomial< Ring > &b, SparseUnivariatePolynomial< Ring > *rem) const
 Monic division Assuming the leading coefficient of dividend is 1 Return quotient. More...
 
SparseUnivariatePolynomial< Ring > lazyPseudoDivide (const SparseUnivariatePolynomial< Ring > &b, Ring *c, Ring *d=NULL)
 Lazy pseudo dividsion Return the quotient and itself becomes remainder e is the exact number of division steps. More...
 
SparseUnivariatePolynomial< Ring > lazyPseudoDivide (const SparseUnivariatePolynomial< Ring > &b, SparseUnivariatePolynomial< Ring > *rem, Ring *c, Ring *d) const
 Lazy pseudo dividsion Return the quotient e is the exact number of division steps. More...
 
SparseUnivariatePolynomial< Ring > pseudoDivide (const SparseUnivariatePolynomial< Ring > &b, Ring *d=NULL)
 Pseudo dividsion Return the quotient and itself becomes remainder. More...
 
SparseUnivariatePolynomial< Ring > pseudoDivide (const SparseUnivariatePolynomial< Ring > &b, SparseUnivariatePolynomial< Ring > *rem, Ring *d) const
 Pseudo dividsion Return the quotient. More...
 
void differentiate (int k)
 Compute k-th derivative. More...
 
void differentiate ()
 Convert current object to its derivative. More...
 
SparseUnivariatePolynomial< Ring > derivative (int k) const
 Return k-th derivative. More...
 
SparseUnivariatePolynomial< Ring > derivative () const
 Compute derivative. More...
 
void integrate ()
 Compute integral with constant of integration set to 0. More...
 
SparseUnivariatePolynomial< Ring > integral () const
 Compute integral with constant of integration 0. More...
 
bool isConstantTermZero () const
 Is trailing coefficient zero. More...
 
Ring evaluate (const Ring &x) const
 Evaluate f(x) More...
 
template<class LargerRing >
LargerRing evaluate (const LargerRing &x) const
 Evaluate f(x) More...
 
void fillChain (std::vector< SparseUnivariatePolynomial< Ring >> &chain) const
 
std::vector< SparseUnivariatePolynomial< Ring > > subresultantChain (const SparseUnivariatePolynomial< Ring > &q, int filled=0) const
 Subresultant Chain Return the list of subresultants. More...
 
std::vector< SparseUnivariatePolynomial< Ring > > monomialBasisSubresultantChain (const SparseUnivariatePolynomial< Ring > &q)
 monomialBasisSubResultantChain More...
 
SparseUnivariatePolynomial< Ring > resultant (const SparseUnivariatePolynomial< Ring > &q)
 Resultant. More...
 
SparseUnivariatePolynomial< Ring > gcd (const SparseUnivariatePolynomial< Ring > &q) const
 GCD(p, q) More...
 
Factors< SparseUnivariatePolynomial< Ring > > squareFree () const
 Square free. More...
 
void print (std::ostream &out) const
 Overload stream operator <<. More...
 
ExpressionTree convertToExpressionTree () const
 
DenseUnivariateRationalPolynomial convertToDUQP ()
 
DenseUnivariateIntegerPolynomial convertToDUZP ()
 

Public Attributes

mpz_class characteristic
 

Friends

SparseUnivariatePolynomial< Ring > operator+ (const Ring &c, const SparseUnivariatePolynomial< Ring > &p)
 
SparseUnivariatePolynomial< Ring > operator- (const Ring &c, const SparseUnivariatePolynomial< Ring > &p)
 
SparseUnivariatePolynomial< Ring > operator* (const Ring &e, const SparseUnivariatePolynomial< Ring > &p)
 
SparseUnivariatePolynomial< Ring > operator* (const sfixn &e, const SparseUnivariatePolynomial< Ring > &p)
 
SparseUnivariatePolynomial< Ring > operator/ (const Ring &e, const SparseUnivariatePolynomial< Ring > &p)
 

Detailed Description

template<class Ring>
class SparseUnivariatePolynomial< Ring >

A univariate polynomial over an arbitrary BPASRing represented sparsely.

This class is used as part of the automatic template deduction of SparseUnivariatePolynomial, whether the template is a BPASRing or a BPASGCDDomain. A univariate polynomial over an arbitrary BPASRing represented sparsely.

Inheritance of proper base class, and exporting of proper functions, is automatic when the Ring template parameter is specified at compile time by means of std::conditional.

Constructor & Destructor Documentation

◆ SparseUnivariatePolynomial() [1/2]

template<class Ring>
SparseUnivariatePolynomial< Ring >::SparseUnivariatePolynomial ( )
inline

Construct a polynomial.

Parameters

◆ SparseUnivariatePolynomial() [2/2]

template<class Ring>
SparseUnivariatePolynomial< Ring >::SparseUnivariatePolynomial ( const SparseUnivariatePolynomial< Ring > &  b)
inline

Copy constructor.

Parameters
bA sparse univariate polynomial

◆ ~SparseUnivariatePolynomial()

template<class Ring>
SparseUnivariatePolynomial< Ring >::~SparseUnivariatePolynomial ( )
inline

Destroy the polynomial.

Parameters

Member Function Documentation

◆ coefficient()

template<class Ring>
Ring SparseUnivariatePolynomial< Ring >::coefficient ( int  k) const
inlinevirtual

Get a coefficient.

Parameters
kThe exponent

Implements BPASUnivariatePolynomial< Ring, SparseUnivariatePolynomial< Ring > >.

◆ content()

template<class Ring>
Ring SparseUnivariatePolynomial< Ring >::content ( ) const
inlineoverride

Content of the polynomial.

Parameters

◆ convertToConstant()

template<class Ring>
Ring SparseUnivariatePolynomial< Ring >::convertToConstant ( )
inline

Convert to a constant.

Parameters

◆ degree()

template<class Ring>
Integer SparseUnivariatePolynomial< Ring >::degree ( ) const
inline

Get the degree of the polynomial.

Parameters

◆ derivative() [1/2]

template<class Ring>
SparseUnivariatePolynomial<Ring> SparseUnivariatePolynomial< Ring >::derivative ( int  k) const
inlinevirtual

Return k-th derivative.

Parameters
kk-th derivative, k > 0

Implements BPASUnivariatePolynomial< Ring, SparseUnivariatePolynomial< Ring > >.

◆ derivative() [2/2]

template<class Ring>
SparseUnivariatePolynomial<Ring> SparseUnivariatePolynomial< Ring >::derivative ( ) const
inlinevirtual

◆ differentiate() [1/2]

template<class Ring>
void SparseUnivariatePolynomial< Ring >::differentiate ( int  k)
inlinevirtual

Compute k-th derivative.

Parameters
kk-th derivative

Implements BPASUnivariatePolynomial< Ring, SparseUnivariatePolynomial< Ring > >.

◆ differentiate() [2/2]

template<class Ring>
void SparseUnivariatePolynomial< Ring >::differentiate ( )
inlinevirtual

Convert current object to its derivative.

Implements BPASUnivariatePolynomial< Ring, SparseUnivariatePolynomial< Ring > >.

◆ evaluate() [1/2]

template<class Ring>
Ring SparseUnivariatePolynomial< Ring >::evaluate ( const Ring &  x) const
inlinevirtual

Evaluate f(x)

Parameters
xEvaluation point

Implements BPASUnivariatePolynomial< Ring, SparseUnivariatePolynomial< Ring > >.

◆ evaluate() [2/2]

template<class Ring>
template<class LargerRing >
LargerRing SparseUnivariatePolynomial< Ring >::evaluate ( const LargerRing &  x) const
inline

Evaluate f(x)

Parameters
xEvaluation point in larger ring, i.e. a ring in which the Ring of SUP<Ring> can be embedded

◆ gcd()

template<class Ring>
SparseUnivariatePolynomial<Ring> SparseUnivariatePolynomial< Ring >::gcd ( const SparseUnivariatePolynomial< Ring > &  q) const
inline

GCD(p, q)

Parameters
qThe other polynomial

◆ integral()

template<class Ring>
SparseUnivariatePolynomial<Ring> SparseUnivariatePolynomial< Ring >::integral ( ) const
inline

Compute integral with constant of integration 0.

◆ integrate()

template<class Ring>
void SparseUnivariatePolynomial< Ring >::integrate ( )
inline

Compute integral with constant of integration set to 0.

Parameters

◆ isConstant()

template<class Ring>
int SparseUnivariatePolynomial< Ring >::isConstant ( ) const
inline

Is a constant.

Parameters

◆ isConstantTermZero()

template<class Ring>
bool SparseUnivariatePolynomial< Ring >::isConstantTermZero ( ) const
inline

Is trailing coefficient zero.

Parameters

◆ isNegativeOne()

template<class Ring>
bool SparseUnivariatePolynomial< Ring >::isNegativeOne ( ) const
inline

Is polynomial a constant -1.

Parameters

◆ isOne()

template<class Ring>
bool SparseUnivariatePolynomial< Ring >::isOne ( ) const
inline

Is polynomial a constant 1.

Parameters

◆ isZero()

template<class Ring>
bool SparseUnivariatePolynomial< Ring >::isZero ( ) const
inline

Is zero polynomial.

Parameters

◆ lazyPseudoDivide() [1/2]

template<class Ring>
SparseUnivariatePolynomial<Ring> SparseUnivariatePolynomial< Ring >::lazyPseudoDivide ( const SparseUnivariatePolynomial< Ring > &  b,
Ring *  c,
Ring *  d = NULL 
)
inlinevirtual

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< Ring, SparseUnivariatePolynomial< Ring > >.

◆ lazyPseudoDivide() [2/2]

template<class Ring>
SparseUnivariatePolynomial<Ring> SparseUnivariatePolynomial< Ring >::lazyPseudoDivide ( const SparseUnivariatePolynomial< Ring > &  b,
SparseUnivariatePolynomial< Ring > *  rem,
Ring *  c,
Ring *  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< Ring, SparseUnivariatePolynomial< Ring > >.

◆ leadingCoefficient()

template<class Ring>
Ring SparseUnivariatePolynomial< Ring >::leadingCoefficient ( ) const
inline

Get the leading coefficient.

Parameters

◆ monicDivide() [1/2]

template<class Ring>
SparseUnivariatePolynomial<Ring> SparseUnivariatePolynomial< Ring >::monicDivide ( const SparseUnivariatePolynomial< Ring > &  b)
inlinevirtual

Monic division Assuming the leading coefficient of dividend is 1 Return quotient and itself becomes remainder.

Parameters
bThe dividend polynomial

Implements BPASUnivariatePolynomial< Ring, SparseUnivariatePolynomial< Ring > >.

◆ monicDivide() [2/2]

template<class Ring>
SparseUnivariatePolynomial<Ring> SparseUnivariatePolynomial< Ring >::monicDivide ( const SparseUnivariatePolynomial< Ring > &  b,
SparseUnivariatePolynomial< Ring > *  rem 
) const
inlinevirtual

Monic division Assuming the leading coefficient of dividend is 1 Return quotient.

Parameters
bThe dividend polynomial
remThe remainder polynomial

Implements BPASUnivariatePolynomial< Ring, SparseUnivariatePolynomial< Ring > >.

◆ monomialBasisSubresultantChain()

template<class Ring>
std::vector<SparseUnivariatePolynomial<Ring> > SparseUnivariatePolynomial< Ring >::monomialBasisSubresultantChain ( const SparseUnivariatePolynomial< Ring > &  q)
inline

monomialBasisSubResultantChain

Parameters
qThe other sparse univariate polynomial

◆ negate()

template<class Ring>
void SparseUnivariatePolynomial< Ring >::negate ( )
inline

Negate the polynomial.

Parameters

◆ negativeOne()

template<class Ring>
void SparseUnivariatePolynomial< Ring >::negativeOne ( )
inline

Set polynomial to -1.

Parameters

◆ numberOfTerms()

template<class Ring>
Integer SparseUnivariatePolynomial< Ring >::numberOfTerms ( ) const
inline

Get the number of terms.

Parameters

◆ one()

template<class Ring>
void SparseUnivariatePolynomial< Ring >::one ( )
inline

Set polynomial to 1.

Parameters

◆ operator!=()

template<class Ring>
bool SparseUnivariatePolynomial< Ring >::operator!= ( const SparseUnivariatePolynomial< Ring > &  b) const
inline

Overload operator !=.

Parameters
bA sparse univariate polynomial

◆ operator*() [1/2]

template<class Ring>
SparseUnivariatePolynomial<Ring> SparseUnivariatePolynomial< Ring >::operator* ( const SparseUnivariatePolynomial< Ring > &  b) const
inline

Multiply another polynomial.

Parameters
bA univariate polynomial

◆ operator*() [2/2]

template<class Ring>
SparseUnivariatePolynomial<Ring> SparseUnivariatePolynomial< Ring >::operator* ( const Ring &  c) const
inline

Overload operator *.

Parameters
cA coefficient

◆ operator*=() [1/2]

template<class Ring>
SparseUnivariatePolynomial<Ring>& SparseUnivariatePolynomial< Ring >::operator*= ( const SparseUnivariatePolynomial< Ring > &  b)
inline

Overload operator *=.

Parameters
bA univariate polynomial

◆ operator*=() [2/2]

template<class Ring>
SparseUnivariatePolynomial<Ring>& SparseUnivariatePolynomial< Ring >::operator*= ( const Ring &  c)
inline

Overload operator *=.

Parameters
cA coefficient

◆ operator+() [1/2]

template<class Ring>
SparseUnivariatePolynomial<Ring> SparseUnivariatePolynomial< Ring >::operator+ ( const SparseUnivariatePolynomial< Ring > &  b) const
inline

Overload operator +.

Parameters
bA univariate polynomial

◆ operator+() [2/2]

template<class Ring>
SparseUnivariatePolynomial<Ring> SparseUnivariatePolynomial< Ring >::operator+ ( const Ring &  e) const
inline

Overload operator +.

Parameters
eA coefficient constant

◆ operator+=() [1/2]

template<class Ring>
SparseUnivariatePolynomial<Ring>& SparseUnivariatePolynomial< Ring >::operator+= ( const SparseUnivariatePolynomial< Ring > &  b)
inline

Overload operator+=.

Parameters
bA univariate polynomial

◆ operator+=() [2/2]

template<class Ring>
SparseUnivariatePolynomial<Ring>& SparseUnivariatePolynomial< Ring >::operator+= ( const Ring &  e)
inline

Overload operator +=.

Parameters
eA coefficient constant

◆ operator-() [1/3]

template<class Ring>
SparseUnivariatePolynomial<Ring> SparseUnivariatePolynomial< Ring >::operator- ( ) const
inline

Overload operator -, negate.

Parameters

◆ operator-() [2/3]

template<class Ring>
SparseUnivariatePolynomial<Ring> SparseUnivariatePolynomial< Ring >::operator- ( const SparseUnivariatePolynomial< Ring > &  b) const
inline

Subtract another polynomial.

Parameters
bA univariate polynomial

◆ operator-() [3/3]

template<class Ring>
SparseUnivariatePolynomial<Ring> SparseUnivariatePolynomial< Ring >::operator- ( const Ring &  e) const
inline

Overload operator -.

Parameters
eA coefficient constant

◆ operator-=() [1/2]

template<class Ring>
SparseUnivariatePolynomial<Ring>& SparseUnivariatePolynomial< Ring >::operator-= ( const SparseUnivariatePolynomial< Ring > &  b)
inline

Overload operator -=.

Parameters
bA univariate polynomial

◆ operator-=() [2/2]

template<class Ring>
SparseUnivariatePolynomial<Ring>& SparseUnivariatePolynomial< Ring >::operator-= ( const Ring &  e)
inline

Overload operator -=.

Parameters
eA coefficient constant

◆ operator/() [1/2]

template<class Ring>
SparseUnivariatePolynomial<Ring> SparseUnivariatePolynomial< Ring >::operator/ ( const SparseUnivariatePolynomial< Ring > &  b) const
inline

Overload operator / EdeDivision.

Parameters
bA univariate polynomial

◆ operator/() [2/2]

template<class Ring>
SparseUnivariatePolynomial<Ring> SparseUnivariatePolynomial< Ring >::operator/ ( const Ring &  e) const
inline

Overload operator /.

Parameters
eA coefficient constant

◆ operator/=() [1/2]

template<class Ring>
SparseUnivariatePolynomial<Ring>& SparseUnivariatePolynomial< Ring >::operator/= ( const SparseUnivariatePolynomial< Ring > &  b)
inline

Overload operator /= ExactDivision.

Parameters
bA univariate polynomial

◆ operator/=() [2/2]

template<class Ring>
SparseUnivariatePolynomial<Ring>& SparseUnivariatePolynomial< Ring >::operator/= ( const Ring &  e)
inline

Overload operator /=.

Parameters
eA coefficient constant

◆ operator<<()

template<class Ring>
SparseUnivariatePolynomial<Ring> SparseUnivariatePolynomial< Ring >::operator<< ( int  k) const
inlinevirtual

Overload operator << replace by muplitying x^k.

Parameters
kThe exponent of variable, k > 0

Implements BPASUnivariatePolynomial< Ring, SparseUnivariatePolynomial< Ring > >.

◆ operator<<=()

template<class Ring>
SparseUnivariatePolynomial<Ring>& SparseUnivariatePolynomial< Ring >::operator<<= ( int  k)
inlinevirtual

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

Parameters
kThe exponent of variable, k > 0

Implements BPASUnivariatePolynomial< Ring, SparseUnivariatePolynomial< Ring > >.

◆ operator=() [1/2]

template<class Ring>
SparseUnivariatePolynomial<Ring>& SparseUnivariatePolynomial< Ring >::operator= ( const SparseUnivariatePolynomial< Ring > &  b)
inline

Overload operator =.

Parameters
bA sparse univariate polynomial

◆ operator=() [2/2]

template<class Ring>
SparseUnivariatePolynomial<Ring>& SparseUnivariatePolynomial< Ring >::operator= ( const Ring &  r)
inline

Overload operator =.

Parameters
rA base ring element

◆ operator==()

template<class Ring>
bool SparseUnivariatePolynomial< Ring >::operator== ( const SparseUnivariatePolynomial< Ring > &  b) const
inline

Overload operator ==.

Parameters
bA sparse univariate polynomial

◆ operator>>()

template<class Ring>
SparseUnivariatePolynomial<Ring> SparseUnivariatePolynomial< Ring >::operator>> ( int  k) const
inlinevirtual

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

Parameters
kThe exponent of variable, k > 0

Implements BPASUnivariatePolynomial< Ring, SparseUnivariatePolynomial< Ring > >.

◆ operator>>=()

template<class Ring>
SparseUnivariatePolynomial<Ring>& SparseUnivariatePolynomial< Ring >::operator>>= ( int  k)
inlinevirtual

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

Parameters
kThe exponent of variable, k > 0

Implements BPASUnivariatePolynomial< Ring, SparseUnivariatePolynomial< Ring > >.

◆ operator^()

template<class Ring>
SparseUnivariatePolynomial<Ring> SparseUnivariatePolynomial< Ring >::operator^ ( long long int  e) const
inline

Overload operator ^ replace xor operation by exponentiation.

Parameters
eThe exponentiation, e > 0

◆ operator^=()

template<class Ring>
SparseUnivariatePolynomial<Ring>& SparseUnivariatePolynomial< Ring >::operator^= ( long long int  e)
inline

Overload operator ^= replace xor operation by exponentiation.

Parameters
eThe exponentiation, e > 0

◆ print()

template<class Ring>
void SparseUnivariatePolynomial< Ring >::print ( std::ostream &  out) const
inline

Overload stream operator <<.

Parameters
outStream object
bThe univariate polynomial

◆ pseudoDivide() [1/2]

template<class Ring>
SparseUnivariatePolynomial<Ring> SparseUnivariatePolynomial< Ring >::pseudoDivide ( const SparseUnivariatePolynomial< Ring > &  b,
Ring *  d = NULL 
)
inlinevirtual

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< Ring, SparseUnivariatePolynomial< Ring > >.

◆ pseudoDivide() [2/2]

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

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< Ring, SparseUnivariatePolynomial< Ring > >.

◆ resultant()

template<class Ring>
SparseUnivariatePolynomial<Ring> SparseUnivariatePolynomial< Ring >::resultant ( const SparseUnivariatePolynomial< Ring > &  q)
inline

Resultant.

Parameters
qThe other sparse univariate polynomial

◆ setCoefficient()

template<class Ring>
void SparseUnivariatePolynomial< Ring >::setCoefficient ( int  e,
const Ring &  c 
)
inlinevirtual

Set a coeffcient with its exponent.

Parameters
eThe exponent
cThe coefficient

Implements BPASUnivariatePolynomial< Ring, SparseUnivariatePolynomial< Ring > >.

◆ setVariableName()

template<class Ring>
void SparseUnivariatePolynomial< Ring >::setVariableName ( const Symbol c)
inlinevirtual

Set the variable name.

Parameters
cVariable's name

Implements BPASUnivariatePolynomial< Ring, SparseUnivariatePolynomial< Ring > >.

◆ squareFree()

template<class Ring>
Factors<SparseUnivariatePolynomial<Ring> > SparseUnivariatePolynomial< Ring >::squareFree ( ) const
inline

Square free.

Parameters

◆ subresultantChain()

template<class Ring>
std::vector< SparseUnivariatePolynomial<Ring> > SparseUnivariatePolynomial< Ring >::subresultantChain ( const SparseUnivariatePolynomial< Ring > &  q,
int  filled = 0 
) const
inline

Subresultant Chain Return the list of subresultants.

Parameters
qThe other sparse univariate polynomial

◆ variable()

template<class Ring>
Symbol SparseUnivariatePolynomial< Ring >::variable ( ) const
inlinevirtual

Get the variable name.

Parameters

Implements BPASUnivariatePolynomial< Ring, SparseUnivariatePolynomial< Ring > >.

◆ zero()

template<class Ring>
void SparseUnivariatePolynomial< Ring >::zero ( )
inline

Zero polynomial.

Parameters

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