Basic Polynomial Algebra Subprograms (BPAS)  v. 1.791
Public Member Functions | Friends | List of all members
TriangularSet< Field, RecursivePoly > Class Template Reference

A triangular set templated by a multivariate polynomial over a field. More...

#include <triangularset.hpp>

The $\texttt{TriangularSet}$ class is a container class for handing triangular sets, i.e. , sets of polynomials of $\mathbb{K}[x_1,\ldots,x_n]$, with $ $\mathbb{K}$ $ a field, and variable ordering $x_1<\cdots x_n$, with pairwise distinct main variables. This class is intended mainly to support the regular chain classes. For the notions of a regular chain and a triangular set see https://en.wikipedia.org/wiki/Regular_chain and https://en.wikipedia.org/wiki/Wu%27s_method_of_characteristic_set#Triangular_set and as the references therein. More... (pdf)
Simplified semantic inheritance diagram for TriangularSet< Field, RecursivePoly >:
- Full inheritance diagram for TriangularSet< Field, RecursivePoly >:
[legend]

Public Member Functions

 TriangularSet ()
 Default constructor: creates an empty triangular set of variable size with empty list of transcendentals. More...
 
 TriangularSet (const std::vector< Symbol > &xs)
 Construct an empty triangular set of fixed size in the s decreasingly ordered variables given by xs with empty list of transcendentals. More...
 
 TriangularSet (const std::vector< Symbol > &xs, const std::vector< Symbol > &ts)
 Construct an empty triangular set of fixed size in the s decreasingly ordered variables given by xs and list of transcendentals given by ts. More...
 
 TriangularSet (const RecursivePoly &p)
 Construct a variable triangular set containing p, such that the variables of p are treated as (potentially algebraic) variables, with empty list of transcendentals. More...
 
 TriangularSet (const RecursivePoly &p, const std::vector< Symbol > &ts)
 Construct a variable triangular set containing p, such that the variables in ts are treated as transcendental, while any remaining variables of p are treated as (potentially algebraic) variables. More...
 
 TriangularSet (const TriangularSet< Field, RecursivePoly > &a)
 Copy constructor. More...
 
 TriangularSet (TriangularSet< Field, RecursivePoly > &&a)
 Copy constructor. More...
 
 TriangularSet (const std::vector< Symbol > &&vs, const std::vector< Symbol > &&avs, const std::vector< Symbol > &&tvs, const std::vector< RecursivePoly > &&ts, TriangularSetMode tsm, const mpz_class &c)
 Move constructor. More...
 
 ~TriangularSet ()
 Deconstructor. More...
 
bool isEmpty () const
 Copy an object derived from abstract BPASTriangularSet class to type of current object. More...
 
bool isConstantPolynomial (const RecursivePoly &p) const
 Tests if the polynomial is constant relative to the TriangularSet, i.e., whether it is and element of the Field or its only variables are transcendental. More...
 
TriangularSet< Field, RecursivePoly > & operator= (const TriangularSet< Field, RecursivePoly > &a)
 Assignment operator =. More...
 
BPASTriangularSet< Field, RecursivePoly > & operator= (const BPASTriangularSet< Field, RecursivePoly > &a) override
 Assignment operator =. More...
 
TriangularSet< Field, RecursivePoly > & operator= (TriangularSet< Field, RecursivePoly > &&a)
 Move assignment operator =. More...
 
BPASTriangularSet< Field, RecursivePoly > & operator= (BPASTriangularSet< Field, RecursivePoly > &&a) override
 Move assignment operator =. More...
 
TriangularSet< Field, RecursivePoly > operator+ (const RecursivePoly &p)
 Add operator +. More...
 
TriangularSet< Field, RecursivePoly > & operator+= (const RecursivePoly &p)
 Add assignment operator +=. More...
 
bool operator== (const TriangularSet< Field, RecursivePoly > &a) const
 Identity operator ==. More...
 
bool operator!= (const TriangularSet< Field, RecursivePoly > &a) const
 Negated identity operator !=. More...
 
int numberOfVariables () const
 Get the number of variables. More...
 
int size () const
 Get the size of the triangular set. More...
 
int numberOfAlgebraicVariables () const
 Get the number of algebraic variables. More...
 
int numberOfTranscendentalVariables () const
 Get the number of transcendental variables. More...
 
std::vector< Symbolvariables () const
 Get the variable names in decreasing order. More...
 
std::vector< SymbolmainVariables () const
 Get the algebraic variables. More...
 
std::vector< SymboltranscendentalVariables () const
 Get the transcendentalVariables variables. More...
 
std::vector< SymbolallVariables () const
 Get the list of variables followed by the transcendental variables. More...
 
bool isAlgebraic (const Symbol &s) const
 Determine if the input variable s is algebraic, i.e., if the triangular set contains a polynomial with s its as leading variable. More...
 
bool isStronglyNormalized () const
 Return true if the triangular set is strongly normalized, i.e., the initals of all polynomials are in the Field; return false otherwise. More...
 
std::vector< RecursivePoly > polynomials () const
 Get the vector of polynoials in the triangular set. More...
 
int dimension () const
 Return the dimension of the triangular set (understood in terms of the space of (potentially algebraic) variables). More...
 
int dimensionLower (Symbol v) const
 Return the dimension of the triangular set lower(v) (understood in terms of the space of (potentially algebraic) variables). More...
 
int codimension () const
 Return the codimension of the triangular set (understood in terms of the space of (potentially algebraic) variables). More...
 
bool canComputeInDimensionZero (const RecursivePoly &p, bool excludeMainVariable=false) const
 Test to determine whether the triangular set can be treated as zero dimensional, i.e., whether the triangular set becomes zero dimensional when all non-algebraic variables are removed and whether the polynomial p contains only algebraic variables. More...
 
bool isZeroDimensionalMathematically () const
 Test to determine if only algebraic variables (aside from transcendentals) appear in the polynomials of the triangular set. More...
 
RecursivePoly select (const Symbol &s) const
 Select a polynomial given the leading variable; if no such polynomial, 0 is returned. More...
 
void makePrimitive ()
 Replace each polynomial of the triangular set with its primitive part. More...
 
void lower (const Symbol &s, BPASTriangularSet< Field, RecursivePoly > &ts) const
 Returns the triangular set consisting of polynomials with main variable strictly less than s. More...
 
void upper (const Symbol &s, BPASTriangularSet< Field, RecursivePoly > &ts) const
 Returns the triangular set consisting of polynomials with main variable strictly greater than s. More...
 
void cutChain (const TriangularSet< Field, RecursivePoly > &T, const Symbol &v, TriangularSet< Field, RecursivePoly > &Tlv, RecursivePoly &Tv, TriangularSet< Field, RecursivePoly > &Tgv) const
 Cut an input triangular set at the symbol v, returning the subchain below v, the polynomial with main variable v and the subchain above v. More...
 
void cutChain (const Symbol &v, RecursivePoly &Tv, TriangularSet< Field, RecursivePoly > &Tgv) const
 Cut the current object at the symbol v, returning the polynomial with main variable v and the subchain above v. More...
 
void cutChain (const Symbol &v, TriangularSet< Field, RecursivePoly > &Tlv, RecursivePoly &Tv) const
 Cut the current object at the symbol v, returning the subchain below v and the polynomial with main variable v. More...
 
RecursivePoly pseudoDivide (const RecursivePoly &p, std::vector< RecursivePoly > *quo=NULL, RecursivePoly *c=NULL) const
 Pseudo division: return the pseudo-remainder, the pseudo-quotients and c such that c*p = ∑(q_i T_i) + r. More...
 
RecursivePoly normalForm (const RecursivePoly &p, std::vector< RecursivePoly > *Q=NULL) const
 Return the normalForm of the input polynomial modulo the triangular set in the sense of Groebner basis. More...
 
RecursivePoly reduce (const RecursivePoly &p) const
 Reduce the input polynomial modulo the triangular set. More...
 
RecursivePoly reduce (const RecursivePoly &p, RecursivePoly &c, bool takeMainPrimitivePart=false, bool onlyInDimZero=false) const
 returns r such that c*r = p modulo sat(T) such that c has no algebraic variables, and c is returned as an input parameter. More...
 
RecursivePoly randomTriangularSetPolynomial (std::vector< Symbol > variables, int algVar, std::vector< Symbol > transcendentalVariables, int nTerms, unsigned long int coefBound, int pSparsity, bool includeNeg)
 Generate a random triangular set polynomial based on its number of terms. More...
 
RecursivePoly randomTriangularSetPolynomial (std::vector< Symbol > variables, int algVar, std::vector< Symbol > transcendentalVariables, std::vector< int > maxDegs, unsigned long int coefBound, double pSparsity, bool includeNeg)
 Generate a random triangular set polynomial based on its maximum degrees in its variables. More...
 
void randomTriangularSet (int nVars, int nAlgVars, int nTrcVars, int nTerms, unsigned long int coefBound, int pSparsity, bool includeNeg)
 Generate a random triangular set based on the number of terms of its polynomials. More...
 
void randomStronglyNormalizedTriangularSet (int nVars, int nAlgVars, int nTrcVars, int nTerms, unsigned long int coefBound, int pSparsity, bool includeNeg)
 Generate a random strongly normalized triangular set based on the number of terms in its polynomials. More...
 
void display ()
 Display the triangular set. More...
 
ExpressionTree convertToExpressionTree () const
 Convert a triangular set to an expression tree (array of its polynomials). More...
 

Friends

std::ostream & operator<< (std::ostream &out, const TriangularSet< Field, RecursivePoly > &a)
 Overload stream operator << for triangular sets. More...
 

Detailed Description

template<class Field, class RecursivePoly>
class TriangularSet< Field, RecursivePoly >

A triangular set templated by a multivariate polynomial over a field.

The field should be a BPASField and the multivariate polynomial should be recursively viewed, as in BPASRecursivelyViewedPolynomial.

Constructor & Destructor Documentation

◆ TriangularSet() [1/8]

template<class Field, class RecursivePoly>
TriangularSet< Field, RecursivePoly >::TriangularSet ( )

Default constructor: creates an empty triangular set of variable size with empty list of transcendentals.

Parameters

◆ TriangularSet() [2/8]

template<class Field, class RecursivePoly>
TriangularSet< Field, RecursivePoly >::TriangularSet ( const std::vector< Symbol > &  xs)

Construct an empty triangular set of fixed size in the s decreasingly ordered variables given by xs with empty list of transcendentals.

Parameters
xsThe variable names

◆ TriangularSet() [3/8]

template<class Field, class RecursivePoly>
TriangularSet< Field, RecursivePoly >::TriangularSet ( const std::vector< Symbol > &  xs,
const std::vector< Symbol > &  ts 
)

Construct an empty triangular set of fixed size in the s decreasingly ordered variables given by xs and list of transcendentals given by ts.

Parameters
xsThe variable names
tsThe transcendental variable names

◆ TriangularSet() [4/8]

template<class Field, class RecursivePoly>
TriangularSet< Field, RecursivePoly >::TriangularSet ( const RecursivePoly &  p)

Construct a variable triangular set containing p, such that the variables of p are treated as (potentially algebraic) variables, with empty list of transcendentals.

Parameters
pThe recursively viewed polynomial to add

◆ TriangularSet() [5/8]

template<class Field, class RecursivePoly>
TriangularSet< Field, RecursivePoly >::TriangularSet ( const RecursivePoly &  p,
const std::vector< Symbol > &  ts 
)

Construct a variable triangular set containing p, such that the variables in ts are treated as transcendental, while any remaining variables of p are treated as (potentially algebraic) variables.

Parameters
pThe recursively viewed polynomial to add
tsThe transcendental variable names

◆ TriangularSet() [6/8]

template<class Field, class RecursivePoly>
TriangularSet< Field, RecursivePoly >::TriangularSet ( const TriangularSet< Field, RecursivePoly > &  a)

Copy constructor.

Parameters
aA triangular set

◆ TriangularSet() [7/8]

template<class Field, class RecursivePoly>
TriangularSet< Field, RecursivePoly >::TriangularSet ( TriangularSet< Field, RecursivePoly > &&  a)

Copy constructor.

Parameters
aA regular chain Copy constructor
aA zero dimensional regular chain Move constructor.
aAn r-value triangular set

◆ TriangularSet() [8/8]

template<class Field, class RecursivePoly>
TriangularSet< Field, RecursivePoly >::TriangularSet ( const std::vector< Symbol > &&  vs,
const std::vector< Symbol > &&  avs,
const std::vector< Symbol > &&  tvs,
const std::vector< RecursivePoly > &&  ts,
TriangularSetMode  tsm,
const mpz_class &  c 
)

Move constructor.

Parameters
aAn r-value regular chain Move constructor
aAn r-value zero dimensional regular chain Computational constructor: creates a triangular set given all the data.
vsrvalue reference to variables of the triangular set
avsrvalue reference to algebraic variables of the triangular set
tvsrvalue reference to transcendental variables of the triangular set
polysrvalue reference to polynomials of the triangular set
tsmwhether the triangular set is variable or fixed
ccharacteristic of the triangular set

◆ ~TriangularSet()

template<class Field, class RecursivePoly>
TriangularSet< Field, RecursivePoly >::~TriangularSet ( )

Deconstructor.

Parameters

Member Function Documentation

◆ allVariables()

template<class Field, class RecursivePoly>
std::vector<Symbol> TriangularSet< Field, RecursivePoly >::allVariables ( ) const

Get the list of variables followed by the transcendental variables.

Parameters

◆ canComputeInDimensionZero()

template<class Field, class RecursivePoly>
bool TriangularSet< Field, RecursivePoly >::canComputeInDimensionZero ( const RecursivePoly &  p,
bool  excludeMainVariable = false 
) const

Test to determine whether the triangular set can be treated as zero dimensional, i.e., whether the triangular set becomes zero dimensional when all non-algebraic variables are removed and whether the polynomial p contains only algebraic variables.

Parameters
pa recursively viewed polynomial
p(optional) flag to exclude the main variable of p when determining whether it contains only algebraic variables (default false)

◆ codimension()

template<class Field, class RecursivePoly>
int TriangularSet< Field, RecursivePoly >::codimension ( ) const
inline

Return the codimension of the triangular set (understood in terms of the space of (potentially algebraic) variables).

Parameters

◆ convertToExpressionTree()

template<class Field, class RecursivePoly>
ExpressionTree TriangularSet< Field, RecursivePoly >::convertToExpressionTree ( ) const
inline

Convert a triangular set to an expression tree (array of its polynomials).

Parameters

◆ cutChain() [1/3]

template<class Field, class RecursivePoly>
void TriangularSet< Field, RecursivePoly >::cutChain ( const TriangularSet< Field, RecursivePoly > &  T,
const Symbol v,
TriangularSet< Field, RecursivePoly > &  Tlv,
RecursivePoly &  Tv,
TriangularSet< Field, RecursivePoly > &  Tgv 
) const

Cut an input triangular set at the symbol v, returning the subchain below v, the polynomial with main variable v and the subchain above v.

Parameters
Ta triangular set
va symbol
Tlvthe subchain of T below v
Tvthe recursively viewed polynomial with main variable v, if it exists
Tgvthe subchain of T above v

◆ cutChain() [2/3]

template<class Field, class RecursivePoly>
void TriangularSet< Field, RecursivePoly >::cutChain ( const Symbol v,
RecursivePoly &  Tv,
TriangularSet< Field, RecursivePoly > &  Tgv 
) const

Cut the current object at the symbol v, returning the polynomial with main variable v and the subchain above v.

Parameters
va symbol
Tvthe recursively viewed polynomial with main variable v, if it exists
Tgvthe subchain of the current object above v

◆ cutChain() [3/3]

template<class Field, class RecursivePoly>
void TriangularSet< Field, RecursivePoly >::cutChain ( const Symbol v,
TriangularSet< Field, RecursivePoly > &  Tlv,
RecursivePoly &  Tv 
) const

Cut the current object at the symbol v, returning the subchain below v and the polynomial with main variable v.

Parameters
va symbol
Tlvthe subchain of the current object below v
Tvthe recursively viewed polynomial with main variable v, if it exists

◆ dimension()

template<class Field, class RecursivePoly>
int TriangularSet< Field, RecursivePoly >::dimension ( ) const
inline

Return the dimension of the triangular set (understood in terms of the space of (potentially algebraic) variables).

Parameters

◆ dimensionLower()

template<class Field, class RecursivePoly>
int TriangularSet< Field, RecursivePoly >::dimensionLower ( Symbol  v) const
inline

Return the dimension of the triangular set lower(v) (understood in terms of the space of (potentially algebraic) variables).

Parameters

◆ display()

template<class Field, class RecursivePoly>
void TriangularSet< Field, RecursivePoly >::display ( )

Display the triangular set.

Parameters

◆ isAlgebraic()

template<class Field, class RecursivePoly>
bool TriangularSet< Field, RecursivePoly >::isAlgebraic ( const Symbol s) const
inline

Determine if the input variable s is algebraic, i.e., if the triangular set contains a polynomial with s its as leading variable.

Parameters
sthe input variable

◆ isConstantPolynomial()

template<class Field, class RecursivePoly>
bool TriangularSet< Field, RecursivePoly >::isConstantPolynomial ( const RecursivePoly &  p) const

Tests if the polynomial is constant relative to the TriangularSet, i.e., whether it is and element of the Field or its only variables are transcendental.

Parameters
pa recursively viewed polynomial

◆ isEmpty()

template<class Field, class RecursivePoly>
bool TriangularSet< Field, RecursivePoly >::isEmpty ( ) const

Copy an object derived from abstract BPASTriangularSet class to type of current object.

Parameters
tstriangular set to copy Tests if the TriangularSet is empty.

◆ isStronglyNormalized()

template<class Field, class RecursivePoly>
bool TriangularSet< Field, RecursivePoly >::isStronglyNormalized ( ) const
inline

Return true if the triangular set is strongly normalized, i.e., the initals of all polynomials are in the Field; return false otherwise.

Parameters

◆ isZeroDimensionalMathematically()

template<class Field, class RecursivePoly>
bool TriangularSet< Field, RecursivePoly >::isZeroDimensionalMathematically ( ) const

Test to determine if only algebraic variables (aside from transcendentals) appear in the polynomials of the triangular set.

Parameters

◆ lower()

template<class Field, class RecursivePoly>
void TriangularSet< Field, RecursivePoly >::lower ( const Symbol s,
BPASTriangularSet< Field, RecursivePoly > &  ts 
) const
virtual

Returns the triangular set consisting of polynomials with main variable strictly less than s.

Parameters
ssymbol of the main variable of specified element of the triangular set
tsThe returned triangular set

Implements BPASTriangularSet< Field, RecursivePoly >.

◆ mainVariables()

template<class Field, class RecursivePoly>
std::vector<Symbol> TriangularSet< Field, RecursivePoly >::mainVariables ( ) const
inline

Get the algebraic variables.

Parameters

◆ makePrimitive()

template<class Field, class RecursivePoly>
void TriangularSet< Field, RecursivePoly >::makePrimitive ( )

Replace each polynomial of the triangular set with its primitive part.

Parameters

◆ normalForm()

template<class Field, class RecursivePoly>
RecursivePoly TriangularSet< Field, RecursivePoly >::normalForm ( const RecursivePoly &  p,
std::vector< RecursivePoly > *  Q = NULL 
) const
virtual

Return the normalForm of the input polynomial modulo the triangular set in the sense of Groebner basis.

Parameters
pinnput recursively viewed polynomial
Q(optional) the array of quotient

Implements BPASTriangularSet< Field, RecursivePoly >.

◆ numberOfAlgebraicVariables()

template<class Field, class RecursivePoly>
int TriangularSet< Field, RecursivePoly >::numberOfAlgebraicVariables ( ) const
inline

Get the number of algebraic variables.

Parameters

◆ numberOfTranscendentalVariables()

template<class Field, class RecursivePoly>
int TriangularSet< Field, RecursivePoly >::numberOfTranscendentalVariables ( ) const
inline

Get the number of transcendental variables.

Parameters

◆ numberOfVariables()

template<class Field, class RecursivePoly>
int TriangularSet< Field, RecursivePoly >::numberOfVariables ( ) const
inlinevirtual

Get the number of variables.

Parameters

Implements BPASTriangularSet< Field, RecursivePoly >.

◆ operator!=()

template<class Field, class RecursivePoly>
bool TriangularSet< Field, RecursivePoly >::operator!= ( const TriangularSet< Field, RecursivePoly > &  a) const

Negated identity operator !=.

Parameters
aA triangular set

◆ operator+()

template<class Field, class RecursivePoly>
TriangularSet<Field,RecursivePoly> TriangularSet< Field, RecursivePoly >::operator+ ( const RecursivePoly &  p)

Add operator +.

Adds a polynomial to a triangular set and returns a new triangular set.

Parameters
pA recursively viewed polynomial

◆ operator+=()

template<class Field, class RecursivePoly>
TriangularSet<Field,RecursivePoly>& TriangularSet< Field, RecursivePoly >::operator+= ( const RecursivePoly &  p)

Add assignment operator +=.

Adds a polynomial to a triangular set.

Parameters
pA recursively viewed polynomial

◆ operator=() [1/4]

template<class Field, class RecursivePoly>
TriangularSet<Field,RecursivePoly>& TriangularSet< Field, RecursivePoly >::operator= ( const TriangularSet< Field, RecursivePoly > &  a)

Assignment operator =.

Parameters
aA triangular set

◆ operator=() [2/4]

template<class Field, class RecursivePoly>
BPASTriangularSet<Field,RecursivePoly>& TriangularSet< Field, RecursivePoly >::operator= ( const BPASTriangularSet< Field, RecursivePoly > &  a)
overridevirtual

Assignment operator =.

Parameters
aA triangular set

Implements BPASTriangularSet< Field, RecursivePoly >.

◆ operator=() [3/4]

template<class Field, class RecursivePoly>
TriangularSet<Field,RecursivePoly>& TriangularSet< Field, RecursivePoly >::operator= ( TriangularSet< Field, RecursivePoly > &&  a)

Move assignment operator =.

Parameters
aA triangular set

◆ operator=() [4/4]

template<class Field, class RecursivePoly>
BPASTriangularSet<Field,RecursivePoly>& TriangularSet< Field, RecursivePoly >::operator= ( BPASTriangularSet< Field, RecursivePoly > &&  a)
overridevirtual

Move assignment operator =.

Parameters
aA triangular set

Implements BPASTriangularSet< Field, RecursivePoly >.

◆ operator==()

template<class Field, class RecursivePoly>
bool TriangularSet< Field, RecursivePoly >::operator== ( const TriangularSet< Field, RecursivePoly > &  a) const

Identity operator ==.

Parameters
aA triangular set

◆ polynomials()

template<class Field, class RecursivePoly>
std::vector<RecursivePoly> TriangularSet< Field, RecursivePoly >::polynomials ( ) const
inline

Get the vector of polynoials in the triangular set.

Parameters

◆ pseudoDivide()

template<class Field, class RecursivePoly>
RecursivePoly TriangularSet< Field, RecursivePoly >::pseudoDivide ( const RecursivePoly &  p,
std::vector< RecursivePoly > *  quo = NULL,
RecursivePoly *  c = NULL 
) const
virtual

Pseudo division: return the pseudo-remainder, the pseudo-quotients and c such that c*p = ∑(q_i T_i) + r.

Parameters
pan input recursively viewed polynomial
quo(optional) the array of quotients
c(optional) the constant multiplied to the input polynomial

Implements BPASTriangularSet< Field, RecursivePoly >.

◆ randomStronglyNormalizedTriangularSet()

template<class Field, class RecursivePoly>
void TriangularSet< Field, RecursivePoly >::randomStronglyNormalizedTriangularSet ( int  nVars,
int  nAlgVars,
int  nTrcVars,
int  nTerms,
unsigned long int  coefBound,
int  pSparsity,
bool  includeNeg 
)

Generate a random strongly normalized triangular set based on the number of terms in its polynomials.

Parameters
nVarsnumber of variables
nAlgVarsnumber of algebraic variables
nTrcVarsnumber of transcendental variables
nTermsnumber of terms in the polynomial
coefBoundmaximum size of the coefficients
pSparsitysparsity of the polynomial
includeNegwhether to include negative coefficients

◆ randomTriangularSet()

template<class Field, class RecursivePoly>
void TriangularSet< Field, RecursivePoly >::randomTriangularSet ( int  nVars,
int  nAlgVars,
int  nTrcVars,
int  nTerms,
unsigned long int  coefBound,
int  pSparsity,
bool  includeNeg 
)

Generate a random triangular set based on the number of terms of its polynomials.

Parameters
nVarsnumber of variables
nAlgVarsnumber of algebraic variables
nTrcVarsnumber of transcendental variables
nTermsnumber of terms in the polynomial
coefBoundmaximum size of the coefficients
pSparsitysparsity of the polynomial
includeNegwhether to include negative coefficients

◆ randomTriangularSetPolynomial() [1/2]

template<class Field, class RecursivePoly>
RecursivePoly TriangularSet< Field, RecursivePoly >::randomTriangularSetPolynomial ( std::vector< Symbol variables,
int  algVar,
std::vector< Symbol transcendentalVariables,
int  nTerms,
unsigned long int  coefBound,
int  pSparsity,
bool  includeNeg 
)

Generate a random triangular set polynomial based on its number of terms.

Parameters
variablesvariables of the triangular set
algVarindex of the algebraic variable
transcendentalVariablestranscendental variables of the triangular set
nTermsnumber of terms in the polynomial
coefBoundmaximum size of the coefficients
pSparsitysparsity of the polynomial
includeNegwhether to include negative coefficients

◆ randomTriangularSetPolynomial() [2/2]

template<class Field, class RecursivePoly>
RecursivePoly TriangularSet< Field, RecursivePoly >::randomTriangularSetPolynomial ( std::vector< Symbol variables,
int  algVar,
std::vector< Symbol transcendentalVariables,
std::vector< int >  maxDegs,
unsigned long int  coefBound,
double  pSparsity,
bool  includeNeg 
)

Generate a random triangular set polynomial based on its maximum degrees in its variables.

Parameters
variablesvariables of the triangular set
algVarindex of the algebraic variable
transcendentalVariablestranscendental variables of the triangular set
maxDegsvector of maximum degrees among the set of variables
coefBoundmaximum size of the coefficients
pSparsityproportional sparsity of the polynomial
includeNegwhether to include negative coefficients

◆ reduce() [1/2]

template<class Field, class RecursivePoly>
RecursivePoly TriangularSet< Field, RecursivePoly >::reduce ( const RecursivePoly &  p) const

Reduce the input polynomial modulo the triangular set.

Parameters
pinput recursively viewed polynomial

◆ reduce() [2/2]

template<class Field, class RecursivePoly>
RecursivePoly TriangularSet< Field, RecursivePoly >::reduce ( const RecursivePoly &  p,
RecursivePoly &  c,
bool  takeMainPrimitivePart = false,
bool  onlyInDimZero = false 
) const

returns r such that c*r = p modulo sat(T) such that c has no algebraic variables, and c is returned as an input parameter.

Parameters
pinput recursively viewed polynomial
creturned value of the content of p modulo sat(T)
usePrimitiveFactorization(optional) whether to use primitive factorization to compute c (default true)
onlyInDimZero(optional) only perform the reduction if the canComputeInDimensionZero(p) is true (default false)

◆ select()

template<class Field, class RecursivePoly>
RecursivePoly TriangularSet< Field, RecursivePoly >::select ( const Symbol s) const
virtual

Select a polynomial given the leading variable; if no such polynomial, 0 is returned.

Parameters
xThe leading variable name

Implements BPASTriangularSet< Field, RecursivePoly >.

◆ size()

template<class Field, class RecursivePoly>
int TriangularSet< Field, RecursivePoly >::size ( ) const
inline

Get the size of the triangular set.

Parameters

◆ transcendentalVariables()

template<class Field, class RecursivePoly>
std::vector<Symbol> TriangularSet< Field, RecursivePoly >::transcendentalVariables ( ) const
inline

Get the transcendentalVariables variables.

Parameters

◆ upper()

template<class Field, class RecursivePoly>
void TriangularSet< Field, RecursivePoly >::upper ( const Symbol s,
BPASTriangularSet< Field, RecursivePoly > &  ts 
) const
virtual

Returns the triangular set consisting of polynomials with main variable strictly greater than s.

Parameters
ssymbol of the main variable of specified element of the triangular set
tsThe returned triangular set

Implements BPASTriangularSet< Field, RecursivePoly >.

◆ variables()

template<class Field, class RecursivePoly>
std::vector<Symbol> TriangularSet< Field, RecursivePoly >::variables ( ) const
inlinevirtual

Get the variable names in decreasing order.

Parameters

Implements BPASTriangularSet< Field, RecursivePoly >.

Friends And Related Function Documentation

◆ operator<<

template<class Field, class RecursivePoly>
std::ostream& operator<< ( std::ostream &  out,
const TriangularSet< Field, RecursivePoly > &  a 
)
friend

Overload stream operator << for triangular sets.

Parameters
outStream object
aA triangular set

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