Basic Polynomial Algebra Subprograms (BPAS)  v. 1.548
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:
[legend]

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 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
 Addition.
 
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
 Subtraction.
 
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
 Negation.
 
BigPrimeField operator* (const BigPrimeField &c) const
 Multiplication.
 
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
 Exponentiation.
 
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.
 
BigPrimeField operator/ (long int c) const
 
BigPrimeField operator/ (const mpz_class &c) const
 
BigPrimeFieldoperator/= (const BigPrimeField &c)
 Exact division assignment.
 
BigPrimeFieldoperator/= (long int c)
 
BigPrimeFieldoperator/= (const mpz_class &c)
 
BigPrimeField operator% (const BigPrimeField &c) const
 Get the remainder of *this and b;.
 
BigPrimeFieldoperator%= (const BigPrimeField &c)
 Assign *this to be the remainder of *this and b.
 
BigPrimeField gcd (const BigPrimeField &other) const
 Get GCD of *this and other.
 
BigPrimeField gcd (long int c)
 
BigPrimeField gcd (const mpz_class &c) const
 
Factors< BigPrimeFieldsquareFree () const
 Compute squarefree factorization of *this.
 
BigPrimeField 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.
 

Static Public Member Functions

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

Static Public Attributes

static mpz_class characteristic
 
static RingProperties properties
 

Detailed Description

A prime field whose prime can be arbitrarily large.

Member Function Documentation

◆ convertToExpressionTree()

ExpressionTree BigPrimeField::convertToExpressionTree ( ) const
inlinevirtual

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
virtual

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
virtual

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 >.

◆ isOne()

bool BigPrimeField::isOne ( ) const
inlinevirtual

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
inlinevirtual

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
inlinevirtual

Inequality test,.

returns true iff not equal.

Implements BPASRing< BigPrimeField >.

◆ operator==()

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

Equality test,.

returns true iff equal

Implements BPASRing< BigPrimeField >.

◆ unitCanonical()

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

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: