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

A multivariate polynomial with RationalNumber coefficients represented sparely. More...

#include <mrpolynomial.h>

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

Public Member Functions

SparseMultivariateRationalPolynomial subresultantGCD (const SparseMultivariateRationalPolynomial &q) const
 
 SparseMultivariateRationalPolynomial ()
 Construct a multivariate polynomial. More...
 
 SparseMultivariateRationalPolynomial (int v)
 Construct a multivariate polynomial with specific number of variables. More...
 
 SparseMultivariateRationalPolynomial (const Symbol &x)
 Construct with a variable name such that f(x) = x;. More...
 
 SparseMultivariateRationalPolynomial (const std::string &str)
 Construct a polynomial by parsing the string str.
 
 SparseMultivariateRationalPolynomial (AltArr_t *aa, int vars, Symbol *varNames)
 Construct an SMQP given the head Node*. More...
 
 SparseMultivariateRationalPolynomial (const SparseMultivariateRationalPolynomial &b)
 Copy Constructor. More...
 
 SparseMultivariateRationalPolynomial (SparseMultivariateRationalPolynomial &&b)
 Move Constructor. More...
 
 SparseMultivariateRationalPolynomial (const SparseMultivariateIntegerPolynomial &b)
 Create a SMZP from an SMQP.
 
 SparseMultivariateRationalPolynomial (const Integer &r, int nvar=0)
 Create a SMQP from an Integer.
 
 SparseMultivariateRationalPolynomial (const RationalNumber &r, int nvar=0)
 Create a SMQP from a RationalNumber.
 
 SparseMultivariateRationalPolynomial (const DenseUnivariateRationalPolynomial &p)
 Create a SMQP from a univariate rational polynomial. More...
 
 SparseMultivariateRationalPolynomial (const SparseUnivariatePolynomial< SparseMultivariateRationalPolynomial > &s)
 Construct from a SUP<SMQP> polynomial such that the resulting SMQP has main variable equal to the variable of s. More...
 
 ~SparseMultivariateRationalPolynomial ()
 Destroy the polynomial and underlying node memory.
 
bool isZero () const
 Is this polynomial zero. More...
 
void zero ()
 Set this polynomial to zero. More...
 
bool isOne () const
 Is this polynomial one. More...
 
void one ()
 Sets this polynomial to one. More...
 
bool isNegativeOne () const
 Is this polynomial negative one. More...
 
void negativeOne ()
 Sets this polynomial to -1. More...
 
int isConstant () const
 Determine if this polynomial encodes a constant. More...
 
SparseMultivariateRationalPolynomial unitCanonical (SparseMultivariateRationalPolynomial *u, SparseMultivariateRationalPolynomial *v) const
 Obtain the unit normal (a.k.a canonical associate) of an element. More...
 
SparseMultivariateRationalPolynomialoperator= (const SparseMultivariateRationalPolynomial &b)
 Assign this polynomail to equal the specified.
 
SparseMultivariateRationalPolynomialoperator= (SparseMultivariateRationalPolynomial &&b)
 Movement assignment: move b to be this polynomail.
 
SparseMultivariateRationalPolynomialoperator= (const RationalNumber &r)
 Assign this polynomial to be equal to the constant ring element.
 
SparseMultivariateRationalPolynomial operator+ (const SparseMultivariateRationalPolynomial &b) const
 Add two SMQP polynomials together, *this and the specified.
 
SparseMultivariateRationalPolynomial operator+ (SparseMultivariateRationalPolynomial &&b) const
 
SparseMultivariateRationalPolynomialoperator+= (const SparseMultivariateRationalPolynomial &b)
 Add the polynomails a and b and return the sum. More...
 
SparseMultivariateRationalPolynomial operator- (const SparseMultivariateRationalPolynomial &b) const
 Subtract the specified polynomail from *this.
 
SparseMultivariateRationalPolynomial operator- (SparseMultivariateRationalPolynomial &&b) const
 
SparseMultivariateRationalPolynomial operator- () const
 Subtract the polynomial b from a and return the difference. More...
 
SparseMultivariateRationalPolynomialoperator-= (const SparseMultivariateRationalPolynomial &b)
 Update *this by subtracting the specified polynomial from it.
 
SparseMultivariateRationalPolynomial operator* (const SparseMultivariateRationalPolynomial &b) const
 Multiply *this by the specified polynomail.
 
SparseMultivariateRationalPolynomial operator* (SparseMultivariateRationalPolynomial &&b) const
 
SparseMultivariateRationalPolynomialoperator*= (const SparseMultivariateRationalPolynomial &b)
 Multiply the polynomials a and b, returning their product. More...
 
SparseMultivariateRationalPolynomial operator/ (const SparseMultivariateRationalPolynomial &b) const
 Divide *this by the specified polynomial.
 
SparseMultivariateRationalPolynomial operator/ (SparseMultivariateRationalPolynomial &&b) const
 
SparseMultivariateRationalPolynomialoperator/= (const SparseMultivariateRationalPolynomial &b)
 Update *this by dividing by the specified polynomial.
 
SparseMultivariateRationalPolynomial operator^ (long long int e) const
 Exponentiate *this by the input exponent integer. More...
 
SparseMultivariateRationalPolynomialoperator^= (long long int e)
 Update *this by exponentiating this to the input integer. More...
 
bool operator== (const SparseMultivariateRationalPolynomial &b) const
 Determine if *this is equal to the specified polynomial. More...
 
bool operator!= (const SparseMultivariateRationalPolynomial &b) const
 Determine if *this is not equal to the specified polynomial. More...
 
void print (std::ostream &os) const
 Output the string representation of *this to the input ostream.
 
void fromString (const std::string &str)
 Parse a polynomial from string str and place in *this.
 
std::vector< SparseMultivariateRationalPolynomialsubresultantChain (const SparseMultivariateRationalPolynomial &q, const Symbol &v, bool filled=1) const
 Given a polynomial q, compute the subresultant chain between this and q, viewing both polynomial recursively with main variable v. More...
 
std::vector< SparseMultivariateRationalPolynomialsubresultantChain (const SparseMultivariateRationalPolynomial &q, int filled=1) const
 Subresultant Chain with respect to the leaving variable of this. More...
 
std::vector< SparseMultivariateRationalPolynomialsubresultantAtIdx (const SparseMultivariateRationalPolynomial &q, const Symbol &v, int idx=0, specSRC_AAZ **lazyInfo=NULL) const
 Given a polynomial q, compute the subresultant of index idx between this and q, viewing both polynomial recursively with main variable v. More...
 
std::vector< SparseMultivariateRationalPolynomialsubresultantInitialAtIdx (const SparseMultivariateRationalPolynomial &q, const Symbol &v, int idx, Integer &mdegIdx, Integer &mdegIdx1, specSRC_AAZ **lazyInfo=NULL) const
 Compute the initials of two successive subresultants: S_{i}, S_{i+1} s.t. More...
 
std::vector< SparseMultivariateRationalPolynomialsubresultantInitialAtIdx (const SparseMultivariateRationalPolynomial &q, const Symbol &v, int idx=0, specSRC_AAZ **lazyInfo=NULL) const
 Compute the initials of two successive subresultants: S_{i}, S_{i+1} s.t. More...
 
std::vector< std::vector< SparseMultivariateRationalPolynomial > > exSubresultantChain (const SparseMultivariateRationalPolynomial &q, const Symbol &v) const
 Extended Subresultant Chain Return the list of subresultants with Besout Coefficients.
 
SparseMultivariateRationalPolynomial resultant (const SparseMultivariateRationalPolynomial &q, const Symbol &v) const
 
SparseMultivariateRationalPolynomial gcd (const SparseMultivariateRationalPolynomial &b) const
 Get GCD between *this and b.
 
SparseMultivariateRationalPolynomial primitiveGCD (const SparseMultivariateRationalPolynomial &b) const
 Get the GCD between *this and b as a primitive polynomial.
 
Factors< SparseMultivariateRationalPolynomialsquareFree () const
 Compute squarefree factorization of *this with respect to all of its variables.
 
Factors< SparseMultivariateRationalPolynomialsquareFree (const std::vector< Symbol > &vars) const
 Compute squarefree factorization of *this with respect to the list of variables, vars.
 
SparseMultivariateRationalPolynomial squareFreePart () const
 Computes the square free part of this polynomail. More...
 
SparseMultivariateRationalPolynomial squareFreePart (std::vector< Symbol > &vars) const
 Computes the square free part of this polynomail. More...
 
RationalNumber content () const
 Get the content with respect to all variables. More...
 
SparseMultivariateRationalPolynomial content (const std::vector< Symbol > &v) const
 Get the content of this polynomial with respect to the variables in the input vector v. More...
 
SparseMultivariateIntegerPolynomial primitivePartSMZP () const
 Get the primitive part with respect to all variables, returned as an SMZP. More...
 
SparseMultivariateIntegerPolynomial primitivePartSMZP (RationalNumber &content) const
 Get the primitive part with respect to all variables, returned as an SMZP. More...
 
SparseMultivariateRationalPolynomial primitivePart () const
 Get the primitive part with respect to all variables. More...
 
SparseMultivariateRationalPolynomial primitivePart (const Symbol &s) const
 Get the primitive part with respect to the variable s. More...
 
SparseMultivariateRationalPolynomial primitivePart (RationalNumber &content) const
 Get the primitive part with respect to all variables. More...
 
SparseMultivariateRationalPolynomial primitivePart (const std::vector< Symbol > &v) const
 Get the primitive part with respect to the variables in the vector v. More...
 
SparseMultivariateRationalPolynomial primitivePart (const std::vector< Symbol > &v, SparseMultivariateRationalPolynomial &content) const
 Get the primitive part with respect to the variables in the vector v. More...
 
SparseMultivariateRationalPolynomial mainPrimitivePart () const
 
SparseMultivariateRationalPolynomial mainPrimitivePart (SparseMultivariateRationalPolynomial &content) const
 
SparseMultivariateRationalPolynomial initial () const
 Get the leading coefficient of *this with respect to the main variable. More...
 
Symbol mainVariable () const
 Get the main variable. More...
 
int mainDegree () const
 Get the degree of the main variable. More...
 
SparseMultivariateRationalPolynomial rank () const
 Get the rank of this polynomial. More...
 
SparseMultivariateRationalPolynomial head () const
 Get the head of this polynomial. More...
 
SparseMultivariateRationalPolynomial tail () const
 Get the tail of this polynomial. More...
 
SparseMultivariateRationalPolynomial separant () const
 Get the separant of this polynomial, that is, its derivative with respect to the main variable. More...
 
int numberOfVariables () const
 Get the number of variables in this polynomial.
 
int numberOfRingVariables () const
 Get the number of variables in this polynomial ring.
 
Integer numberOfTerms () const
 Get the number of non-zero terms.
 
Integer degree () const
 Total degree.
 
Integer degree (const Symbol &) const
 Get the degree of a variable.
 
RationalNumber leadingCoefficient () const
 Get the leading coefficient.
 
RationalNumber trailingCoefficient () const
 Get the trailing coefficient.
 
RationalNumber coefficient (int, const int *) const
 Get a coefficient, given the exponent of each variable.
 
RationalNumber coefficient (const std::vector< int > &v) const
 Get the coefficient of this polynomial with respect to the monomial defined by exponent vector exps. More...
 
void setCoefficient (int, const int *, const RationalNumber &)
 Set a coefficient, given the exponent of each variable.
 
void setCoefficient (const std::vector< int > &v, const RationalNumber &r)
 Set the coefficient of this polynomial for the monomial defined by exponent vector exps to r. More...
 
void setRingVariables (const std::vector< Symbol > &)
 Set variables' names. More...
 
std::vector< SymbolringVariables () const
 Get variable names of all variables available to this polynomial, even those that have zero degree.
 
std::vector< Symbolvariables () const
 Get variable names of variables with non-zero degree;.
 
bool isEqual (const SparseMultivariateRationalPolynomial &b) const
 Determine if *this is equal to b. More...
 
void differentiate (const Symbol &s, int k)
 Convert current object to its k-th derivative. More...
 
void differentiate (const Symbol &s)
 Convert current object to its derivative. More...
 
SparseMultivariateRationalPolynomial derivative (const Symbol &s, int k) const
 Return k-th derivative. More...
 
SparseMultivariateRationalPolynomial derivative (const Symbol &s) const
 Compute derivative. More...
 
void integrate (const Symbol &s, int k)
 Convert current object to its k-th integral. More...
 
void integrate (const Symbol &s)
 Convert current object to its derivative. More...
 
SparseMultivariateRationalPolynomial integral (const Symbol &s, int k) const
 Return k-th integral. More...
 
SparseMultivariateRationalPolynomial integral (const Symbol &s) const
 Compute integral. More...
 
SparseMultivariateRationalPolynomial evaluate (int n, const Symbol *syms, const RationalNumber *xs) const
 Evaluate f(x) More...
 
SparseMultivariateRationalPolynomial evaluate (const std::vector< Symbol > &vars, const std::vector< RationalNumber > &values) const
 Evaluate *this polynomial given the variables and their values in vars, and values. More...
 
bool divide (const SparseMultivariateRationalPolynomial &b, SparseMultivariateRationalPolynomial &q, SparseMultivariateRationalPolynomial &r) const
 Divide this by polynomial b, returning the quotient and remainder in q and r, respectively. More...
 
SparseMultivariateRationalPolynomial operator% (const SparseMultivariateRationalPolynomial &b) const
 Get the remainder of *this divided by b.
 
SparseMultivariateRationalPolynomialoperator%= (const SparseMultivariateRationalPolynomial &b)
 Update *this by setting it to the remainder of *this divided by b.
 
SparseMultivariateRationalPolynomial operator% (const Integer &i) const
 
SparseMultivariateRationalPolynomialoperator%= (const Integer &i)
 
SparseMultivariateRationalPolynomial pseudoDivide (const SparseMultivariateRationalPolynomial &b, SparseMultivariateRationalPolynomial *quo=NULL, SparseMultivariateRationalPolynomial *mult=NULL, bool lazy=0) const
 Pseudo divide this by b. More...
 
SparseMultivariateRationalPolynomial pseudoDivideBySMZP (const SparseMultivariateRationalPolynomial &b, SparseMultivariateRationalPolynomial *quo=NULL, SparseMultivariateRationalPolynomial *mult=NULL, bool lazy=0) const
 Pseudo divide this by b. More...
 
SparseMultivariateRationalPolynomial operator+ (const ratNum_t &r) const
 Add *this and a ratNum_t.
 
SparseMultivariateRationalPolynomial operator+ (const RationalNumber &r) const
 Add *this and the RationalNumber r.
 
SparseMultivariateRationalPolynomialoperator+= (const ratNum_t &r)
 Update *this by adding r.
 
SparseMultivariateRationalPolynomialoperator+= (const RationalNumber &r)
 Update *this by adding the RationalNumber r to it.
 
SparseMultivariateRationalPolynomial operator- (const ratNum_t &r) const
 Subtract the ratNum_t r from *this.
 
SparseMultivariateRationalPolynomial operator- (const RationalNumber &r) const
 Subtract the RationalNumber r from *this.
 
SparseMultivariateRationalPolynomialoperator-= (const ratNum_t &r)
 Update *this by subtracting ratNum_t r.
 
SparseMultivariateRationalPolynomialoperator-= (const RationalNumber &r)
 Update *this by subtracting RationalNumber r.
 
SparseMultivariateRationalPolynomial operator* (const ratNum_t &r) const
 Multiply *this by ratNum_t r.
 
SparseMultivariateRationalPolynomial operator* (const RationalNumber &r) const
 Multiply *this by RationalNumber r.
 
SparseMultivariateRationalPolynomialoperator*= (const ratNum_t &r)
 Update *this by multiplying by ratNum_t r.
 
SparseMultivariateRationalPolynomialoperator*= (const RationalNumber &r)
 Update *this by multiplying by RationalNumber r.
 
SparseMultivariateRationalPolynomial operator/ (const ratNum_t &r) const
 Divide *this by ratNum_t r.
 
SparseMultivariateRationalPolynomial operator/ (const RationalNumber &r) const
 Divide *this by RationalNumber r.
 
SparseMultivariateRationalPolynomialoperator/= (const ratNum_t &r)
 Update *this by dividing by ratNum_t r.
 
SparseMultivariateRationalPolynomialoperator/= (const RationalNumber &r)
 Update *this by dividing by RationalNumber r.
 
SparseMultivariateRationalPolynomial operator[] (int index) const
 Get the polynomial term at index. More...
 
Symbol leadingVariable () const
 Get the leading variable, that is, the highest-order variable with positive degree of this polynomial. More...
 
Integer leadingVariableDegree () const
 Get the degree of this polynomial w.r.t the leading variable.
 
bool isConstantTermZero () const
 Is the contant term zero.
 
SparseMultivariateRationalPolynomial leadingCoefficientInVariable (const Symbol &x, int *e=NULL) const
 Get the leading coefficient w.r.t the input variable 'x'. More...
 
SparseUnivariatePolynomial< SparseMultivariateRationalPolynomialconvertToSUP (const Symbol &x) const
 Convert to a SUP<SMQP> given the variable 'x'. More...
 
void negate ()
 Negate all the coefficients of *this. More...
 
SparseMultivariateRationalPolynomial deepCopy () const
 Get a copy of this such that all underlying memory is NOT shared. More...
 
Factors< SparseMultivariateRationalPolynomialfactor () const
 Factors this polynomial into irreducible factors. More...
 
void straightLineProgram ()
 SLP representation of the polynomial.
 
void printSLP (std::ostream &out=std::cout) const
 Print SLP representation.
 
int positiveRealRootIsolation (Intervals *pIs, Intervals &apIs, mpq_class width, int ts=-1, bool s=0, bool check=1)
 Given one real root for x_1, .., x_{n-1}, isolate positive roots for x_n. More...
 
void randomPolynomial (int numvar, int nterms, unsigned long int coefBound, degree_t sparsity, bool includeNeg)
 Change *this to be a random non-zero polynomial. More...
 
void randomPolynomial (std::vector< int > maxDegs, unsigned long int coefBound, float sparsity, bool includeNeg)
 Change *this to be a random non-zero polynomial. More...
 
ExpressionTree convertToExpressionTree () const
 Convert *this to an ExpressionTree. More...
 
SparseMultivariateRationalPolynomial lexNormalForm (const std::vector< Symbol > &superNames, const std::vector< SparseMultivariateRationalPolynomial > &ts, std::vector< SparseMultivariateRationalPolynomial > *quoSet=NULL) const
 Normal Form (or Multi-Divisor Division (MDD)) Given the dividend, f, and a divisor-set of polynomials of size s, G[s] = {g_0, ..., g_{s-1}} to compute the reduce polynomial (remainder) r with respect to the G[s], Return (by reference) the remainder and the quotient set Q[s] = {q_0, ..., q_{s-1}}, such that f = q_0*g_0 + ... More...
 
SparseMultivariateRationalPolynomial lexNormalizeDim0 (const std::vector< Symbol > &superNames, const std::vector< SparseMultivariateRationalPolynomial > &ts, SparseMultivariateRationalPolynomial *A) const
 
SparseMultivariateRationalPolynomial triangularSetNormalForm (const TriangularSet< RationalNumber, SparseMultivariateRationalPolynomial > &ts, std::vector< SparseMultivariateRationalPolynomial > *quoSet) const
 Multi-Divisor Division (MDD) where the divisor-set is a Triangular Set Given the dividend, f, and a divisor-set of polynomials of size s, G[s] = {g_0, ..., g_{s-1}} to compute the reduce polynomial (remainder) r with respect to the G[s], Return (by reference) the remainder and the quotient set Q[s] = {q_0, ..., q_{s-1}}.
 
SparseMultivariateRationalPolynomial triangularSetPseudoDivide (const TriangularSet< RationalNumber, SparseMultivariateRationalPolynomial > &ts, std::vector< SparseMultivariateRationalPolynomial > *quoSet, SparseMultivariateRationalPolynomial *h) const
 Do the pseudo division of c by the triangular-set (divisor set) of B in the naive principle such that hPow*f = quoSet_0 * B_0 + ... More...
 
SparseMultivariateRationalPolynomial triangularSetOnlyNormalForm (const TriangularSet< RationalNumber, SparseMultivariateRationalPolynomial > &ts) const
 Specialized Normal Form where the divisor-set is a Triangular Set Given the dividend, f, and a divisor-set of polynomials of size s, G[s] = {g_0, ..., g_{s-1}} to compute the reduce polynomial (remainder) r with respect to the G[s].
 
Factors< SparseMultivariateRationalPolynomialFactoring (SparseMultivariateRationalPolynomial &a)
 
Factors< SparseMultivariateRationalPolynomialAlgebricFactorization (SparseMultivariateRationalPolynomial &minimal, SparseMultivariateRationalPolynomial *polyTotalcontent)
 

Static Public Member Functions

static SparseMultivariateRationalPolynomial interpolate (const std::vector< std::vector< RationalNumber >> &points, const std::vector< RationalNumber > &vals)
 Find the interpolating polynomial for the points and values specified by each vector, respectively. More...
 

Public Attributes

std::vector< SLPRepresentationslp
 

Friends

class SparseMultivariateIntegerPolynomial
 
std::istream & operator>> (std::istream &in, SparseMultivariateRationalPolynomial &p)
 Parse polynomial from in stream. More...
 
SparseMultivariateRationalPolynomial operator+ (const ratNum_t &r, const SparseMultivariateRationalPolynomial &b)
 Add ratNum_t r and SMQP b.
 
SparseMultivariateRationalPolynomial operator+ (const RationalNumber &r, const SparseMultivariateRationalPolynomial &b)
 Add RationalNumber r and SMQP b.
 
SparseMultivariateRationalPolynomial operator- (const ratNum_t &r, const SparseMultivariateRationalPolynomial &b)
 Subtract SMQP b from ratNum_t r.
 
SparseMultivariateRationalPolynomial operator- (const RationalNumber &r, const SparseMultivariateRationalPolynomial &b)
 Subtract SMQP b from ratNum_t r.
 
SparseMultivariateRationalPolynomial operator* (const ratNum_t &r, const SparseMultivariateRationalPolynomial &b)
 Multiply ratNum_t r and SMQP b.
 
SparseMultivariateRationalPolynomial operator* (const RationalNumber &r, const SparseMultivariateRationalPolynomial &b)
 Multiply RationalNumber r and SMQP b.
 
SparseMultivariateRationalPolynomial operator/ (const ratNum_t &r, const SparseMultivariateRationalPolynomial &b)
 Divide ratNum_t r by SMQP b.
 
SparseMultivariateRationalPolynomial operator/ (const RationalNumber &r, const SparseMultivariateRationalPolynomial &b)
 Divide RationalNumber r by SMQP b.
 

Detailed Description

A multivariate polynomial with RationalNumber coefficients represented sparely.

Only non-zero coefficients are encoded.

Constructor & Destructor Documentation

◆ SparseMultivariateRationalPolynomial() [1/8]

SparseMultivariateRationalPolynomial::SparseMultivariateRationalPolynomial ( )

Construct a multivariate polynomial.

◆ SparseMultivariateRationalPolynomial() [2/8]

SparseMultivariateRationalPolynomial::SparseMultivariateRationalPolynomial ( int  v)

Construct a multivariate polynomial with specific number of variables.

Parameters
vNumber of variables

◆ SparseMultivariateRationalPolynomial() [3/8]

SparseMultivariateRationalPolynomial::SparseMultivariateRationalPolynomial ( const Symbol x)

Construct with a variable name such that f(x) = x;.

Parameters
xThe variable name

◆ SparseMultivariateRationalPolynomial() [4/8]

SparseMultivariateRationalPolynomial::SparseMultivariateRationalPolynomial ( AltArr_t *  aa,
int  vars,
Symbol varNames 
)

Construct an SMQP given the head Node*.

The SMQP takes ownership of the Node list.

◆ SparseMultivariateRationalPolynomial() [5/8]

SparseMultivariateRationalPolynomial::SparseMultivariateRationalPolynomial ( const SparseMultivariateRationalPolynomial b)

Copy Constructor.

Does not reuse underlying memory allocated by b.

Parameters
bA sparse multivariate polynomial

◆ SparseMultivariateRationalPolynomial() [6/8]

SparseMultivariateRationalPolynomial::SparseMultivariateRationalPolynomial ( SparseMultivariateRationalPolynomial &&  b)

Move Constructor.

b: The r-value reference polynomial.

◆ SparseMultivariateRationalPolynomial() [7/8]

SparseMultivariateRationalPolynomial::SparseMultivariateRationalPolynomial ( const DenseUnivariateRationalPolynomial p)

Create a SMQP from a univariate rational polynomial.

Parameters
pA SUQP polynomial.

◆ SparseMultivariateRationalPolynomial() [8/8]

SparseMultivariateRationalPolynomial::SparseMultivariateRationalPolynomial ( const SparseUnivariatePolynomial< SparseMultivariateRationalPolynomial > &  s)

Construct from a SUP<SMQP> polynomial such that the resulting SMQP has main variable equal to the variable of s.

Parameters
sThe SUP<SMQP> polynomial

Member Function Documentation

◆ coefficient()

RationalNumber SparseMultivariateRationalPolynomial::coefficient ( const std::vector< int > &  exps) const
inlinevirtual

Get the coefficient of this polynomial with respect to the monomial defined by exponent vector exps.

The exponent vector should be defined over all variables in the polynomial ring.

Parameters
expsthe exponent vector

Implements BPASMultivariatePolynomial< RationalNumber, SparseMultivariateRationalPolynomial >.

◆ content() [1/2]

RationalNumber SparseMultivariateRationalPolynomial::content ( ) const

Get the content with respect to all variables.

That is, a single rational number. The content here is one such that this/content is an integer polynomial with content of 1.

Moreover, the content is one such that the leading coefficient of the corresponding primitive part is positive.

◆ content() [2/2]

SparseMultivariateRationalPolynomial SparseMultivariateRationalPolynomial::content ( const std::vector< Symbol > &  v) const

Get the content of this polynomial with respect to the variables in the input vector v.

Moreover, the content is one such that the leading coefficient of the corresponding primitive part is positive.

◆ convertToExpressionTree()

ExpressionTree SparseMultivariateRationalPolynomial::convertToExpressionTree ( ) const

Convert *this to an ExpressionTree.

returns the new ExpressionTree.

◆ convertToSUP()

SparseUnivariatePolynomial<SparseMultivariateRationalPolynomial> SparseMultivariateRationalPolynomial::convertToSUP ( const Symbol x) const

Convert to a SUP<SMQP> given the variable 'x'.

returns the SUP<SMQP>.

◆ deepCopy()

SparseMultivariateRationalPolynomial SparseMultivariateRationalPolynomial::deepCopy ( ) const

Get a copy of this such that all underlying memory is NOT shared.

Note, any following arithmetic operations on the returned result will result in possibly making the underlying memory shared again.

◆ derivative() [1/2]

SparseMultivariateRationalPolynomial SparseMultivariateRationalPolynomial::derivative ( const Symbol s,
int  k 
) const
virtual

Return k-th derivative.

Parameters
sSymbol to differentiate with respect to
kOrder of the k-th derivative, k > 0

Implements BPASMultivariatePolynomial< RationalNumber, SparseMultivariateRationalPolynomial >.

◆ derivative() [2/2]

SparseMultivariateRationalPolynomial SparseMultivariateRationalPolynomial::derivative ( const Symbol s) const
inlinevirtual

Compute derivative.

Parameters
sSymbol to differentiate with respect to

Implements BPASMultivariatePolynomial< RationalNumber, SparseMultivariateRationalPolynomial >.

◆ differentiate() [1/2]

void SparseMultivariateRationalPolynomial::differentiate ( const Symbol s,
int  k 
)
inlinevirtual

Convert current object to its k-th derivative.

Parameters
sSymbol to differentiate with respect to
kOrder of the derivative, k > 0

Implements BPASMultivariatePolynomial< RationalNumber, SparseMultivariateRationalPolynomial >.

◆ differentiate() [2/2]

void SparseMultivariateRationalPolynomial::differentiate ( const Symbol s)
inlinevirtual

Convert current object to its derivative.

Parameters
sSymbol to differentiate with respect to

Implements BPASMultivariatePolynomial< RationalNumber, SparseMultivariateRationalPolynomial >.

◆ divide()

bool SparseMultivariateRationalPolynomial::divide ( const SparseMultivariateRationalPolynomial b,
SparseMultivariateRationalPolynomial q,
SparseMultivariateRationalPolynomial r 
) const

Divide this by polynomial b, returning the quotient and remainder in q and r, respectively.

returns a boolean indicating if the division was exact.

◆ evaluate() [1/2]

SparseMultivariateRationalPolynomial SparseMultivariateRationalPolynomial::evaluate ( int  n,
const Symbol syms,
const RationalNumber xs 
) const
inlinevirtual

Evaluate f(x)

Parameters
symsArray of Symbols to evaluate at corresponding xs
xsEvaluation points

Implements BPASMultivariatePolynomial< RationalNumber, SparseMultivariateRationalPolynomial >.

◆ evaluate() [2/2]

SparseMultivariateRationalPolynomial SparseMultivariateRationalPolynomial::evaluate ( const std::vector< Symbol > &  vars,
const std::vector< RationalNumber > &  values 
) const
virtual

Evaluate *this polynomial given the variables and their values in vars, and values.

vars must be a list of variables which are a (not necessarily proper) subset. vars and values should have matching indices. i.e. the values of vars[i] is values[i].

returns a new SMQP where all variables in vars have been evaluated using the values given.

Implements BPASMultivariatePolynomial< RationalNumber, SparseMultivariateRationalPolynomial >.

◆ factor()

Factors<SparseMultivariateRationalPolynomial> SparseMultivariateRationalPolynomial::factor ( ) const

Factors this polynomial into irreducible factors.

The Factors may include a common numerical (rational) factor. See also, Factors.

◆ head()

SparseMultivariateRationalPolynomial SparseMultivariateRationalPolynomial::head ( ) const
virtual

Get the head of this polynomial.

That is, the initial multiplied by the rank.

returns the head.

Implements BPASRecursivelyViewedPolynomial< RationalNumber, SparseMultivariateRationalPolynomial >.

◆ initial()

SparseMultivariateRationalPolynomial SparseMultivariateRationalPolynomial::initial ( ) const
virtual

Get the leading coefficient of *this with respect to the main variable.

returns the initial.

Implements BPASRecursivelyViewedPolynomial< RationalNumber, SparseMultivariateRationalPolynomial >.

◆ integral() [1/2]

SparseMultivariateRationalPolynomial SparseMultivariateRationalPolynomial::integral ( const Symbol s,
int  k 
) const

Return k-th integral.

If Symbol s is not a symbol contained in this polynomial then it becomes the main variable of the result and integration proceeds as expected.

Parameters
sSymbol to differentiate with respect to
kOrder of the k-th derivative, k > 0

◆ integral() [2/2]

SparseMultivariateRationalPolynomial SparseMultivariateRationalPolynomial::integral ( const Symbol s) const
inline

Compute integral.

Parameters
sSymbol to differentiate with respect to

◆ integrate() [1/2]

void SparseMultivariateRationalPolynomial::integrate ( const Symbol s,
int  k 
)
inline

Convert current object to its k-th integral.

Parameters
sSymbol to differentiate with respect to
kOrder of the derivative, k > 0

◆ integrate() [2/2]

void SparseMultivariateRationalPolynomial::integrate ( const Symbol s)
inline

Convert current object to its derivative.

Parameters
sSymbol to differentiate with respect to

◆ interpolate()

static SparseMultivariateRationalPolynomial SparseMultivariateRationalPolynomial::interpolate ( const std::vector< std::vector< RationalNumber >> &  points,
const std::vector< RationalNumber > &  vals 
)
static

Find the interpolating polynomial for the points and values specified by each vector, respectively.

The points vector is a vector of vectors, where each element of the outer vector represents a multi-dimensional point. Each multi-dimensional point should have the same number of dimensions and in the same order.

returns the interpolating polynomial.

◆ isConstant()

int SparseMultivariateRationalPolynomial::isConstant ( ) const

Determine if this polynomial encodes a constant.

returns 0 if not a constant, 1 if a constant >= 0, -1 if a negative contstant.

◆ isEqual()

bool SparseMultivariateRationalPolynomial::isEqual ( const SparseMultivariateRationalPolynomial b) const

Determine if *this is equal to b.

This takes into account the variable ordering on both poylnomials in such a way that the same polynomial under different variable orderings are NOT equal.

◆ isNegativeOne()

bool SparseMultivariateRationalPolynomial::isNegativeOne ( ) const

Is this polynomial negative one.

returns true iff this polynomial encodes -1.

◆ isOne()

bool SparseMultivariateRationalPolynomial::isOne ( ) const

Is this polynomial one.

return true iff this polynomial encodes 1.

◆ isZero()

bool SparseMultivariateRationalPolynomial::isZero ( ) const

Is this polynomial zero.

returns true iff this polynomial encodes 0.

◆ leadingCoefficientInVariable()

SparseMultivariateRationalPolynomial SparseMultivariateRationalPolynomial::leadingCoefficientInVariable ( const Symbol x,
int *  e = NULL 
) const

Get the leading coefficient w.r.t the input variable 'x'.

Returns the leading exponent as e.

returns the coefficient as a new SMQP.

◆ leadingVariable()

Symbol SparseMultivariateRationalPolynomial::leadingVariable ( ) const

Get the leading variable, that is, the highest-order variable with positive degree of this polynomial.

returns the leading variable or the empty string if this polynomial has zero variables.

◆ lexNormalForm()

SparseMultivariateRationalPolynomial SparseMultivariateRationalPolynomial::lexNormalForm ( const std::vector< Symbol > &  superNames,
const std::vector< SparseMultivariateRationalPolynomial > &  ts,
std::vector< SparseMultivariateRationalPolynomial > *  quoSet = NULL 
) const

Normal Form (or Multi-Divisor Division (MDD)) Given the dividend, f, and a divisor-set of polynomials of size s, G[s] = {g_0, ..., g_{s-1}} to compute the reduce polynomial (remainder) r with respect to the G[s], Return (by reference) the remainder and the quotient set Q[s] = {q_0, ..., q_{s-1}}, such that f = q_0*g_0 + ...

  • q_{s-1}*g_{s-1} + r.

◆ mainDegree()

int SparseMultivariateRationalPolynomial::mainDegree ( ) const
virtual

Get the degree of the main variable.

returns the degree.

Implements BPASRecursivelyViewedPolynomial< RationalNumber, SparseMultivariateRationalPolynomial >.

◆ mainVariable()

Symbol SparseMultivariateRationalPolynomial::mainVariable ( ) const
inlinevirtual

Get the main variable.

That is, the highest-ordered variable with positive degree.

returns the main variable.

Implements BPASRecursivelyViewedPolynomial< RationalNumber, SparseMultivariateRationalPolynomial >.

◆ negate()

void SparseMultivariateRationalPolynomial::negate ( )

Negate all the coefficients of *this.

Note, that due to the sharing nature of underling nodes, this may alter the Nodes of other SMQP.

◆ negativeOne()

void SparseMultivariateRationalPolynomial::negativeOne ( )

Sets this polynomial to -1.

Maintains existing variable ordering.

◆ one()

void SparseMultivariateRationalPolynomial::one ( )

Sets this polynomial to one.

Maintains existing variable ordering.

◆ operator!=()

bool SparseMultivariateRationalPolynomial::operator!= ( const SparseMultivariateRationalPolynomial b) const

Determine if *this is not equal to the specified polynomial.

This takes into account the variable ordering on both poylnomials in such a way that the same polynomial under different variable orderings are NOT equal.

◆ operator*=()

SparseMultivariateRationalPolynomial& SparseMultivariateRationalPolynomial::operator*= ( const SparseMultivariateRationalPolynomial b)

Multiply the polynomials a and b, returning their product.

Update this by multiplying by the specified polynomail.

◆ operator+=()

SparseMultivariateRationalPolynomial& SparseMultivariateRationalPolynomial::operator+= ( const SparseMultivariateRationalPolynomial b)

Add the polynomails a and b and return the sum.

Update *this by adding the specified polynomail to it.

◆ operator-()

SparseMultivariateRationalPolynomial SparseMultivariateRationalPolynomial::operator- ( ) const

Subtract the polynomial b from a and return the difference.

Unary operation, return *this * -1.

◆ operator==()

bool SparseMultivariateRationalPolynomial::operator== ( const SparseMultivariateRationalPolynomial b) const

Determine if *this is equal to the specified polynomial.

This takes into account the variable ordering on both poylnomials in such a way that the same polynomial under different variable orderings are NOT equal.

◆ operator[]()

SparseMultivariateRationalPolynomial SparseMultivariateRationalPolynomial::operator[] ( int  index) const

Get the polynomial term at index.

Returns 0 if index is beyond the number of terms in this polynomial.

◆ operator^()

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

Exponentiate *this by the input exponent integer.

Treats negative exponents as positive.

◆ operator^=()

SparseMultivariateRationalPolynomial& SparseMultivariateRationalPolynomial::operator^= ( long long int  e)

Update *this by exponentiating this to the input integer.

Treats negative exponents as positive.

◆ positiveRealRootIsolation()

int SparseMultivariateRationalPolynomial::positiveRealRootIsolation ( Intervals pIs,
Intervals apIs,
mpq_class  width,
int  ts = -1,
bool  s = 0,
bool  check = 1 
)

Given one real root for x_1, .., x_{n-1}, isolate positive roots for x_n.

Parameters
mpIsRoots of x_n (Output)
apIsA root of previous polynomials
sdeal with 0: positive roots; 1: negative roots
check1: check the leading or tail coefficient; 0: do not
widthInterval's right - left < width
tsTaylor Shift option

Return 1: Need to refine preious polynomials 0: Found positive real roots

◆ primitivePart() [1/5]

SparseMultivariateRationalPolynomial SparseMultivariateRationalPolynomial::primitivePart ( ) const

Get the primitive part with respect to all variables.

This is equivalent to this / content().

◆ primitivePart() [2/5]

SparseMultivariateRationalPolynomial SparseMultivariateRationalPolynomial::primitivePart ( const Symbol s) const

Get the primitive part with respect to the variable s.

This is equivalent to this / content(s).

◆ primitivePart() [3/5]

SparseMultivariateRationalPolynomial SparseMultivariateRationalPolynomial::primitivePart ( RationalNumber content) const

Get the primitive part with respect to all variables.

This is equivalent to this / content().

Simultaneously returns the rational number content in the parameter content.

◆ primitivePart() [4/5]

SparseMultivariateRationalPolynomial SparseMultivariateRationalPolynomial::primitivePart ( const std::vector< Symbol > &  v) const

Get the primitive part with respect to the variables in the vector v.

returns the primitive part.

◆ primitivePart() [5/5]

SparseMultivariateRationalPolynomial SparseMultivariateRationalPolynomial::primitivePart ( const std::vector< Symbol > &  v,
SparseMultivariateRationalPolynomial content 
) const

Get the primitive part with respect to the variables in the vector v.

Returns the corresponding content in the content reference. returns the primitive part.

◆ primitivePartSMZP() [1/2]

SparseMultivariateIntegerPolynomial SparseMultivariateRationalPolynomial::primitivePartSMZP ( ) const

Get the primitive part with respect to all variables, returned as an SMZP.

This is equivalent to this / content();

◆ primitivePartSMZP() [2/2]

SparseMultivariateIntegerPolynomial SparseMultivariateRationalPolynomial::primitivePartSMZP ( RationalNumber content) const

Get the primitive part with respect to all variables, returned as an SMZP.

This is equivalent to this / content();

Simultaneously returns the rational number content in the parameter content.

◆ pseudoDivide()

SparseMultivariateRationalPolynomial SparseMultivariateRationalPolynomial::pseudoDivide ( const SparseMultivariateRationalPolynomial b,
SparseMultivariateRationalPolynomial quo = NULL,
SparseMultivariateRationalPolynomial mult = NULL,
bool  lazy = 0 
) const

Pseudo divide this by b.

The remainder is returned. if parameter quo is not null then the quotient is returned in quo. if parameter mult is not null then the multiplier is set to the initial of b raised to the power of degree(c, mvar(c)) - degree(b, mvar(c)) + 1.

returns the pseudo remainder.

◆ pseudoDivideBySMZP()

SparseMultivariateRationalPolynomial SparseMultivariateRationalPolynomial::pseudoDivideBySMZP ( const SparseMultivariateRationalPolynomial b,
SparseMultivariateRationalPolynomial quo = NULL,
SparseMultivariateRationalPolynomial mult = NULL,
bool  lazy = 0 
) const

Pseudo divide this by b.

The remainder is returned. This function assumes that both this and b are primitive, and thus can be viewed as integer polynomials. The psuedo-division is then performed over the integers and the quotient and remainder returned also so they are primitive.

If parameter quo is not null then the quotient is returned in quo. If parameter mult is not null then the multiplier is set to the initial of b raised to the power of degree(c, mvar(c)) - degree(b, mvar(c)) + 1.

Returns
the pseudo remainder.

◆ randomPolynomial() [1/2]

void SparseMultivariateRationalPolynomial::randomPolynomial ( int  numvar,
int  nterms,
unsigned long int  coefBound,
degree_t  sparsity,
bool  includeNeg 
)

Change *this to be a random non-zero polynomial.

numvar: number of variables nterms: number of terms coefBound: limit on the number of bits encoding the coefficients. sparsity: succesive terms are at most sparsity away from each other includeNeg: a bool to say if coefs can be randomly negative or all positive

◆ randomPolynomial() [2/2]

void SparseMultivariateRationalPolynomial::randomPolynomial ( std::vector< int >  maxDegs,
unsigned long int  coefBound,
float  sparsity,
bool  includeNeg 
)

Change *this to be a random non-zero polynomial.

The number of variables will be equal to the size of the maxDegs vector. The term whose monomial has exponents equal to those in maxDegs is guaranteed to exist in the resulting polynomial. A sparsity of 0 produces a dense polynomial. A sparsity of 1 produces only one term; one whose monomial has exponents equal to maxDegs.

coefBound: limit on the number of bits encoding the coefficients. sparsity: a percentage of zero-terms between term with maxDegs and the constant term. includeNeg: a bool to say if coefs can be randomly negative or all positive

◆ rank()

SparseMultivariateRationalPolynomial SparseMultivariateRationalPolynomial::rank ( ) const
virtual

Get the rank of this polynomial.

That is, the main variable raised to the main degree.

returns the rank.

Implements BPASRecursivelyViewedPolynomial< RationalNumber, SparseMultivariateRationalPolynomial >.

◆ separant()

SparseMultivariateRationalPolynomial SparseMultivariateRationalPolynomial::separant ( ) const
virtual

Get the separant of this polynomial, that is, its derivative with respect to the main variable.

Returns
the separant of this polynomial.

Implements BPASRecursivelyViewedPolynomial< RationalNumber, SparseMultivariateRationalPolynomial >.

◆ setCoefficient()

void SparseMultivariateRationalPolynomial::setCoefficient ( const std::vector< int > &  v,
const RationalNumber r 
)
inlinevirtual

Set the coefficient of this polynomial for the monomial defined by exponent vector exps to r.

The exponent vector should be defined over all variables in the polynomial ring.

Parameters
expsthe exponent vector
rthe ring element to set as coefficient.

Implements BPASMultivariatePolynomial< RationalNumber, SparseMultivariateRationalPolynomial >.

◆ setRingVariables()

void SparseMultivariateRationalPolynomial::setRingVariables ( const std::vector< Symbol > &  )
virtual

Set variables' names.

This method can be used to shrink, expand, re-order, and re-name the variables of the polynomial ring in which this polynomial belongs.

Any symbol in the input vector that matches the current variables is considered a re-order. Non-matching symbols are considered a re-name and this renames is done in the order they appear by increasing index. For example: Q[x,y,z] -> Q[y,s,t] will have y reordered to be the first variable, x renamed to s, and z renamed to t.

If the size of the input vector is greater than the current number of variables then the polynomial ring is being expanded. Matching variables from this polynomial are re-ordered as they appear in the input vector. Current variables that have no match in the input vector are re-named in order of increasing index of unused variables from the input vector. For example: Q[x,y,z] -> Q[s,t,z,x] will have y named to s, t a new variable, and z and x re-ordered accordingly.

If the size of the input vector is less than the current number of variables then the polynomial ring is shrink to remove variables. Variables in the input vector that are also found to be in the current polynomial ring are matched and re-ordered as necessary.

It is invalid to remove a variable which is non-zero in this polynomial.

Implements BPASMultivariatePolynomial< RationalNumber, SparseMultivariateRationalPolynomial >.

◆ squareFreePart() [1/2]

SparseMultivariateRationalPolynomial SparseMultivariateRationalPolynomial::squareFreePart ( ) const

Computes the square free part of this polynomail.

That is, the polynomial of this divided by all square factors. This is with respect to all variables.

◆ squareFreePart() [2/2]

SparseMultivariateRationalPolynomial SparseMultivariateRationalPolynomial::squareFreePart ( std::vector< Symbol > &  vars) const

Computes the square free part of this polynomail.

That is, the polynomial of this divided by all square factors. This is with respect to all variables.

◆ subresultantAtIdx()

std::vector<SparseMultivariateRationalPolynomial> SparseMultivariateRationalPolynomial::subresultantAtIdx ( const SparseMultivariateRationalPolynomial q,
const Symbol v,
int  idx = 0,
specSRC_AAZ **  lazyInfo = NULL 
) const

Given a polynomial q, compute the subresultant of index idx between this and q, viewing both polynomial recursively with main variable v.

This function in fact computes the subresultant of index idx and idx+1 and so both are returned, unless idx+1 does not exist (e.g. idx = this->degree(v)).

Optionally, this function also returns the principleCoefs of the subresultants of index i to this->degree(v).

Note
, if the subresultant of index idx+1 is degenerative then many subresultants will be returned until the first non-degenerative one is found.
, if this and q do not exist in the same ambient space, the space of p will define the ordering of the subresultants.
Parameters
qthe other polynomial for which to compute the subresultant chain.subresultantInit
vthe main variable to be used when computing the subresultant chain.
Returns
two successive subresultants: S_{i}, S_{i+1} s.t. deg(S_{i}) <= idx and deg(S_{i+1} > idx

◆ subresultantChain() [1/2]

std::vector<SparseMultivariateRationalPolynomial> SparseMultivariateRationalPolynomial::subresultantChain ( const SparseMultivariateRationalPolynomial q,
const Symbol v,
bool  filled = 1 
) const

Given a polynomial q, compute the subresultant chain between this and q, viewing both polynomial recursively with main variable v.

Note
, if this and q do not exist in the same ambient space, the space of p will define the ordering of the subresultants.
Parameters
qthe other polynomial for which to compute the subresultant chain.
vthe main variable to be used when computing the subresultant chain.
filledif false, degenerative cases are not returned and so indices in the returned chain do not necessarily match subresultant degrees
Returns
a vector containing the subresultant chain whereby index 0 is resultant and subresultant degrees increase with index.

◆ subresultantChain() [2/2]

std::vector<SparseMultivariateRationalPolynomial> SparseMultivariateRationalPolynomial::subresultantChain ( const SparseMultivariateRationalPolynomial q,
int  filled = 1 
) const

Subresultant Chain with respect to the leaving variable of this.

Return the list of subresultants

◆ subresultantInitialAtIdx() [1/2]

std::vector<SparseMultivariateRationalPolynomial> SparseMultivariateRationalPolynomial::subresultantInitialAtIdx ( const SparseMultivariateRationalPolynomial q,
const Symbol v,
int  idx,
Integer mdegIdx,
Integer mdegIdx1,
specSRC_AAZ **  lazyInfo = NULL 
) const

Compute the initials of two successive subresultants: S_{i}, S_{i+1} s.t.

deg(S_{i}) <= idx and deg(S_{i+1} > idx. This returns init(S_{i},v) and init(S_{i+1}, v) as a vector. The degrees degree(S_{i},v) and degree(S_{i+1}, v) are returned in mdegIdx and mdegIdx1, respectively. These degrees can be used to determine if certain subresultants are defective, i.e. degree(S_{i}, v) != i.

◆ subresultantInitialAtIdx() [2/2]

std::vector<SparseMultivariateRationalPolynomial> SparseMultivariateRationalPolynomial::subresultantInitialAtIdx ( const SparseMultivariateRationalPolynomial q,
const Symbol v,
int  idx = 0,
specSRC_AAZ **  lazyInfo = NULL 
) const
inline

Compute the initials of two successive subresultants: S_{i}, S_{i+1} s.t.

deg(S_{i}) <= idx and deg(S_{i+1} > idx. This returns init(S_{i},v) and init(S_{i+1}, v) as a vector.

◆ tail()

SparseMultivariateRationalPolynomial SparseMultivariateRationalPolynomial::tail ( ) const
virtual

Get the tail of this polynomial.

That is, This - this.head().

returns the tail.

Implements BPASRecursivelyViewedPolynomial< RationalNumber, SparseMultivariateRationalPolynomial >.

◆ triangularSetPseudoDivide()

SparseMultivariateRationalPolynomial SparseMultivariateRationalPolynomial::triangularSetPseudoDivide ( const TriangularSet< RationalNumber, SparseMultivariateRationalPolynomial > &  ts,
std::vector< SparseMultivariateRationalPolynomial > *  quoSet,
SparseMultivariateRationalPolynomial h 
) const

Do the pseudo division of c by the triangular-set (divisor set) of B in the naive principle such that hPow*f = quoSet_0 * B_0 + ...

  • quoSet_{nSet-1} * B_{nSet-1} + rem. Quotients are returned in quoSet, and remainder in rem. If hPow is not NULL then *hPow is set to the initial of b to the power of the exact number of division steps which occurred.. nvar : size of exponent vectors nSet : the size of the divisor set

◆ unitCanonical()

SparseMultivariateRationalPolynomial SparseMultivariateRationalPolynomial::unitCanonical ( SparseMultivariateRationalPolynomial u,
SparseMultivariateRationalPolynomial v 
) 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.

◆ zero()

void SparseMultivariateRationalPolynomial::zero ( )

Set this polynomial to zero.

Maintains existing variable ordering.

Friends And Related Function Documentation

◆ operator>>

std::istream& operator>> ( std::istream &  in,
SparseMultivariateRationalPolynomial p 
)
friend

Parse polynomial from in stream.

Exactly one line is parsed.


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