Basic Polynomial Algebra Subprograms (BPAS)  v. 1.791
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
BigPrimeField Class Reference

A prime field whose prime can be arbitrarily large. More...

#include <BigPrimeField.hpp>

Simplified semantic inheritance diagram for BigPrimeField:
- Full inheritance diagram for BigPrimeField:

Public Member Functions

 BigPrimeField (mpz_class _a)
 BigPrimeField (long int _a)
 BigPrimeField (const BigPrimeField &c)
 BigPrimeField (const Integer &c)
 BigPrimeField (const RationalNumber &c)
 BigPrimeField (const ComplexRationalNumber &c)
 BigPrimeField (const SmallPrimeField &c)
 BigPrimeField (const GeneralizedFermatPrimeField &c)
 BigPrimeField (const DenseUnivariateIntegerPolynomial &c)
 BigPrimeField (const DenseUnivariateRationalPolynomial &c)
 BigPrimeField (const SparseUnivariatePolynomial< Integer > &c)
 BigPrimeField (const SparseUnivariatePolynomial< RationalNumber > &c)
 BigPrimeField (const SparseUnivariatePolynomial< ComplexRationalNumber > &c)
template<class Ring >
 BigPrimeField (const SparseUnivariatePolynomial< Ring > &c)
BigPrimeFieldBPFpointer (BigPrimeField *b)
BigPrimeFieldBPFpointer (RationalNumber *a)
BigPrimeFieldBPFpointer (SmallPrimeField *a)
BigPrimeFieldBPFpointer (GeneralizedFermatPrimeField *a)
mpz_class getCharacteristic () const override
 The characteristic of this ring class.
mpz_class Prime () const
mpz_class number () const
void whichprimefield ()
BigPrimeField findPrimitiveRootOfUnity (long int n) const
BigPrimeField unitCanonical (BigPrimeField *u=NULL, BigPrimeField *v=NULL) const
 Obtain the unit normal (a.k.a canonical associate) of an element. More...
BigPrimeFieldoperator= (const BigPrimeField &c)
 Copy assignment.
BigPrimeFieldoperator= (long int k)
BigPrimeFieldoperator= (const mpz_class &k)
bool isZero () const
 Determine if *this ring element is zero, that is the additive identity. More...
void zero ()
 Make *this ring element zero.
bool isOne () const
 Determine if *this ring element is one, that is the multiplication identity. More...
void one ()
 Make *this ring element one.
bool isNegativeOne () const
void negativeOne ()
int isConstant () const
bool operator== (const BigPrimeField &c) const
 Equality test,. More...
bool operator== (const mpz_class &k) const
bool operator== (long int k) const
bool operator!= (const BigPrimeField &c) const
 Inequality test,. More...
bool operator!= (const mpz_class &k) const
bool operator!= (long int k) const
BigPrimeField operator+ (const BigPrimeField &c) const
BigPrimeField operator+ (long int c) const
BigPrimeField operator+ (const mpz_class &c) const
BigPrimeFieldoperator+= (const BigPrimeField &c)
 Addition assignment.
BigPrimeField operator+= (long int c)
BigPrimeField operator+= (const mpz_class &c)
BigPrimeField operator- (const BigPrimeField &c) const
BigPrimeField operator- (long int c) const
BigPrimeField operator- (const mpz_class &c) const
BigPrimeFieldoperator-= (const BigPrimeField &c)
 Subtraction assignment.
BigPrimeField operator-= (long int c)
BigPrimeField operator-= (const mpz_class &c)
BigPrimeField operator- () const
BigPrimeField operator* (const BigPrimeField &c) const
BigPrimeField operator* (const mpz_class &c) const
BigPrimeField operator* (long int c) const
BigPrimeFieldoperator*= (const BigPrimeField &c)
 Multiplication assignment.
BigPrimeFieldoperator*= (const mpz_class &m)
BigPrimeFieldoperator*= (long int c)
BigPrimeField operator^ (long long int c) const
BigPrimeField operator^ (const mpz_class &exp) const
BigPrimeFieldoperator^= (long long int c)
 Exponentiation assignment.
BigPrimeFieldoperator^= (const mpz_class &e)
ExpressionTree convertToExpressionTree () const
 Convert this to an expression tree. More...
BigPrimeField operator/ (const BigPrimeField &c) const
 Exact division. More...
BigPrimeField operator/ (long int c) const
BigPrimeField operator/ (const mpz_class &c) const
BigPrimeFieldoperator/= (const BigPrimeField &c)
 Exact division assignment. More...
BigPrimeFieldoperator/= (long int c)
BigPrimeFieldoperator/= (const mpz_class &c)
BigPrimeField operator% (const BigPrimeField &c) const
 Get the remainder of *this and b;. More...
BigPrimeFieldoperator%= (const BigPrimeField &c)
 Assign *this to be the remainder of *this and b. More...
BigPrimeField gcd (const BigPrimeField &other) const
 Get GCD of *this and other. More...
BigPrimeField gcd (long int c)
BigPrimeField gcd (const mpz_class &c) const
Factors< BigPrimeFieldsquareFree () const
 Compute squarefree factorization of *this.
Integer euclideanSize () const
 Get the euclidean size of *this.
BigPrimeField euclideanDivision (const BigPrimeField &b, BigPrimeField *q=NULL) const
 Perform the eucldiean division of *this and b. More...
BigPrimeField extendedEuclidean (const BigPrimeField &b, BigPrimeField *s=NULL, BigPrimeField *t=NULL) const
 Perform the extended euclidean division on *this and b. More...
BigPrimeField quotient (const BigPrimeField &b) const
 Get the quotient of *this and b.
BigPrimeField remainder (const BigPrimeField &b) const
 Get the remainder of *this and b.
BigPrimeField inverse () const
 Get the inverse of *this. More...

Static Public Member Functions

static void setPrime (mpz_class p)
static BigPrimeField findPrimitiveRootofUnity (mpz_class n)

Static Public Attributes

static mpz_class characteristic

Detailed Description

A prime field whose prime can be arbitrarily large.

Member Function Documentation

◆ convertToExpressionTree()

ExpressionTree BigPrimeField::convertToExpressionTree ( ) const

Convert this to an expression tree.

returns an expression tree describing *this.

Implements ExpressionTreeConvert.

◆ euclideanDivision()

BigPrimeField BigPrimeField::euclideanDivision ( const BigPrimeField b,
BigPrimeField q = NULL 
) const

Perform the eucldiean division of *this and b.

Returns the remainder. If q is not NULL, then returns the quotient in q.

Implements BPASEuclideanDomain< BigPrimeField >.

◆ extendedEuclidean()

BigPrimeField BigPrimeField::extendedEuclidean ( const BigPrimeField b,
BigPrimeField s = NULL,
BigPrimeField t = NULL 
) const

Perform the extended euclidean division on *this and b.

Returns the GCD. If s and t are not NULL, returns the bezout coefficients in them.

Implements BPASEuclideanDomain< BigPrimeField >.

◆ gcd()

BigPrimeField BigPrimeField::gcd ( const BigPrimeField other) const

Get GCD of *this and other.

otherthe other element to get a gcd with.
the gcd.

Implements BPASGCDDomain< BigPrimeField >.

◆ inverse()

BigPrimeField BigPrimeField::inverse ( ) const

Get the inverse of *this.

the inverse

Implements BPASField< BigPrimeField >.

◆ isOne()

bool BigPrimeField::isOne ( ) const

Determine if *this ring element is one, that is the multiplication identity.

returns true iff *this is one.

Implements BPASRing< BigPrimeField >.

◆ isZero()

bool BigPrimeField::isZero ( ) const

Determine if *this ring element is zero, that is the additive identity.

returns true iff *this is zero.

Implements BPASRing< BigPrimeField >.

◆ operator!=()

bool BigPrimeField::operator!= ( const BigPrimeField ) const

Inequality test,.

returns true iff not equal.

Implements BPASRing< BigPrimeField >.

◆ operator%()

BigPrimeField BigPrimeField::operator% ( const BigPrimeField b) const

Get the remainder of *this and b;.

bthe divisor
the remainder

Implements BPASEuclideanDomain< BigPrimeField >.

◆ operator%=()

BigPrimeField& BigPrimeField::operator%= ( const BigPrimeField b)

Assign *this to be the remainder of *this and b.

bthe divisor
this after assignment.

Implements BPASEuclideanDomain< BigPrimeField >.

◆ operator/()

BigPrimeField BigPrimeField::operator/ ( const BigPrimeField d) const

Exact division.

dthe divisor.
the equotient.

Implements BPASIntegralDomain< BigPrimeField >.

◆ operator/=()

BigPrimeField& BigPrimeField::operator/= ( const BigPrimeField d)

Exact division assignment.

dthe divisor.
a reference to this after assignment.

Implements BPASIntegralDomain< BigPrimeField >.

◆ operator==()

bool BigPrimeField::operator== ( const BigPrimeField ) const

Equality test,.

returns true iff equal

Implements BPASRing< BigPrimeField >.

◆ unitCanonical()

BigPrimeField BigPrimeField::unitCanonical ( BigPrimeField u = NULL,
BigPrimeField v = NULL 
) const

Obtain the unit normal (a.k.a canonical associate) of an element.

If either parameters u, v, are non-NULL 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.

Implements BPASRing< BigPrimeField >.

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