Basic Polynomial Algebra Subprograms (BPAS)  v. 1.548
Public Member Functions | Static Public Attributes | Friends | List of all members
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)
 Overload operator =. More...
 
DistributedDenseMultivariateModularPolynomial< Field > & operator= (const Field &f)
 Overload operator =. More...
 
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 leadingCoefficient () const
 Get the leading coefficient. 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
 Overload operator ==. More...
 
bool operator!= (const DistributedDenseMultivariateModularPolynomial< Field > &b) const
 Overload operator !=. More...
 
DistributedDenseMultivariateModularPolynomial< Field > operator+ (const DistributedDenseMultivariateModularPolynomial< Field > &b) const
 Overload operator +. More...
 
DistributedDenseMultivariateModularPolynomial< Field > & operator+= (const DistributedDenseMultivariateModularPolynomial< Field > &b)
 Overload operator +=. More...
 
DistributedDenseMultivariateModularPolynomial< Field > operator+ (const Field &e) const
 Overload operator +. More...
 
DistributedDenseMultivariateModularPolynomial< Field > & operator+= (const Field &e)
 Overload operator +=. More...
 
DistributedDenseMultivariateModularPolynomial< Field > operator- (const DistributedDenseMultivariateModularPolynomial< Field > &b) const
 Overload operator -. More...
 
DistributedDenseMultivariateModularPolynomial< Field > & operator-= (const DistributedDenseMultivariateModularPolynomial< Field > &b)
 Overload operator -=. More...
 
DistributedDenseMultivariateModularPolynomial< Field > operator- () const
 Overload operator -, negate. More...
 
DistributedDenseMultivariateModularPolynomial< Field > operator- (const Field &e) const
 Overload operator -. More...
 
DistributedDenseMultivariateModularPolynomial< Field > & operator-= (const Field &e)
 Overload operator -=. More...
 
void negate ()
 Negate, f(-x) More...
 
DistributedDenseMultivariateModularPolynomial< Field > operator* (const DistributedDenseMultivariateModularPolynomial< Field > &b) const
 Overload operator *. More...
 
DistributedDenseMultivariateModularPolynomial< Field > & operator*= (const DistributedDenseMultivariateModularPolynomial< Field > &b)
 Overload operator *=. More...
 
DistributedDenseMultivariateModularPolynomial< Field > operator* (const Field &e) const
 Overload operator *. More...
 
DistributedDenseMultivariateModularPolynomial< Field > & operator*= (const Field &f)
 Overload operator *=. More...
 
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
 Overload stream operator <<. More...
 
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.

Constructor & Destructor Documentation

◆ DistributedDenseMultivariateModularPolynomial() [1/4]

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

Constructor with the Field.

Parameters
mThe 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
vNumber of variables
dsPartial degrees
mThe 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
xThe variable name
mThe prime

◆ DistributedDenseMultivariateModularPolynomial() [4/4]

Copy constructor.

Parameters
bA multivariate modular polynomial

◆ ~DistributedDenseMultivariateModularPolynomial()

Deconstructor.

Parameters

Member Function Documentation

◆ coefficient()

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

Get a coefficient.

Parameters
vNumber of variables
dThe exponent of each variable

Implements BPASMultivariatePolynomial< Field, DistributedDenseMultivariateModularPolynomial< Field > >.

◆ degree()

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

Get a partial degree of variable x.

Parameters
xThe variable name

Implements BPASMultivariatePolynomial< Field, DistributedDenseMultivariateModularPolynomial< Field > >.

◆ 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

◆ leadingCoefficient()

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

Get the leading coefficient.

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

◆ 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

Overload operator !=.

Parameters
bA multivariate modular polynomial

◆ operator*() [1/2]

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

Overload operator *.

Parameters
bA multivariate modular polynomial

◆ operator*() [2/2]

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

Overload operator *.

Parameters
eA constant

◆ operator*=() [1/2]

Overload operator *=.

Parameters
bA multivariate modular polynomial

◆ operator*=() [2/2]

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

Overload operator *=.

Parameters
eA constant

◆ operator+() [1/2]

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

Overload operator +.

Parameters
bA multivariate modular polynomial

◆ operator+() [2/2]

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

Overload operator +.

Parameters
eA constant

◆ operator+=() [1/2]

Overload operator +=.

Parameters
bA multivariate modular polynomial

◆ operator+=() [2/2]

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

Overload operator +=.

Parameters
eA constant

◆ operator-() [1/3]

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

Overload operator -.

Parameters
bA multivariate modular polynomial

◆ operator-() [2/3]

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

Overload operator -, negate.

Parameters

◆ operator-() [3/3]

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

Overload operator -.

Parameters
eA constant

◆ operator-=() [1/2]

Overload operator -=.

Parameters
bA multivariate modular polynomial

◆ operator-=() [2/2]

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

Overload operator -=.

Parameters
eA constant

◆ operator=() [1/2]

Overload operator =.

Parameters
bA multivariate modular polynomial

◆ operator=() [2/2]

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

Overload operator =.

Assign this to a be a base Field element.

◆ operator==()

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

Overload operator ==.

Parameters
bA multivariate modular polynomial

◆ print()

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

Overload stream operator <<.

Parameters
outStream object
bThe multivariate modular polynomial

◆ ringVariables()

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

◆ setCoefficient() [1/2]

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

Set a coefficient.

Parameters
vNumber of variables
dThe exponent of each variable
valValue of the coefficient

Implements BPASMultivariatePolynomial< Field, DistributedDenseMultivariateModularPolynomial< Field > >.

◆ setCoefficient() [2/2]

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

Set a coefficient.

Parameters
kThe offset in the coefficient array
valValue of the coefficient

◆ setRingVariables()

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

Set variable names.

Parameters
xsVariable names

Implements BPASMultivariatePolynomial< Field, DistributedDenseMultivariateModularPolynomial< Field > >.

◆ 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: