Basic Polynomial Algebra Subprograms (BPAS)  v. 1.791
Public Member Functions | List of all members
BPASMultivariatePolynomial< Ring, Derived > Class Template Referenceabstract

An abstract class defining the interface of a multivariate polynomial over an arbitrary BPASRing. More...

#include <BPASMultivarPolynomial.hpp>

Simplified semantic inheritance diagram for BPASMultivariatePolynomial< Ring, Derived >:
- Full inheritance diagram for BPASMultivariatePolynomial< Ring, Derived >:
[legend]

Public Member Functions

virtual void differentiate (const Symbol &var)=0
 Differentiate this polynomial, with respect to a particular variable, setting itself to its derivative. More...
 
virtual void differentiate (const Symbol &var, int k)=0
 Differentiate this polynomial k times, with respect to a particular variable, setting itself to its derivative. More...
 
virtual Derived derivative (const Symbol &) const =0
 Differentiate this polynomial, with respect to a particular variable, setting itself to its derivative. More...
 
virtual Derived derivative (const Symbol &, int) const =0
 Differentiate this polynomial k times, with respect to a particular variable, setting itself to its derivative. More...
 
virtual Derived evaluate (int n, const Symbol *vars, const Ring *elems) const =0
 Evaluate this polynomial by substituting the input ring elements elems for the variables vars, such that vars[i] = elems[i]. More...
 
virtual Derived evaluate (const std::vector< Symbol > &vars, const std::vector< Ring > &elems) const =0
 Evaluate this polynomial by substituting the input ring elements elems for the variables vars, such that vars[i] = elems[i]. More...
 
virtual int numberOfVariables () const =0
 Get the number of variables in this multivariate polynomial which have positive degree. More...
 
virtual int numberOfRingVariables () const =0
 Get the number of variables defined for the poylnomial ring of this polynomial, that is, in the ambient space of this polynomial. More...
 
virtual Integer degree (const Symbol &v) const =0
 Get the partial degree of this polynomial with respect to the variable v. More...
 
virtual Ring coefficient (int n, const int *exps) const =0
 Get the coefficient of this polynomial with respect to the monomial defined by exponent vector exps of size n. More...
 
virtual Ring coefficient (const std::vector< int > &exps) const =0
 Get the coefficient of this polynomial with respect to the monomial defined by exponent vector exps. More...
 
virtual void setCoefficient (int n, const int *, const Ring &r)=0
 Set the coefficient of this polynomial for the monomial defined by exponent vector exps, of size n, to r. More...
 
virtual void setCoefficient (const std::vector< int > &v, const Ring &r)=0
 Set the coefficient of this polynomial for the monomial defined by exponent vector exps to r. More...
 
virtual void setRingVariables (const std::vector< Symbol > &xs)=0
 Set the variables in the polynomial ring to xs. More...
 
virtual std::vector< SymbolringVariables () const =0
 Get all the variables in the polynomial ring. More...
 
virtual std::vector< Symbolvariables () const =0
 Get all the variables in this polynomial with positive degree. More...
 

Detailed Description

template<class Ring, class Derived>
class BPASMultivariatePolynomial< Ring, Derived >

An abstract class defining the interface of a multivariate polynomial over an arbitrary BPASRing.

This class is automatically determined to be an integral domain, GCD domain, etc. depending on the template specialization of Ring.

Member Function Documentation

◆ coefficient() [1/2]

template<class Ring, class Derived>
virtual Ring BPASMultivariatePolynomial< Ring, Derived >::coefficient ( int  n,
const int *  exps 
) const
pure virtual

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

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

Parameters
nthe size of the exponent vector
expsthe exponent vector

Implemented in SparseMultivariateRationalPolynomial, SparseMultivariateIntegerPolynomial, and DistributedDenseMultivariateModularPolynomial< Field >.

◆ coefficient() [2/2]

template<class Ring, class Derived>
virtual Ring BPASMultivariatePolynomial< Ring, Derived >::coefficient ( const std::vector< int > &  exps) const
pure virtual

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

Implemented in SparseMultivariateRationalPolynomial, SparseMultivariateIntegerPolynomial, and DistributedDenseMultivariateModularPolynomial< Field >.

◆ degree()

template<class Ring, class Derived>
virtual Integer BPASMultivariatePolynomial< Ring, Derived >::degree ( const Symbol v) const
pure virtual

Get the partial degree of this polynomial with respect to the variable v.

Returns
the partial degree w.r.t to variable v.

Implemented in SparseMultivariateRationalPolynomial, SparseMultivariateIntegerPolynomial, and DistributedDenseMultivariateModularPolynomial< Field >.

◆ derivative() [1/2]

template<class Ring, class Derived>
virtual Derived BPASMultivariatePolynomial< Ring, Derived >::derivative ( const Symbol ) const
pure virtual

Differentiate this polynomial, with respect to a particular variable, setting itself to its derivative.

Parameters
varthe variable to derive with respect to.
Returns
the derivative.

Implemented in DistributedDenseMultivariateModularPolynomial< Field >, SparseMultivariateRationalPolynomial, and SparseMultivariateIntegerPolynomial.

◆ derivative() [2/2]

template<class Ring, class Derived>
virtual Derived BPASMultivariatePolynomial< Ring, Derived >::derivative ( const Symbol ,
int   
) const
pure virtual

Differentiate this polynomial k times, with respect to a particular variable, setting itself to its derivative.

Parameters
varthe variable to derive with respect to.
kthe number of times to differentiate.
Returns
the derivative.

Implemented in DistributedDenseMultivariateModularPolynomial< Field >, SparseMultivariateRationalPolynomial, and SparseMultivariateIntegerPolynomial.

◆ differentiate() [1/2]

template<class Ring, class Derived>
virtual void BPASMultivariatePolynomial< Ring, Derived >::differentiate ( const Symbol var)
pure virtual

Differentiate this polynomial, with respect to a particular variable, setting itself to its derivative.

Parameters
varthe variable to derive with respect to.

Implemented in DistributedDenseMultivariateModularPolynomial< Field >, SparseMultivariateRationalPolynomial, and SparseMultivariateIntegerPolynomial.

◆ differentiate() [2/2]

template<class Ring, class Derived>
virtual void BPASMultivariatePolynomial< Ring, Derived >::differentiate ( const Symbol var,
int  k 
)
pure virtual

Differentiate this polynomial k times, with respect to a particular variable, setting itself to its derivative.

Parameters
varthe variable to derive with respect to.
kthe number of times to differentiate.

Implemented in DistributedDenseMultivariateModularPolynomial< Field >, SparseMultivariateRationalPolynomial, and SparseMultivariateIntegerPolynomial.

◆ evaluate() [1/2]

template<class Ring, class Derived>
virtual Derived BPASMultivariatePolynomial< Ring, Derived >::evaluate ( int  n,
const Symbol vars,
const Ring *  elems 
) const
pure virtual

Evaluate this polynomial by substituting the input ring elements elems for the variables vars, such that vars[i] = elems[i].

Parameters
nthe size of the vars and elems arrays.
varsthe variables to evaluate.
elemsthe ring elements to substitute for the varibales.
Returns
the evaluation of this polynomial for the variables in vars.

Implemented in DistributedDenseMultivariateModularPolynomial< Field >, SparseMultivariateRationalPolynomial, and SparseMultivariateIntegerPolynomial.

◆ evaluate() [2/2]

template<class Ring, class Derived>
virtual Derived BPASMultivariatePolynomial< Ring, Derived >::evaluate ( const std::vector< Symbol > &  vars,
const std::vector< Ring > &  elems 
) const
pure virtual

Evaluate this polynomial by substituting the input ring elements elems for the variables vars, such that vars[i] = elems[i].

Parameters
varsthe variables to evaluate.
elemsthe ring elements to substitute for the varibales.
Returns
the evaluation of this polynomial for the variables in vars.

Implemented in DistributedDenseMultivariateModularPolynomial< Field >, SparseMultivariateRationalPolynomial, and SparseMultivariateIntegerPolynomial.

◆ numberOfRingVariables()

template<class Ring, class Derived>
virtual int BPASMultivariatePolynomial< Ring, Derived >::numberOfRingVariables ( ) const
pure virtual

Get the number of variables defined for the poylnomial ring of this polynomial, that is, in the ambient space of this polynomial.

Returns
the number variables in the polynomial ring of this polynomial.

Implemented in SparseMultivariateRationalPolynomial, SparseMultivariateIntegerPolynomial, and DistributedDenseMultivariateModularPolynomial< Field >.

◆ numberOfVariables()

template<class Ring, class Derived>
virtual int BPASMultivariatePolynomial< Ring, Derived >::numberOfVariables ( ) const
pure virtual

Get the number of variables in this multivariate polynomial which have positive degree.

Returns
the number of variables.

Implemented in SparseMultivariateRationalPolynomial, SparseMultivariateIntegerPolynomial, and DistributedDenseMultivariateModularPolynomial< Field >.

◆ ringVariables()

template<class Ring, class Derived>
virtual std::vector<Symbol> BPASMultivariatePolynomial< Ring, Derived >::ringVariables ( ) const
pure virtual

Get all the variables in the polynomial ring.

Returns
a vector of all the variables in this polynomial's ring.

Implemented in DistributedDenseMultivariateModularPolynomial< Field >, SparseMultivariateRationalPolynomial, and SparseMultivariateIntegerPolynomial.

◆ setCoefficient() [1/2]

template<class Ring, class Derived>
virtual void BPASMultivariatePolynomial< Ring, Derived >::setCoefficient ( int  n,
const int *  ,
const Ring &  r 
)
pure virtual

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

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

Parameters
nthe size of the exponent vector
expsthe exponent vector
rthe ring element to set as coefficient.

Implemented in SparseMultivariateRationalPolynomial, SparseMultivariateIntegerPolynomial, and DistributedDenseMultivariateModularPolynomial< Field >.

◆ setCoefficient() [2/2]

template<class Ring, class Derived>
virtual void BPASMultivariatePolynomial< Ring, Derived >::setCoefficient ( const std::vector< int > &  v,
const Ring &  r 
)
pure virtual

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.

Implemented in SparseMultivariateRationalPolynomial, SparseMultivariateIntegerPolynomial, and DistributedDenseMultivariateModularPolynomial< Field >.

◆ setRingVariables()

template<class Ring, class Derived>
virtual void BPASMultivariatePolynomial< Ring, Derived >::setRingVariables ( const std::vector< Symbol > &  xs)
pure virtual

Set the variables in the polynomial ring to xs.

This can change be used to change the symbols of the variables as well as to increase or decrease the dimension of this polynomial ring. On a decrease, this polynomial may be invalidated if it has positive degree in a variable being removed.

Parameters
xsthe vector of new symbols for the polynomial ring.

Implemented in DistributedDenseMultivariateModularPolynomial< Field >, SparseMultivariateRationalPolynomial, and SparseMultivariateIntegerPolynomial.

◆ variables()

template<class Ring, class Derived>
virtual std::vector<Symbol> BPASMultivariatePolynomial< Ring, Derived >::variables ( ) const
pure virtual

Get all the variables in this polynomial with positive degree.

Returns
a vector of all the variables in this polynomial with positive degree.

Implemented in DistributedDenseMultivariateModularPolynomial< Field >, SparseMultivariateRationalPolynomial, and SparseMultivariateIntegerPolynomial.


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