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

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

#include <BPASPolynomial.hpp>

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

Public Member Functions

virtual Derived & operator= (const Ring &r)=0
 Assignment operator from the ground ring. More...
 
virtual Derived operator+ (const Ring &r) const =0
 Addition operator of a ground ring element. More...
 
virtual Derived & operator+= (const Ring &)=0
 Addition assignment operator of a ground ring element. More...
 
virtual Derived operator- (const Ring &) const =0
 Subtraction operator of a ground ring element. More...
 
virtual Derived & operator-= (const Ring &)=0
 Subtraction assignment operator of a ground ring element. More...
 
virtual Derived operator- () const =0
 Negation operation. More...
 
virtual Derived operator* (const Ring &) const =0
 Multiplication operator of a ground ring element. More...
 
virtual Derived & operator*= (const Ring &)=0
 Multiplication assignment operator of a ground ring element. More...
 
virtual Integer degree () const =0
 Return the (total) degree of polynomial. More...
 
virtual Ring leadingCoefficient () const =0
 Get the leading coefficient of this polynomial, the non-zero coefficient of the monomial with maximum degree. More...
 
virtual Ring trailingCoefficient () const =0
 Get the trailing coefficient of this polynomial, the non-zero coefficient of the monomial with minimum degree. More...
 
virtual bool isConstantTermZero () const =0
 Determine if the constant term of this polynomial is zero or not. More...
 
virtual Integer numberOfTerms () const =0
 Determine the number of non-zero terms in this polynomial. More...
 
- Public Member Functions inherited from BPASRing< Derived >
virtual mpz_class getCharacteristic () const
 The characteristic of this ring class.
 
virtual bool isZero () const =0
 Determine if *this ring element is zero, that is the additive identity. More...
 
virtual void zero ()=0
 Make *this ring element zero.
 
virtual bool isOne () const =0
 Determine if *this ring element is one, that is the multiplication identity. More...
 
virtual void one ()=0
 Make *this ring element one.
 
virtual Derived unitCanonical (Derived *u=NULL, Derived *v=NULL) const =0
 Obtain the unit normal (a.k.a canonical associate) of an element. More...
 
virtual Derived & operator= (const Derived &)=0
 Copy assignment.
 
virtual Derived operator+ (const Derived &) const =0
 Addition.
 
virtual Derived & operator+= (const Derived &)=0
 Addition assignment.
 
virtual Derived operator- (const Derived &) const =0
 Subtraction.
 
virtual Derived & operator-= (const Derived &)=0
 Subtraction assignment.
 
virtual Derived operator* (const Derived &) const =0
 Multiplication.
 
virtual Derived & operator*= (const Derived &)=0
 Multiplication assignment.
 
virtual Derived operator^ (long long int e) const =0
 Exponentiation.
 
virtual Derived & operator^= (long long int e)=0
 Exponentiation assignment.
 
virtual bool operator== (const Derived &) const =0
 Equality test,. More...
 
virtual bool operator!= (const Derived &) const =0
 Inequality test,. More...
 
virtual void print (std::ostream &ostream) const
 Print the Ring element. More...
 
virtual std::string toString () const
 Convert the Ring element to a string. More...
 
- Public Member Functions inherited from ExpressionTreeConvert
virtual ExpressionTree convertToExpressionTree () const =0
 Convert this to an expression tree. More...
 

Detailed Description

template<class Ring, class Derived>
class BPASBasePolynomial< Ring, Derived >

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

This is class is the common interface for both univariate and multivariate polynomials.

Depending on the true type of Ring, the interface may add some additional methods.

See also
BPASEuclideanPolynomial, BPASGCDPolynomial, BPASIntegralPolynomial.

Since polynomials themselves form a ring, we inherit from BPASRing<Derived>, meanwhile the ground ring, Ring, must also be a valid ring.

Member Function Documentation

◆ degree()

template<class Ring , class Derived >
virtual Integer BPASBasePolynomial< Ring, Derived >::degree ( ) const
pure virtual

Return the (total) degree of polynomial.

Returns
the degree.

◆ isConstantTermZero()

template<class Ring , class Derived >
virtual bool BPASBasePolynomial< Ring, Derived >::isConstantTermZero ( ) const
pure virtual

Determine if the constant term of this polynomial is zero or not.

Returns
true iff the constant term is zero.

◆ leadingCoefficient()

template<class Ring , class Derived >
virtual Ring BPASBasePolynomial< Ring, Derived >::leadingCoefficient ( ) const
pure virtual

Get the leading coefficient of this polynomial, the non-zero coefficient of the monomial with maximum degree.

Returns
the leading coefficient as a Ring.

◆ numberOfTerms()

template<class Ring , class Derived >
virtual Integer BPASBasePolynomial< Ring, Derived >::numberOfTerms ( ) const
pure virtual

Determine the number of non-zero terms in this polynomial.

Returns
the number of terms.

◆ operator*()

template<class Ring , class Derived >
virtual Derived BPASBasePolynomial< Ring, Derived >::operator* ( const Ring &  ) const
pure virtual

Multiplication operator of a ground ring element.

Parameters
ra ground ring element to multiply.
Returns
the product.

◆ operator*=()

template<class Ring , class Derived >
virtual Derived& BPASBasePolynomial< Ring, Derived >::operator*= ( const Ring &  )
pure virtual

Multiplication assignment operator of a ground ring element.

Parameters
ra ground ring element to multiply.
Returns
a reference to this polynomial, updated after multiplicaiton.

◆ operator+()

template<class Ring , class Derived >
virtual Derived BPASBasePolynomial< Ring, Derived >::operator+ ( const Ring &  r) const
pure virtual

Addition operator of a ground ring element.

Parameters
ra ground ring element to add.
Returns
the sum.

◆ operator+=()

template<class Ring , class Derived >
virtual Derived& BPASBasePolynomial< Ring, Derived >::operator+= ( const Ring &  )
pure virtual

Addition assignment operator of a ground ring element.

Parameters
ra ground ring element to add.
Returns
a reference to this polynomial, updated after addition.

◆ operator-() [1/2]

template<class Ring , class Derived >
virtual Derived BPASBasePolynomial< Ring, Derived >::operator- ( const Ring &  ) const
pure virtual

Subtraction operator of a ground ring element.

Parameters
ra ground ring element to subtract.
Returns
the difference.

◆ operator-() [2/2]

template<class Ring , class Derived >
virtual Derived BPASBasePolynomial< Ring, Derived >::operator- ( ) const
pure virtual

Negation operation.

Obtain the additive inverse of this polynomial.

Returns
the negation of this polynomial.

Implements BPASRing< Derived >.

◆ operator-=()

template<class Ring , class Derived >
virtual Derived& BPASBasePolynomial< Ring, Derived >::operator-= ( const Ring &  )
pure virtual

Subtraction assignment operator of a ground ring element.

Parameters
ra ground ring element to subtract.
Returns
a reference to this polynomial, updated after subtraction.

◆ operator=()

template<class Ring , class Derived >
virtual Derived& BPASBasePolynomial< Ring, Derived >::operator= ( const Ring &  r)
pure virtual

Assignment operator from the ground ring.

Parameters
ra ground ring element to assign from.
Returns
a reference to this polynomial.

◆ trailingCoefficient()

template<class Ring , class Derived >
virtual Ring BPASBasePolynomial< Ring, Derived >::trailingCoefficient ( ) const
pure virtual

Get the trailing coefficient of this polynomial, the non-zero coefficient of the monomial with minimum degree.

Returns
the trailing coefficient as a Ring.

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