Basic Polynomial Algebra Subprograms (BPAS)
v. 1.791

An abstract class defining the interface of a commutative ring. More...
#include <BPASRing.hpp>
Public Member Functions  
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 =0 
Negation.  
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...  
Friends  
std::ostream &  operator<< (std::ostream &ostream, const Derived &d) 
Output operator. More...  
std::ostream &  operator<< (std::ostream &ostream, Derived &&d) 
An abstract class defining the interface of a commutative ring.
The template Derived is a concrete class derived from (implemeneting the interface of) BPASRing. This is the "curiously recurring template pattern" (CTRP). This pattern is used among all subclasses of BPASRing.

pure virtual 
Determine if *this ring element is one, that is the multiplication identity.
returns true iff *this is one.
Implemented in SmallPrimeField, UnivariateRationalFunction< UnivariatePolynomialOverField, Field >, DenseUnivariatePolynomial< Field >, SmallPrimeFieldDistributedDenseMultivariateModularPolynomial, GeneralizedFermatPrimeField, SmartFraction< Domain >, Integer, BigPrimeField, RationalNumber, ComplexRationalNumber, and Fraction< Domain >.

pure virtual 
Determine if *this ring element is zero, that is the additive identity.
returns true iff *this is zero.
Implemented in SmallPrimeField, UnivariateRationalFunction< UnivariatePolynomialOverField, Field >, DenseUnivariatePolynomial< Field >, SmartFraction< Domain >, SmallPrimeFieldDistributedDenseMultivariateModularPolynomial, GeneralizedFermatPrimeField, Integer, BigPrimeField, RationalNumber, Fraction< Domain >, and ComplexRationalNumber.

pure virtual 
Inequality test,.
returns true iff not equal.
Implemented in SmallPrimeField, SmallPrimeFieldDistributedDenseMultivariateModularPolynomial, Integer, DenseUnivariatePolynomial< Field >, GeneralizedFermatPrimeField, RationalNumber, UnivariateRationalFunction< UnivariatePolynomialOverField, Field >, BigPrimeField, SmartFraction< Domain >, ComplexRationalNumber, and Fraction< Domain >.

pure virtual 
Equality test,.
returns true iff equal
Implemented in SmallPrimeField, SmallPrimeFieldDistributedDenseMultivariateModularPolynomial, Integer, DenseUnivariatePolynomial< Field >, UnivariateRationalFunction< UnivariatePolynomialOverField, Field >, RationalNumber, GeneralizedFermatPrimeField, SmartFraction< Domain >, BigPrimeField, ComplexRationalNumber, and Fraction< Domain >.

inlinevirtual 
Print the Ring element.
Derived classes may override this to get custom printing that may be more expressive (and prettier) than expression tree printing.
Reimplemented in DenseUnivariatePolynomial< Field >, SmallPrimeFieldDistributedDenseMultivariateModularPolynomial, UnivariateRationalFunction< UnivariatePolynomialOverField, Field >, ComplexRationalNumber, SmartFraction< Domain >, and Fraction< Domain >.

inlinevirtual 
Convert the Ring element to a string.
Simple delegation of printing to a stringstream to obtain a string. Overriding the print method is sufficient for subclasses to make use of this method.
returns the string representation of the Ring element.

pure virtual 
Obtain the unit normal (a.k.a canonical associate) of an element.
If either parameters u, v, are nonNULL then the units are returned such that b = ua, v = u^1. Where b is the unit normal of a, and is the returned value.
Implemented in SmallPrimeField, UnivariateRationalFunction< UnivariatePolynomialOverField, Field >, DenseUnivariatePolynomial< Field >, SmallPrimeFieldDistributedDenseMultivariateModularPolynomial, Integer, SmartFraction< Domain >, RationalNumber, ComplexRationalNumber, BigPrimeField, Fraction< Domain >, and GeneralizedFermatPrimeField.

friend 
Output operator.
Defines a to string conversion.