Basic Polynomial Algebra Subprograms (BPAS)  v. 1.652
DistributedDenseMultivariateModularPolynomial< Field > Class Template Reference

A multivariate polynomial with coefficients in an arbitrary finite field represented densely. More...

`#include <dmpolynomial.h>`

Simplified semantic inheritance diagram for DistributedDenseMultivariateModularPolynomial< Field >:
Full inheritance diagram for DistributedDenseMultivariateModularPolynomial< Field >:
[legend]

## Public Member Functions

DistributedDenseMultivariateModularPolynomial ()
Constructor using a default field.

DistributedDenseMultivariateModularPolynomial (const Field &m)
Constructor with the Field. More...

DistributedDenseMultivariateModularPolynomial (int v, int *ds, Field m)
Constructor with number of variables and terms. More...

DistributedDenseMultivariateModularPolynomial (const Symbol &x, const Field &m)
Construct with a variable name such that f(x) = x;. More...

DistributedDenseMultivariateModularPolynomial (const DistributedDenseMultivariateModularPolynomial< Field > &b)
Copy constructor. More...

~DistributedDenseMultivariateModularPolynomial ()
Deconstructor. More...

DistributedDenseMultivariateModularPolynomial< Field > & operator= (const DistributedDenseMultivariateModularPolynomial< Field > &b)

DistributedDenseMultivariateModularPolynomial< Field > & operator= (const Field &f)

bool isZero () const
Is a zero polynomial. More...

void zero ()
Zero polynomial. More...

bool isOne () const
Is polynomial 1. More...

void one ()
Set polynomial to 1. More...

bool isNegativeOne () const
Is polynomial -1. More...

void negativeOne ()
Set polynomial to -1. More...

int isConstant () const
Is a constant. More...

int numberOfVariables () const
Get the number of variables. More...

int numberOfRingVariables () const
Get the number of variables in this polynomial ring.

Integer numberOfTerms () const
Get the number of non-zero terms. More...

int size () const
Get the size of the polynomial. More...

Integer degree () const
Get the total degree.

Integer degree (const Symbol &x) const
Get a partial degree of variable x. More...

Field trailingCoefficient () const

bool isConstantTermZero () const

DistributedDenseMultivariateModularPolynomial< Field > unitCanonical (DistributedDenseMultivariateModularPolynomial *u=NULL, DistributedDenseMultivariateModularPolynomial *v=NULL) const

Field coefficient (int v, const int *d) const
Get a coefficient. More...

Field coefficient (const std::vector< int > &v) const

void setCoefficient (int v, const int *d, const Field &val)
Set a coefficient. More...

void setCoefficient (const std::vector< int > &v, const Field &val)

void setCoefficient (int k, const Field &val)
Set a coefficient. More...

Field content () const

DistributedDenseMultivariateModularPolynomial primitivePart () const

bool operator== (const DistributedDenseMultivariateModularPolynomial< Field > &b) const

bool operator!= (const DistributedDenseMultivariateModularPolynomial< Field > &b) const

DistributedDenseMultivariateModularPolynomial< Field > operator+ (const DistributedDenseMultivariateModularPolynomial< Field > &b) const

DistributedDenseMultivariateModularPolynomial< Field > & operator+= (const DistributedDenseMultivariateModularPolynomial< Field > &b)

DistributedDenseMultivariateModularPolynomial< Field > operator+ (const Field &e) const

DistributedDenseMultivariateModularPolynomial< Field > & operator+= (const Field &e)

DistributedDenseMultivariateModularPolynomial< Field > operator- (const DistributedDenseMultivariateModularPolynomial< Field > &b) const

DistributedDenseMultivariateModularPolynomial< Field > & operator-= (const DistributedDenseMultivariateModularPolynomial< Field > &b)

DistributedDenseMultivariateModularPolynomial< Field > operator- () const

DistributedDenseMultivariateModularPolynomial< Field > operator- (const Field &e) const

DistributedDenseMultivariateModularPolynomial< Field > & operator-= (const Field &e)

void negate ()
Negate, f(-x) More...

DistributedDenseMultivariateModularPolynomial< Field > operator* (const DistributedDenseMultivariateModularPolynomial< Field > &b) const

DistributedDenseMultivariateModularPolynomial< Field > & operator*= (const DistributedDenseMultivariateModularPolynomial< Field > &b)

DistributedDenseMultivariateModularPolynomial< Field > operator* (const Field &e) const

DistributedDenseMultivariateModularPolynomial< Field > & operator*= (const Field &f)

DistributedDenseMultivariateModularPolynomial< Field > operator^ (long long int e) const

DistributedDenseMultivariateModularPolynomial< Field > & operator^= (long long int e)

DistributedDenseMultivariateModularPolynomial< Field > operator/ (const DistributedDenseMultivariateModularPolynomial< Field > &p) const

DistributedDenseMultivariateModularPolynomial< Field > & operator/= (const DistributedDenseMultivariateModularPolynomial< Field > &p)

DistributedDenseMultivariateModularPolynomial< Field > operator/ (const Field &e) const

DistributedDenseMultivariateModularPolynomial< Field > & operator/= (const Field &e)

void setRingVariables (const std::vector< Symbol > &xs)
Set variable names. More...

std::vector< SymbolringVariables () const
Get variable names. More...

std::vector< Symbolvariables () const

void print (std::ostream &out) const

ExpressionTree convertToExpressionTree () const
Convert *this to an expression tree.

void differentiate (const Symbol &s, int k)

void differentiate (const Symbol &s)

DistributedDenseMultivariateModularPolynomial< Field > derivative (const Symbol &s, int k) const

DistributedDenseMultivariateModularPolynomial< Field > derivative (const Symbol &s) const

DistributedDenseMultivariateModularPolynomial< Field > evaluate (const std::vector< Symbol > &syms, const std::vector< Field > &vals) const

DistributedDenseMultivariateModularPolynomial< Field > evaluate (int n, const Symbol *syms, const Field *vals) const

DistributedDenseMultivariateModularPolynomial< Field > gcd (const DistributedDenseMultivariateModularPolynomial< Field > &p) const

Factors< DistributedDenseMultivariateModularPolynomialsquareFree () const
Compute squarefree factorization of *this.

## Static Public Attributes

static mpz_class characteristic

## Friends

DistributedDenseMultivariateModularPolynomial< Field > operator+ (const Field &e, const DistributedDenseMultivariateModularPolynomial< Field > &f)

DistributedDenseMultivariateModularPolynomial< Field > operator- (const Field &e, const DistributedDenseMultivariateModularPolynomial< Field > &f)

DistributedDenseMultivariateModularPolynomial< Field > operator* (const Field &e, const DistributedDenseMultivariateModularPolynomial< Field > &f)

## Detailed Description

### template<class Field> class DistributedDenseMultivariateModularPolynomial< Field >

A multivariate polynomial with coefficients in an arbitrary finite field represented densely.

The class is templated by a Field which should be a BPASField.

## ◆ DistributedDenseMultivariateModularPolynomial() [1/4]

template<class Field>
 DistributedDenseMultivariateModularPolynomial< Field >::DistributedDenseMultivariateModularPolynomial ( const Field & m )
inline

Constructor with the Field.

Parameters
 m The prime

## ◆ DistributedDenseMultivariateModularPolynomial() [2/4]

template<class Field>
 DistributedDenseMultivariateModularPolynomial< Field >::DistributedDenseMultivariateModularPolynomial ( int v, int * ds, Field m )
inline

Constructor with number of variables and terms.

Parameters
 v Number of variables ds Partial degrees m The prime

## ◆ DistributedDenseMultivariateModularPolynomial() [3/4]

template<class Field>
 DistributedDenseMultivariateModularPolynomial< Field >::DistributedDenseMultivariateModularPolynomial ( const Symbol & x, const Field & m )
inline

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

Parameters
 x The variable name m The prime

## ◆ DistributedDenseMultivariateModularPolynomial() [4/4]

template<class Field>
 DistributedDenseMultivariateModularPolynomial< Field >::DistributedDenseMultivariateModularPolynomial ( const DistributedDenseMultivariateModularPolynomial< Field > & b )
inline

Copy constructor.

Parameters
 b A multivariate modular polynomial

## ◆ ~DistributedDenseMultivariateModularPolynomial()

template<class Field>
 DistributedDenseMultivariateModularPolynomial< Field >::~DistributedDenseMultivariateModularPolynomial ( )
inline

Deconstructor.

Parameters

## ◆ coefficient()

template<class Field>
 Field DistributedDenseMultivariateModularPolynomial< Field >::coefficient ( int v, const int * d ) const
inlinevirtual

Get a coefficient.

Parameters
 v Number of variables d The exponent of each variable

## ◆ degree()

template<class Field>
 Integer DistributedDenseMultivariateModularPolynomial< Field >::degree ( const Symbol & x ) const
inlinevirtual

Get a partial degree of variable x.

Parameters
 x The variable name

## ◆ isConstant()

template<class Field>
 int DistributedDenseMultivariateModularPolynomial< Field >::isConstant ( ) const
inline

Is a constant.

Parameters

## ◆ isNegativeOne()

template<class Field>
 bool DistributedDenseMultivariateModularPolynomial< Field >::isNegativeOne ( ) const
inline

Is polynomial -1.

Parameters

## ◆ isOne()

template<class Field>
 bool DistributedDenseMultivariateModularPolynomial< Field >::isOne ( ) const
inline

Is polynomial 1.

Parameters

## ◆ isZero()

template<class Field>
 bool DistributedDenseMultivariateModularPolynomial< Field >::isZero ( ) const
inline

Is a zero polynomial.

Parameters

template<class Field>
 Field DistributedDenseMultivariateModularPolynomial< Field >::leadingCoefficient ( ) const
inline

Parameters

## ◆ negate()

template<class Field>
 void DistributedDenseMultivariateModularPolynomial< Field >::negate ( )
inline

Negate, f(-x)

Parameters

## ◆ negativeOne()

template<class Field>
 void DistributedDenseMultivariateModularPolynomial< Field >::negativeOne ( )
inline

Set polynomial to -1.

Parameters

## ◆ numberOfTerms()

template<class Field>
 Integer DistributedDenseMultivariateModularPolynomial< Field >::numberOfTerms ( ) const
inline

Get the number of non-zero terms.

Parameters

## ◆ numberOfVariables()

template<class Field>
 int DistributedDenseMultivariateModularPolynomial< Field >::numberOfVariables ( ) const
inlinevirtual

Get the number of variables.

Parameters

## ◆ one()

template<class Field>
 void DistributedDenseMultivariateModularPolynomial< Field >::one ( )
inline

Set polynomial to 1.

Parameters

## ◆ operator!=()

template<class Field>
 bool DistributedDenseMultivariateModularPolynomial< Field >::operator!= ( const DistributedDenseMultivariateModularPolynomial< Field > & b ) const
inline

Parameters
 b A multivariate modular polynomial

## ◆ operator*() [1/2]

template<class Field>
 DistributedDenseMultivariateModularPolynomial DistributedDenseMultivariateModularPolynomial< Field >::operator* ( const DistributedDenseMultivariateModularPolynomial< Field > & b ) const
inline

Parameters
 b A multivariate modular polynomial

## ◆ operator*() [2/2]

template<class Field>
 DistributedDenseMultivariateModularPolynomial DistributedDenseMultivariateModularPolynomial< Field >::operator* ( const Field & e ) const
inline

Parameters
 e A constant

## ◆ operator*=() [1/2]

template<class Field>
 DistributedDenseMultivariateModularPolynomial& DistributedDenseMultivariateModularPolynomial< Field >::operator*= ( const DistributedDenseMultivariateModularPolynomial< Field > & b )
inline

Parameters
 b A multivariate modular polynomial

## ◆ operator*=() [2/2]

template<class Field>
 DistributedDenseMultivariateModularPolynomial& DistributedDenseMultivariateModularPolynomial< Field >::operator*= ( const Field & f )
inline

Parameters
 e A constant

## ◆ operator+() [1/2]

template<class Field>
 DistributedDenseMultivariateModularPolynomial DistributedDenseMultivariateModularPolynomial< Field >::operator+ ( const DistributedDenseMultivariateModularPolynomial< Field > & b ) const
inline

Parameters
 b A multivariate modular polynomial

## ◆ operator+() [2/2]

template<class Field>
 DistributedDenseMultivariateModularPolynomial DistributedDenseMultivariateModularPolynomial< Field >::operator+ ( const Field & e ) const
inline

Parameters
 e A constant

## ◆ operator+=() [1/2]

template<class Field>
 DistributedDenseMultivariateModularPolynomial& DistributedDenseMultivariateModularPolynomial< Field >::operator+= ( const DistributedDenseMultivariateModularPolynomial< Field > & b )
inline

Parameters
 b A multivariate modular polynomial

## ◆ operator+=() [2/2]

template<class Field>
 DistributedDenseMultivariateModularPolynomial& DistributedDenseMultivariateModularPolynomial< Field >::operator+= ( const Field & e )
inline

Parameters
 e A constant

## ◆ operator-() [1/3]

template<class Field>
 DistributedDenseMultivariateModularPolynomial DistributedDenseMultivariateModularPolynomial< Field >::operator- ( const DistributedDenseMultivariateModularPolynomial< Field > & b ) const
inline

Parameters
 b A multivariate modular polynomial

## ◆ operator-() [2/3]

template<class Field>
 DistributedDenseMultivariateModularPolynomial DistributedDenseMultivariateModularPolynomial< Field >::operator- ( ) const
inline

Parameters

## ◆ operator-() [3/3]

template<class Field>
 DistributedDenseMultivariateModularPolynomial DistributedDenseMultivariateModularPolynomial< Field >::operator- ( const Field & e ) const
inline

Parameters
 e A constant

## ◆ operator-=() [1/2]

template<class Field>
 DistributedDenseMultivariateModularPolynomial& DistributedDenseMultivariateModularPolynomial< Field >::operator-= ( const DistributedDenseMultivariateModularPolynomial< Field > & b )
inline

Parameters
 b A multivariate modular polynomial

## ◆ operator-=() [2/2]

template<class Field>
 DistributedDenseMultivariateModularPolynomial& DistributedDenseMultivariateModularPolynomial< Field >::operator-= ( const Field & e )
inline

Parameters
 e A constant

## ◆ operator=() [1/2]

template<class Field>
 DistributedDenseMultivariateModularPolynomial& DistributedDenseMultivariateModularPolynomial< Field >::operator= ( const DistributedDenseMultivariateModularPolynomial< Field > & b )
inline

Parameters
 b A multivariate modular polynomial

## ◆ operator=() [2/2]

template<class Field>
 DistributedDenseMultivariateModularPolynomial& DistributedDenseMultivariateModularPolynomial< Field >::operator= ( const Field & f )
inline

Assign this to a be a base Field element.

## ◆ operator==()

template<class Field>
 bool DistributedDenseMultivariateModularPolynomial< Field >::operator== ( const DistributedDenseMultivariateModularPolynomial< Field > & b ) const
inline

Parameters
 b A multivariate modular polynomial

## ◆ print()

template<class Field>
 void DistributedDenseMultivariateModularPolynomial< Field >::print ( std::ostream & out ) const
inline

Parameters
 out Stream object b The multivariate modular polynomial

## ◆ ringVariables()

template<class Field>
 std::vector DistributedDenseMultivariateModularPolynomial< Field >::ringVariables ( ) const
inlinevirtual

Get variable names.

Parameters

## ◆ setCoefficient() [1/2]

template<class Field>
 void DistributedDenseMultivariateModularPolynomial< Field >::setCoefficient ( int v, const int * d, const Field & val )
inlinevirtual

Set a coefficient.

Parameters
 v Number of variables d The exponent of each variable val Value of the coefficient

## ◆ setCoefficient() [2/2]

template<class Field>
 void DistributedDenseMultivariateModularPolynomial< Field >::setCoefficient ( int k, const Field & val )
inline

Set a coefficient.

Parameters
 k The offset in the coefficient array val Value of the coefficient

## ◆ setRingVariables()

template<class Field>
 void DistributedDenseMultivariateModularPolynomial< Field >::setRingVariables ( const std::vector< Symbol > & xs )
inlinevirtual

Set variable names.

Parameters
 xs Variable names

## ◆ size()

template<class Field>
 int DistributedDenseMultivariateModularPolynomial< Field >::size ( ) const
inline

Get the size of the polynomial.

Parameters

## ◆ zero()

template<class Field>
 void DistributedDenseMultivariateModularPolynomial< Field >::zero ( )
inline

Zero polynomial.

Parameters

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