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

A univariate polynomial with RationalNumber coefficients represented densely. More...

#include <urpolynomial.h>

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

Public Member Functions

 DenseUnivariateRationalPolynomial ()
 Construct a polynomial. More...
 
 DenseUnivariateRationalPolynomial (int s)
 Construct a polynomial with degree. More...
 
 DenseUnivariateRationalPolynomial (const Integer &e)
 Construct a polynomial with a coefficient. More...
 
 DenseUnivariateRationalPolynomial (const RationalNumber &e)
 
 DenseUnivariateRationalPolynomial (const DenseUnivariateRationalPolynomial &b)
 Copy constructor. More...
 
 ~DenseUnivariateRationalPolynomial ()
 Destroy the polynomial. More...
 
Integer degree () const
 Get degree of the polynomial. More...
 
RationalNumber leadingCoefficient () const
 Get the leading coefficient. More...
 
RationalNumber trailingCoefficient () const
 
Integer numberOfTerms () const
 
mpq_class * coefficients (int k=0) const
 Get coefficients of the polynomial, given start offset. More...
 
RationalNumber coefficient (int k) const
 Get a coefficient of the polynomial. More...
 
void setCoefficient (int k, const RationalNumber &value)
 Set a coefficient of the polynomial. More...
 
void setCoefficient (int k, double value)
 
Symbol variable () const
 Get variable's name. More...
 
void setVariableName (const Symbol &x)
 Set variable's name. More...
 
DenseUnivariateRationalPolynomial unitCanonical (DenseUnivariateRationalPolynomial *u=NULL, DenseUnivariateRationalPolynomial *v=NULL) const
 
DenseUnivariateRationalPolynomialoperator= (const DenseUnivariateRationalPolynomial &b)
 Overload operator =. More...
 
DenseUnivariateRationalPolynomialoperator= (const RationalNumber &r)
 
bool operator!= (const DenseUnivariateRationalPolynomial &b) const
 Overload operator !=. More...
 
bool operator== (const DenseUnivariateRationalPolynomial &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...
 
RationalNumber content () const
 Content of the polynomial. More...
 
DenseUnivariateRationalPolynomial primitivePart () const
 
DenseUnivariateRationalPolynomial operator^ (long long int e) const
 Overload operator ^ replace xor operation by exponentiation. More...
 
DenseUnivariateRationalPolynomialoperator^= (long long int e)
 Overload operator ^= replace xor operation by exponentiation. More...
 
DenseUnivariateRationalPolynomial operator<< (int k) const
 Overload operator << replace by muplitying x^k. More...
 
DenseUnivariateRationalPolynomialoperator<<= (int k)
 Overload operator <<= replace by muplitying x^k. More...
 
DenseUnivariateRationalPolynomial operator>> (int k) const
 Overload operator >> replace by dividing x^k, and return the quotient. More...
 
DenseUnivariateRationalPolynomialoperator>>= (int k)
 Overload operator >>= replace by dividing x^k, and return the quotient. More...
 
DenseUnivariateRationalPolynomial operator+ (const DenseUnivariateRationalPolynomial &b) const
 Overload operator +. More...
 
DenseUnivariateRationalPolynomialoperator+= (const DenseUnivariateRationalPolynomial &b)
 Overload Operator +=. More...
 
void add (const DenseUnivariateRationalPolynomial &b)
 Add another polynomial to itself. More...
 
DenseUnivariateRationalPolynomial operator+ (const RationalNumber &c) const
 Overload Operator +. More...
 
DenseUnivariateRationalPolynomial operator+ (const mpq_class &c) const
 
DenseUnivariateRationalPolynomialoperator+= (const RationalNumber &c)
 Overload Operator +=. More...
 
DenseUnivariateRationalPolynomialoperator+= (const mpq_class &c)
 
DenseUnivariateRationalPolynomial operator- (const DenseUnivariateRationalPolynomial &b) const
 Subtract another polynomial. More...
 
DenseUnivariateRationalPolynomialoperator-= (const DenseUnivariateRationalPolynomial &b)
 Overload operator -=. More...
 
DenseUnivariateRationalPolynomial operator- () const
 Overload operator -, negate. More...
 
void subtract (const DenseUnivariateRationalPolynomial &b)
 Subtract another polynomial from itself. More...
 
DenseUnivariateRationalPolynomial operator- (const RationalNumber &c) const
 Overload operator -. More...
 
DenseUnivariateRationalPolynomial operator- (const mpq_class &c) const
 
DenseUnivariateRationalPolynomialoperator-= (const RationalNumber &c)
 Overload operator -=. More...
 
DenseUnivariateRationalPolynomialoperator-= (const mpq_class &c)
 
DenseUnivariateRationalPolynomial operator* (const DenseUnivariateRationalPolynomial &b) const
 Multiply to another polynomial. More...
 
DenseUnivariateRationalPolynomialoperator*= (const DenseUnivariateRationalPolynomial &b)
 Overload operator *=. More...
 
DenseUnivariateRationalPolynomial operator* (const RationalNumber &e) const
 Overload operator *. More...
 
DenseUnivariateRationalPolynomial operator* (const mpq_class &e) const
 
DenseUnivariateRationalPolynomial operator* (const sfixn &e) const
 
DenseUnivariateRationalPolynomialoperator*= (const RationalNumber &e)
 Overload operator *=. More...
 
DenseUnivariateRationalPolynomialoperator*= (const mpq_class &e)
 
DenseUnivariateRationalPolynomialoperator*= (const sfixn &e)
 Overload operator *=. More...
 
DenseUnivariateRationalPolynomial operator/ (const DenseUnivariateRationalPolynomial &b) const
 Overload operator / ExactDivision. More...
 
DenseUnivariateRationalPolynomialoperator/= (const DenseUnivariateRationalPolynomial &b)
 Overload operator /= ExactDivision. More...
 
DenseUnivariateRationalPolynomial operator% (const DenseUnivariateRationalPolynomial &b) const
 
DenseUnivariateRationalPolynomialoperator%= (const DenseUnivariateRationalPolynomial &b)
 
DenseUnivariateRationalPolynomial operator/ (const RationalNumber &e) const
 Overload operator /. More...
 
DenseUnivariateRationalPolynomial operator/ (const mpq_class &e) const
 
DenseUnivariateRationalPolynomialoperator/= (const RationalNumber &e)
 Overload operator /=. More...
 
DenseUnivariateRationalPolynomialoperator/= (const mpq_class &e)
 
DenseUnivariateRationalPolynomial monicDivide (const DenseUnivariateRationalPolynomial &b)
 Monic division Return quotient and itself become the remainder. More...
 
DenseUnivariateRationalPolynomial monicDivide (const DenseUnivariateRationalPolynomial &b, DenseUnivariateRationalPolynomial *rem) const
 Monic division Return quotient. More...
 
DenseUnivariateRationalPolynomial lazyPseudoDivide (const DenseUnivariateRationalPolynomial &b, RationalNumber *c, RationalNumber *d=NULL)
 Lazy pseudo dividsion Return the quotient and itself becomes remainder e is the exact number of division steps. More...
 
DenseUnivariateRationalPolynomial lazyPseudoDivide (const DenseUnivariateRationalPolynomial &b, DenseUnivariateRationalPolynomial *rem, RationalNumber *c, RationalNumber *d) const
 Lazy pseudo dividsion Return the quotient e is the exact number of division steps. More...
 
DenseUnivariateRationalPolynomial pseudoDivide (const DenseUnivariateRationalPolynomial &b, RationalNumber *d=NULL)
 Pseudo dividsion Return the quotient and itself becomes remainder. More...
 
DenseUnivariateRationalPolynomial pseudoDivide (const DenseUnivariateRationalPolynomial &b, DenseUnivariateRationalPolynomial *rem, RationalNumber *d) const
 Pseudo dividsion Return the quotient. More...
 
DenseUnivariateRationalPolynomial halfExtendedEuclidean (const DenseUnivariateRationalPolynomial &b, DenseUnivariateRationalPolynomial *g) const
 s * a g (mod b), where g = gcd(a, b) More...
 
void diophantinEquationSolve (const DenseUnivariateRationalPolynomial &a, const DenseUnivariateRationalPolynomial &b, DenseUnivariateRationalPolynomial *s, DenseUnivariateRationalPolynomial *t) const
 s*a + t*b = c, where c in the ideal (a,b) More...
 
void differentiate (int k)
 Convert current object to its k-th derivative. More...
 
void differentiate ()
 Convert current object to its derivative. More...
 
DenseUnivariateRationalPolynomial derivative (int k) const
 Return k-th derivative. More...
 
DenseUnivariateRationalPolynomial derivative () const
 Compute derivative. More...
 
void integrate ()
 Compute the integral with constant of integration 0. More...
 
DenseUnivariateRationalPolynomial integral () const
 Compute integral with constant of integration 0. More...
 
RationalNumber evaluate (const RationalNumber &x) const
 Evaluate f(x) More...
 
Integer evaluate (const Integer &x) const
 Evaluate f(x) More...
 
template<class LargerRing >
LargerRing evaluate (const LargerRing &x) const
 Evaluate f(x) More...
 
bool isConstantTermZero () const
 Is the least signficant coefficient zero. More...
 
DenseUnivariateRationalPolynomial gcd (const DenseUnivariateRationalPolynomial &q, int type) const
 GCD(p, q) More...
 
DenseUnivariateRationalPolynomial gcd (const DenseUnivariateRationalPolynomial &q) const
 
Factors< DenseUnivariateRationalPolynomialsquareFree () const
 Square free. More...
 
bool divideByVariableIfCan ()
 Divide by variable if it is zero. More...
 
int numberOfSignChanges ()
 Number of coefficient sign variation. More...
 
void reciprocal ()
 Revert coefficients. More...
 
void homothetic (int k=1)
 Homothetic operation. More...
 
void scaleTransform (int k)
 Scale transform operation. More...
 
void negativeVariable ()
 Compute f(-x) More...
 
void negate ()
 Compute -f(x) More...
 
mpz_class rootBound ()
 Return an integer k such that any positive root alpha of the polynomial satisfies alpha < 2^k. More...
 
void taylorShift (int ts=-1)
 Taylor Shift operation by 1. More...
 
Intervals positiveRealRootIsolate (mpq_class width, int ts=-1)
 Positive real root isolation for square-free polynomials. More...
 
void positiveRealRootIsolate (mpq_class width, Intervals pIs, int ts=-1)
 
Intervals realRootIsolate (mpq_class width, int ts=-1)
 Real root isolation for square-free polynomials. More...
 
void refineRoot (Interval *a, mpq_class width)
 Refine a root. More...
 
Intervals refineRoots (Intervals &a, mpq_class width)
 Refine the roots. More...
 
void print (std::ostream &out) const
 Overload stream operator <<. More...
 
ExpressionTree convertToExpressionTree () const
 
Integer euclideanSize () const
 BPASEuclideanDomain methods.
 
DenseUnivariateRationalPolynomial euclideanDivision (const DenseUnivariateRationalPolynomial &b, DenseUnivariateRationalPolynomial *q=NULL) const
 
DenseUnivariateRationalPolynomial extendedEuclidean (const DenseUnivariateRationalPolynomial &b, DenseUnivariateRationalPolynomial *s=NULL, DenseUnivariateRationalPolynomial *t=NULL) const
 
DenseUnivariateRationalPolynomial quotient (const DenseUnivariateRationalPolynomial &b) const
 
DenseUnivariateRationalPolynomial remainder (const DenseUnivariateRationalPolynomial &b) const
 

Friends

DenseUnivariateRationalPolynomial operator+ (const mpq_class &c, const DenseUnivariateRationalPolynomial &p)
 
DenseUnivariateRationalPolynomial operator- (const mpq_class &c, const DenseUnivariateRationalPolynomial &p)
 
DenseUnivariateRationalPolynomial operator* (const mpq_class &c, const DenseUnivariateRationalPolynomial &p)
 
DenseUnivariateRationalPolynomial operator* (const sfixn &c, const DenseUnivariateRationalPolynomial &p)
 
DenseUnivariateRationalPolynomial operator/ (const mpq_class &c, const DenseUnivariateRationalPolynomial &p)
 

Detailed Description

A univariate polynomial with RationalNumber coefficients represented densely.

Constructor & Destructor Documentation

◆ DenseUnivariateRationalPolynomial() [1/4]

DenseUnivariateRationalPolynomial::DenseUnivariateRationalPolynomial ( )
inline

Construct a polynomial.

Parameters
d

◆ DenseUnivariateRationalPolynomial() [2/4]

DenseUnivariateRationalPolynomial::DenseUnivariateRationalPolynomial ( int  s)
inline

Construct a polynomial with degree.

Parameters
dSize of the polynomial

◆ DenseUnivariateRationalPolynomial() [3/4]

DenseUnivariateRationalPolynomial::DenseUnivariateRationalPolynomial ( const Integer e)
inline

Construct a polynomial with a coefficient.

Parameters
eThe coefficient

◆ DenseUnivariateRationalPolynomial() [4/4]

DenseUnivariateRationalPolynomial::DenseUnivariateRationalPolynomial ( const DenseUnivariateRationalPolynomial b)
inline

Copy constructor.

Parameters
bA densed univariate rationl polynomial

◆ ~DenseUnivariateRationalPolynomial()

DenseUnivariateRationalPolynomial::~DenseUnivariateRationalPolynomial ( )
inline

Destroy the polynomial.

Parameters

Member Function Documentation

◆ add()

void DenseUnivariateRationalPolynomial::add ( const DenseUnivariateRationalPolynomial b)

Add another polynomial to itself.

Parameters
bA univariate rational polynomial

◆ coefficient()

RationalNumber DenseUnivariateRationalPolynomial::coefficient ( int  k) const
inlinevirtual

Get a coefficient of the polynomial.

Parameters
kOffset

Implements BPASUnivariatePolynomial< RationalNumber, DenseUnivariateRationalPolynomial >.

◆ coefficients()

mpq_class* DenseUnivariateRationalPolynomial::coefficients ( int  k = 0) const
inline

Get coefficients of the polynomial, given start offset.

Parameters
kOffset

◆ content()

RationalNumber DenseUnivariateRationalPolynomial::content ( ) const
inline

Content of the polynomial.

Parameters

◆ degree()

Integer DenseUnivariateRationalPolynomial::degree ( ) const
inline

Get degree of the polynomial.

Parameters

◆ derivative() [1/2]

DenseUnivariateRationalPolynomial DenseUnivariateRationalPolynomial::derivative ( int  k) const
inlinevirtual

Return k-th derivative.

Parameters
kk-th derivative, k > 0

Implements BPASUnivariatePolynomial< RationalNumber, DenseUnivariateRationalPolynomial >.

◆ derivative() [2/2]

DenseUnivariateRationalPolynomial DenseUnivariateRationalPolynomial::derivative ( ) const
inlinevirtual

◆ differentiate() [1/2]

void DenseUnivariateRationalPolynomial::differentiate ( int  k)
virtual

Convert current object to its k-th derivative.

Parameters
kOrder of the derivative, k > 0

Implements BPASUnivariatePolynomial< RationalNumber, DenseUnivariateRationalPolynomial >.

◆ differentiate() [2/2]

void DenseUnivariateRationalPolynomial::differentiate ( )
inlinevirtual

Convert current object to its derivative.

Implements BPASUnivariatePolynomial< RationalNumber, DenseUnivariateRationalPolynomial >.

◆ diophantinEquationSolve()

void DenseUnivariateRationalPolynomial::diophantinEquationSolve ( const DenseUnivariateRationalPolynomial a,
const DenseUnivariateRationalPolynomial b,
DenseUnivariateRationalPolynomial s,
DenseUnivariateRationalPolynomial t 
) const

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

Parameters
aA univariate polynomial b: A univariate polynomial
sEither s = 0 or degree(s) < degree(b)
t

◆ divideByVariableIfCan()

bool DenseUnivariateRationalPolynomial::divideByVariableIfCan ( )

Divide by variable if it is zero.

Parameters

◆ evaluate() [1/3]

RationalNumber DenseUnivariateRationalPolynomial::evaluate ( const RationalNumber x) const
virtual

Evaluate f(x)

Parameters
xRational evaluation point

Implements BPASUnivariatePolynomial< RationalNumber, DenseUnivariateRationalPolynomial >.

◆ evaluate() [2/3]

Integer DenseUnivariateRationalPolynomial::evaluate ( const Integer x) const

Evaluate f(x)

Parameters
xEvaluation point

◆ evaluate() [3/3]

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

Evaluate f(x)

Parameters
xEvaluation point in a larger ring, i.e. a ring in which the rationals can be embedded

◆ gcd()

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

GCD(p, q)

Parameters
qThe other polynomial

◆ halfExtendedEuclidean()

DenseUnivariateRationalPolynomial DenseUnivariateRationalPolynomial::halfExtendedEuclidean ( const DenseUnivariateRationalPolynomial b,
DenseUnivariateRationalPolynomial g 
) const

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

Parameters
bA univariate polynomial
gThe GCD of a and b

◆ homothetic()

void DenseUnivariateRationalPolynomial::homothetic ( int  k = 1)

Homothetic operation.

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

◆ integral()

DenseUnivariateRationalPolynomial DenseUnivariateRationalPolynomial::integral ( ) const
inline

Compute integral with constant of integration 0.

◆ integrate()

void DenseUnivariateRationalPolynomial::integrate ( )

Compute the integral with constant of integration 0.

Parameters
Convertcurrent object to its integral with constant of integration 0

◆ isConstant()

int DenseUnivariateRationalPolynomial::isConstant ( ) const
inline

Is a constant.

Parameters

◆ isConstantTermZero()

bool DenseUnivariateRationalPolynomial::isConstantTermZero ( ) const

Is the least signficant coefficient zero.

Parameters

◆ isNegativeOne()

bool DenseUnivariateRationalPolynomial::isNegativeOne ( ) const
inline

Is polynomial a constatn -1.

Parameters

◆ isOne()

bool DenseUnivariateRationalPolynomial::isOne ( ) const
inline

Is polynomial a constatn 1.

Parameters

◆ isZero()

bool DenseUnivariateRationalPolynomial::isZero ( ) const
inline

Is zero polynomial.

Parameters

◆ lazyPseudoDivide() [1/2]

DenseUnivariateRationalPolynomial DenseUnivariateRationalPolynomial::lazyPseudoDivide ( const DenseUnivariateRationalPolynomial b,
RationalNumber c,
RationalNumber 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< RationalNumber, DenseUnivariateRationalPolynomial >.

◆ lazyPseudoDivide() [2/2]

DenseUnivariateRationalPolynomial DenseUnivariateRationalPolynomial::lazyPseudoDivide ( const DenseUnivariateRationalPolynomial b,
DenseUnivariateRationalPolynomial rem,
RationalNumber c,
RationalNumber d 
) const
virtual

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< RationalNumber, DenseUnivariateRationalPolynomial >.

◆ leadingCoefficient()

RationalNumber DenseUnivariateRationalPolynomial::leadingCoefficient ( ) const
inline

Get the leading coefficient.

Parameters

◆ monicDivide() [1/2]

DenseUnivariateRationalPolynomial DenseUnivariateRationalPolynomial::monicDivide ( const DenseUnivariateRationalPolynomial b)
virtual

Monic division Return quotient and itself become the remainder.

Parameters
bThe dividend polynomial

Implements BPASUnivariatePolynomial< RationalNumber, DenseUnivariateRationalPolynomial >.

◆ monicDivide() [2/2]

DenseUnivariateRationalPolynomial DenseUnivariateRationalPolynomial::monicDivide ( const DenseUnivariateRationalPolynomial b,
DenseUnivariateRationalPolynomial rem 
) const
virtual

Monic division Return quotient.

Parameters
bThe dividend polynomial
remThe remainder polynomial

Implements BPASUnivariatePolynomial< RationalNumber, DenseUnivariateRationalPolynomial >.

◆ negate()

void DenseUnivariateRationalPolynomial::negate ( )

Compute -f(x)

Parameters

◆ negativeOne()

void DenseUnivariateRationalPolynomial::negativeOne ( )
inline

Set polynomial to -1.

Parameters

◆ negativeVariable()

void DenseUnivariateRationalPolynomial::negativeVariable ( )

Compute f(-x)

Parameters

◆ numberOfSignChanges()

int DenseUnivariateRationalPolynomial::numberOfSignChanges ( )

Number of coefficient sign variation.

Parameters

◆ one()

void DenseUnivariateRationalPolynomial::one ( )
inline

Set polynomial to 1.

Parameters

◆ operator!=()

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

Overload operator !=.

Parameters
bA univariate rational polynoial

◆ operator*() [1/2]

DenseUnivariateRationalPolynomial DenseUnivariateRationalPolynomial::operator* ( const DenseUnivariateRationalPolynomial b) const

Multiply to another polynomial.

Parameters
bA univariate rational polynomial

◆ operator*() [2/2]

DenseUnivariateRationalPolynomial DenseUnivariateRationalPolynomial::operator* ( const RationalNumber e) const
inline

Overload operator *.

Parameters
eA rational number

◆ operator*=() [1/3]

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

Overload operator *=.

Parameters
bA univariate rational polynomial

◆ operator*=() [2/3]

DenseUnivariateRationalPolynomial& DenseUnivariateRationalPolynomial::operator*= ( const RationalNumber e)

Overload operator *=.

Parameters
eA rational number

◆ operator*=() [3/3]

DenseUnivariateRationalPolynomial& DenseUnivariateRationalPolynomial::operator*= ( const sfixn &  e)

Overload operator *=.

Parameters
eA constant

◆ operator+() [1/2]

DenseUnivariateRationalPolynomial DenseUnivariateRationalPolynomial::operator+ ( const DenseUnivariateRationalPolynomial b) const

Overload operator +.

Parameters
bA univariate rational polynomial

◆ operator+() [2/2]

DenseUnivariateRationalPolynomial DenseUnivariateRationalPolynomial::operator+ ( const RationalNumber c) const
inline

Overload Operator +.

Parameters
cA rational number

◆ operator+=() [1/2]

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

Overload Operator +=.

Parameters
bA univariate rational polynomial

◆ operator+=() [2/2]

DenseUnivariateRationalPolynomial& DenseUnivariateRationalPolynomial::operator+= ( const RationalNumber c)
inline

Overload Operator +=.

Parameters
cA rational number

◆ operator-() [1/3]

DenseUnivariateRationalPolynomial DenseUnivariateRationalPolynomial::operator- ( const DenseUnivariateRationalPolynomial b) const

Subtract another polynomial.

Parameters
bA univariate rational polynomial

◆ operator-() [2/3]

DenseUnivariateRationalPolynomial DenseUnivariateRationalPolynomial::operator- ( ) const

Overload operator -, negate.

Parameters

◆ operator-() [3/3]

DenseUnivariateRationalPolynomial DenseUnivariateRationalPolynomial::operator- ( const RationalNumber c) const
inline

Overload operator -.

Parameters
cA rational number

◆ operator-=() [1/2]

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

Overload operator -=.

Parameters
bA univariate rational polynomial

◆ operator-=() [2/2]

DenseUnivariateRationalPolynomial& DenseUnivariateRationalPolynomial::operator-= ( const RationalNumber c)
inline

Overload operator -=.

Parameters
cA rational number

◆ operator/() [1/2]

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

Overload operator / ExactDivision.

Parameters
bA univariate rational polynomial

◆ operator/() [2/2]

DenseUnivariateRationalPolynomial DenseUnivariateRationalPolynomial::operator/ ( const RationalNumber e) const
inline

Overload operator /.

Parameters
eA rational number

◆ operator/=() [1/2]

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

Overload operator /= ExactDivision.

Parameters
bA univariate rational polynomial

◆ operator/=() [2/2]

DenseUnivariateRationalPolynomial& DenseUnivariateRationalPolynomial::operator/= ( const RationalNumber e)

Overload operator /=.

Parameters
eA rational number

◆ operator<<()

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

Overload operator << replace by muplitying x^k.

Parameters
kThe exponent of variable, k > 0

Implements BPASUnivariatePolynomial< RationalNumber, DenseUnivariateRationalPolynomial >.

◆ operator<<=()

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

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

Parameters
kThe exponent of variable, k > 0

Implements BPASUnivariatePolynomial< RationalNumber, DenseUnivariateRationalPolynomial >.

◆ operator=()

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

Overload operator =.

Parameters
bA univariate rational polynoial

◆ operator==()

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

Overload operator ==.

Parameters
bA univariate rational polynoial

◆ operator>>()

DenseUnivariateRationalPolynomial DenseUnivariateRationalPolynomial::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< RationalNumber, DenseUnivariateRationalPolynomial >.

◆ operator>>=()

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

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

Parameters
kThe exponent of variable, k > 0

Implements BPASUnivariatePolynomial< RationalNumber, DenseUnivariateRationalPolynomial >.

◆ operator^()

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

Overload operator ^ replace xor operation by exponentiation.

Parameters
eThe exponentiation, e > 0

◆ operator^=()

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

Overload operator ^= replace xor operation by exponentiation.

Parameters
eThe exponentiation, e > 0

◆ positiveRealRootIsolate()

Intervals DenseUnivariateRationalPolynomial::positiveRealRootIsolate ( mpq_class  width,
int  ts = -1 
)
inline

Positive real root isolation for square-free polynomials.

Parameters
widthInterval's right - left < width : Taylor Shift option: 0 - CMY; -1 - optimized

◆ print()

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

Overload stream operator <<.

Parameters
outStream object
bA univariate rational polynoial

◆ pseudoDivide() [1/2]

DenseUnivariateRationalPolynomial DenseUnivariateRationalPolynomial::pseudoDivide ( const DenseUnivariateRationalPolynomial b,
RationalNumber 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< RationalNumber, DenseUnivariateRationalPolynomial >.

◆ pseudoDivide() [2/2]

DenseUnivariateRationalPolynomial DenseUnivariateRationalPolynomial::pseudoDivide ( const DenseUnivariateRationalPolynomial b,
DenseUnivariateRationalPolynomial rem,
RationalNumber 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< RationalNumber, DenseUnivariateRationalPolynomial >.

◆ realRootIsolate()

Intervals DenseUnivariateRationalPolynomial::realRootIsolate ( mpq_class  width,
int  ts = -1 
)
inline

Real root isolation for square-free polynomials.

Parameters
widthInterval's right - left < width : Taylor Shift option: 0 - CMY; -1 - optimized

◆ reciprocal()

void DenseUnivariateRationalPolynomial::reciprocal ( )

Revert coefficients.

Parameters

◆ refineRoot()

void DenseUnivariateRationalPolynomial::refineRoot ( Interval a,
mpq_class  width 
)
inline

Refine a root.

Parameters
aThe root
widthInterval's right - left < width

◆ refineRoots()

Intervals DenseUnivariateRationalPolynomial::refineRoots ( Intervals a,
mpq_class  width 
)
inline

Refine the roots.

a: The roots

Parameters
widthInterval's right - left < width

◆ rootBound()

mpz_class DenseUnivariateRationalPolynomial::rootBound ( )

Return an integer k such that any positive root alpha of the polynomial satisfies alpha < 2^k.

Parameters

◆ scaleTransform()

void DenseUnivariateRationalPolynomial::scaleTransform ( int  k)

Scale transform operation.

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

◆ setCoefficient()

void DenseUnivariateRationalPolynomial::setCoefficient ( int  k,
const RationalNumber value 
)
inlinevirtual

Set a coefficient of the polynomial.

Parameters
kOffset
valCoefficient

Implements BPASUnivariatePolynomial< RationalNumber, DenseUnivariateRationalPolynomial >.

◆ setVariableName()

void DenseUnivariateRationalPolynomial::setVariableName ( const Symbol x)
inlinevirtual

Set variable's name.

Parameters
xVarable's name

Implements BPASUnivariatePolynomial< RationalNumber, DenseUnivariateRationalPolynomial >.

◆ squareFree()

Factors<DenseUnivariateRationalPolynomial> DenseUnivariateRationalPolynomial::squareFree ( ) const

Square free.

Parameters

◆ subtract()

void DenseUnivariateRationalPolynomial::subtract ( const DenseUnivariateRationalPolynomial b)

Subtract another polynomial from itself.

Parameters
bA univariate rational polynomial

◆ taylorShift()

void DenseUnivariateRationalPolynomial::taylorShift ( int  ts = -1)

Taylor Shift operation by 1.

Parameters
tsAlgorithm id

◆ variable()

Symbol DenseUnivariateRationalPolynomial::variable ( ) const
inlinevirtual

◆ zero()

void DenseUnivariateRationalPolynomial::zero ( )
inline

Zero polynomial.

Parameters

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