Basic Polynomial Algebra Subprograms (BPAS)  v. 1.791
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
UnivariateRationalFunction< UnivariatePolynomialOverField, Field > Class Template Reference

A univariate rational function templated by a unvariate polynomial over a field. More...

#include <urationalfunction.h>

Simplified semantic inheritance diagram for UnivariateRationalFunction< UnivariatePolynomialOverField, Field >:
- Full inheritance diagram for UnivariateRationalFunction< UnivariatePolynomialOverField, Field >:
[legend]

Public Member Functions

 UnivariateRationalFunction ()
 Construct the zero univariate rational function. More...
 
 UnivariateRationalFunction (const UnivariateRationalFunction< UnivariatePolynomialOverField, Field > &b)
 Copy constructor. More...
 
 UnivariateRationalFunction (UnivariatePolynomialOverField a, UnivariatePolynomialOverField b)
 
 ~UnivariateRationalFunction ()
 Destroy the rational function. More...
 
void setVariableName (Symbol name)
 
Symbol variable ()
 
bool isProfiling ()
 
void setProfiling (bool a)
 
bool isAnalyzingError ()
 
void setAnalyzingError (bool a)
 
bool isPFDLogPart ()
 
void setPFDLogPart (bool a)
 
bool isFloatingPointPrinting ()
 
void setFloatingPointPrinting (bool a)
 
bool isMapleOutput ()
 
void setMapleOutput ()
 
bool isMatlabOutput ()
 
void setMatlabOutput ()
 
void setNumerator (const UnivariatePolynomialOverField &b)
 
void setDenominator (const UnivariatePolynomialOverField &b)
 
void set (const UnivariatePolynomialOverField &a, const UnivariatePolynomialOverField &b)
 
UnivariatePolynomialOverField numerator () const
 Get the fraction's numerator. More...
 
UnivariatePolynomialOverField denominator () const
 Get the fraction's denominator. More...
 
Field evaluate (const Field &c)
 
bool operator!= (const UnivariateRationalFunction< UnivariatePolynomialOverField, Field > &b) const
 Inequality test,. More...
 
bool operator== (const UnivariateRationalFunction< UnivariatePolynomialOverField, Field > &b) const
 Equality test,. More...
 
UnivariateRationalFunction< UnivariatePolynomialOverField, Field > operator+ (const UnivariateRationalFunction< UnivariatePolynomialOverField, Field > &b) const
 Addition.
 
UnivariateRationalFunction< UnivariatePolynomialOverField, Field > & operator+= (const UnivariateRationalFunction< UnivariatePolynomialOverField, Field > &b)
 Addition assignment.
 
UnivariateRationalFunction< UnivariatePolynomialOverField, Field > operator- (const UnivariateRationalFunction< UnivariatePolynomialOverField, Field > &b) const
 Subtraction.
 
UnivariateRationalFunction< UnivariatePolynomialOverField, Field > & operator-= (const UnivariateRationalFunction< UnivariatePolynomialOverField, Field > &b)
 Subtraction assignment.
 
UnivariateRationalFunction< UnivariatePolynomialOverField, Field > operator- () const
 Negation.
 
UnivariateRationalFunction< UnivariatePolynomialOverField, Field > operator^ (long long int e) const
 Overload operator ^ replace xor operation by exponentiation. More...
 
UnivariateRationalFunction< UnivariatePolynomialOverField, Field > & operator^= (long long int e)
 Overload operator ^= replace xor operation by exponentiation. More...
 
UnivariateRationalFunction< UnivariatePolynomialOverField, Field > inverse () const
 Get the inverse of *this. More...
 
UnivariateRationalFunction< UnivariatePolynomialOverField, Field > operator* (const UnivariateRationalFunction< UnivariatePolynomialOverField, Field > &b) const
 Multiplication.
 
UnivariateRationalFunction< UnivariatePolynomialOverField, Field > & operator*= (const UnivariateRationalFunction< UnivariatePolynomialOverField, Field > &b)
 Multiplication assignment.
 
UnivariateRationalFunction< UnivariatePolynomialOverField, Field > operator/ (const UnivariateRationalFunction< UnivariatePolynomialOverField, Field > &b) const
 Exact division. More...
 
UnivariateRationalFunction< UnivariatePolynomialOverField, Field > & operator/= (const UnivariateRationalFunction< UnivariatePolynomialOverField, Field > &b)
 Exact division assignment. More...
 
void canonicalize ()
 Canonicalize this fraction, reducing terms as needed.
 
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
 
UnivariateRationalFunction< UnivariatePolynomialOverField, Field > unitCanonical (UnivariateRationalFunction< UnivariatePolynomialOverField, Field > *u=NULL, UnivariateRationalFunction< UnivariatePolynomialOverField, Field > *v=NULL) const
 Obtain the unit normal (a.k.a canonical associate) of an element. More...
 
UnivariateRationalFunction< UnivariatePolynomialOverField, Field > & operator= (const UnivariateRationalFunction< UnivariatePolynomialOverField, Field > &b)
 Overload operator =. More...
 
ExpressionTree convertToExpressionTree () const
 Convert this to an expression tree. More...
 
void print (std::ostream &ostream) const
 Overload stream operator <<. More...
 
UnivariateRationalFunction< UnivariatePolynomialOverField, Field > gcd (const UnivariateRationalFunction< UnivariatePolynomialOverField, Field > &b) const
 BPASGCDDomain, BPASEuclideanDomain, BPASField virtual methods. More...
 
Factors< UnivariateRationalFunctionsquareFree () const
 Compute squarefree factorization of *this.
 
Integer euclideanSize () const
 Get the euclidean size of *this.
 
UnivariateRationalFunction< UnivariatePolynomialOverField, Field > euclideanDivision (const UnivariateRationalFunction< UnivariatePolynomialOverField, Field > &b, UnivariateRationalFunction< UnivariatePolynomialOverField, Field > *q=NULL) const
 Perform the eucldiean division of *this and b. More...
 
UnivariateRationalFunction< UnivariatePolynomialOverField, Field > quotient (const UnivariateRationalFunction< UnivariatePolynomialOverField, Field > &b) const
 Get the quotient of *this and b. More...
 
UnivariateRationalFunction< UnivariatePolynomialOverField, Field > remainder (const UnivariateRationalFunction< UnivariatePolynomialOverField, Field > &b) const
 Get the remainder of *this and b. More...
 
UnivariateRationalFunction< UnivariatePolynomialOverField, Field > extendedEuclidean (const UnivariateRationalFunction< UnivariatePolynomialOverField, Field > &b, UnivariateRationalFunction< UnivariatePolynomialOverField, Field > *s=NULL, UnivariateRationalFunction< UnivariatePolynomialOverField, Field > *t=NULL) const
 Perform the extended euclidean division on *this and b. More...
 
UnivariateRationalFunction< UnivariatePolynomialOverField, Field > operator% (const UnivariateRationalFunction< UnivariatePolynomialOverField, Field > &b) const
 Get the remainder of *this and b;. More...
 
UnivariateRationalFunction< UnivariatePolynomialOverField, Field > & operator%= (const UnivariateRationalFunction< UnivariatePolynomialOverField, Field > &b)
 Assign *this to be the remainder of *this and b. More...
 
void hermiteReduce (std::vector< UnivariateRationalFunction< UnivariatePolynomialOverField, Field > > *g, UnivariateRationalFunction< UnivariatePolynomialOverField, Field > *h)
 
void integrateRationalFunctionLogPart (std::vector< SparseUnivariatePolynomial< UnivariatePolynomialOverField > > *S, std::vector< UnivariatePolynomialOverField > *U)
 
void differentiate ()
 
void integrate (UnivariatePolynomialOverField *P, std::vector< UnivariateRationalFunction< UnivariatePolynomialOverField, Field > > *g, std::vector< UnivariatePolynomialOverField > *U, std::vector< SparseUnivariatePolynomial< UnivariatePolynomialOverField > > *S)
 
void realSymbolicNumericIntegrate (UnivariatePolynomialOverField *P, std::vector< UnivariateRationalFunction< UnivariatePolynomialOverField, Field > > *g, std::vector< Field > *lg, std::vector< UnivariatePolynomialOverField > *Lg, std::vector< Field > *atn, std::vector< UnivariatePolynomialOverField > *Atn, int prec)
 
void realSymbolicNumericIntegrate (UnivariatePolynomialOverField *P, std::vector< UnivariateRationalFunction< UnivariatePolynomialOverField, Field > > *g, std::vector< Field > *lg, std::vector< UnivariatePolynomialOverField > *Lg, std::vector< Field > *atn, std::vector< UnivariatePolynomialOverField > *Atn1, std::vector< UnivariatePolynomialOverField > *Atn2, int prec)
 
void realSymbolicNumericIntegratePFD (UnivariatePolynomialOverField *P, std::vector< UnivariateRationalFunction< UnivariatePolynomialOverField, Field > > *g, std::vector< Field > *lg, std::vector< UnivariatePolynomialOverField > *Lg, std::vector< Field > *atn, std::vector< UnivariatePolynomialOverField > *Atn, int prec)
 
void realSymbolicNumericIntegrateSimplePFD (UnivariatePolynomialOverField *P, std::vector< UnivariateRationalFunction< UnivariatePolynomialOverField, Field > > *g, std::vector< Field > *lg, std::vector< UnivariatePolynomialOverField > *Lg, std::vector< Field > *atn, std::vector< UnivariatePolynomialOverField > *Atn, int prec)
 
void printIntegral (UnivariatePolynomialOverField &P, std::vector< UnivariateRationalFunction< UnivariatePolynomialOverField, Field > > &g, std::vector< UnivariatePolynomialOverField > &U, std::vector< SparseUnivariatePolynomial< UnivariatePolynomialOverField > > &S)
 
void printIntegral (UnivariatePolynomialOverField &P, std::vector< UnivariateRationalFunction< UnivariatePolynomialOverField, Field > > &g, std::vector< Field > &lg, std::vector< UnivariatePolynomialOverField > &Lg, std::vector< Field > &atn, std::vector< UnivariatePolynomialOverField > &Atn)
 
void printIntegral (UnivariatePolynomialOverField &P, std::vector< UnivariateRationalFunction< UnivariatePolynomialOverField, Field > > &g, std::vector< Field > &lg, std::vector< UnivariatePolynomialOverField > &Lg, std::vector< Field > &atn, std::vector< UnivariatePolynomialOverField > &Atn1, std::vector< UnivariatePolynomialOverField > &Atn2)
 
void realSymbolicNumericIntegrate (int prec)
 
void integrate ()
 

Public Attributes

mpz_class characteristic
 

Static Public Attributes

static bool isPrimeField
 
static bool isSmallPrimeField
 
static bool isComplexField
 

Detailed Description

template<class UnivariatePolynomialOverField, class Field>
class UnivariateRationalFunction< UnivariatePolynomialOverField, Field >

A univariate rational function templated by a unvariate polynomial over a field.

The univariate polynomial and the coefficient BPASField must be passed separately and explicitly.

Constructor & Destructor Documentation

◆ UnivariateRationalFunction() [1/3]

template<class UnivariatePolynomialOverField, class Field>
UnivariateRationalFunction< UnivariatePolynomialOverField, Field >::UnivariateRationalFunction ( )
inline

Construct the zero univariate rational function.

Parameters

◆ UnivariateRationalFunction() [2/3]

template<class UnivariatePolynomialOverField, class Field>
UnivariateRationalFunction< UnivariatePolynomialOverField, Field >::UnivariateRationalFunction ( const UnivariateRationalFunction< UnivariatePolynomialOverField, Field > &  b)
inline

Copy constructor.

Parameters
bA rational function

◆ UnivariateRationalFunction() [3/3]

template<class UnivariatePolynomialOverField, class Field>
UnivariateRationalFunction< UnivariatePolynomialOverField, Field >::UnivariateRationalFunction ( UnivariatePolynomialOverField  a,
UnivariatePolynomialOverField  b 
)
inline
Parameters
athe numerator
bthe denominator

◆ ~UnivariateRationalFunction()

template<class UnivariatePolynomialOverField, class Field>
UnivariateRationalFunction< UnivariatePolynomialOverField, Field >::~UnivariateRationalFunction ( )
inline

Destroy the rational function.

Parameters

Member Function Documentation

◆ convertToExpressionTree()

template<class UnivariatePolynomialOverField, class Field>
ExpressionTree UnivariateRationalFunction< UnivariatePolynomialOverField, Field >::convertToExpressionTree ( ) const
inlinevirtual

Convert this to an expression tree.

returns an expression tree describing *this.

Implements ExpressionTreeConvert.

◆ denominator()

template<class UnivariatePolynomialOverField, class Field>
UnivariatePolynomialOverField UnivariateRationalFunction< UnivariatePolynomialOverField, Field >::denominator ( ) const
inlinevirtual

◆ euclideanDivision()

template<class UnivariatePolynomialOverField, class Field>
UnivariateRationalFunction<UnivariatePolynomialOverField, Field> UnivariateRationalFunction< UnivariatePolynomialOverField, Field >::euclideanDivision ( const UnivariateRationalFunction< UnivariatePolynomialOverField, Field > &  b,
UnivariateRationalFunction< UnivariatePolynomialOverField, Field > *  q = NULL 
) const
inlinevirtual

Perform the eucldiean division of *this and b.

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

Parameters
bthe divisor.
[out]qa pointer to store the quotient in.
Returns
the remainder.

Implements BPASEuclideanDomain< UnivariateRationalFunction< UnivariatePolynomialOverField, Field > >.

◆ extendedEuclidean()

template<class UnivariatePolynomialOverField, class Field>
UnivariateRationalFunction<UnivariatePolynomialOverField, Field> UnivariateRationalFunction< UnivariatePolynomialOverField, Field >::extendedEuclidean ( const UnivariateRationalFunction< UnivariatePolynomialOverField, Field > &  b,
UnivariateRationalFunction< UnivariatePolynomialOverField, Field > *  s = NULL,
UnivariateRationalFunction< UnivariatePolynomialOverField, Field > *  t = NULL 
) const
inlinevirtual

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.

Parameters
bthe divisor.
[out]sthe bezout coefficient of this.
[out]tthe bezout coefficient of b.
Returns
the remainder.

Implements BPASEuclideanDomain< UnivariateRationalFunction< UnivariatePolynomialOverField, Field > >.

◆ gcd()

template<class UnivariatePolynomialOverField, class Field>
UnivariateRationalFunction<UnivariatePolynomialOverField, Field> UnivariateRationalFunction< UnivariatePolynomialOverField, Field >::gcd ( const UnivariateRationalFunction< UnivariatePolynomialOverField, Field > &  b) const
inlinevirtual

◆ inverse()

template<class UnivariatePolynomialOverField, class Field>
UnivariateRationalFunction<UnivariatePolynomialOverField,Field> UnivariateRationalFunction< UnivariatePolynomialOverField, Field >::inverse ( ) const
inlinevirtual

Get the inverse of *this.

Returns
the inverse

Implements BPASField< UnivariateRationalFunction< UnivariatePolynomialOverField, Field > >.

◆ isOne()

template<class UnivariatePolynomialOverField, class Field>
bool UnivariateRationalFunction< UnivariatePolynomialOverField, Field >::isOne ( ) const
inlinevirtual

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

returns true iff *this is one.

Implements BPASRing< UnivariateRationalFunction< UnivariatePolynomialOverField, Field > >.

◆ isZero()

template<class UnivariatePolynomialOverField, class Field>
bool UnivariateRationalFunction< UnivariatePolynomialOverField, Field >::isZero ( ) const
inlinevirtual

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

returns true iff *this is zero.

Implements BPASRing< UnivariateRationalFunction< UnivariatePolynomialOverField, Field > >.

◆ numerator()

template<class UnivariatePolynomialOverField, class Field>
UnivariatePolynomialOverField UnivariateRationalFunction< UnivariatePolynomialOverField, Field >::numerator ( ) const
inlinevirtual

◆ operator!=()

template<class UnivariatePolynomialOverField, class Field>
bool UnivariateRationalFunction< UnivariatePolynomialOverField, Field >::operator!= ( const UnivariateRationalFunction< UnivariatePolynomialOverField, Field > &  ) const
inlinevirtual

Inequality test,.

returns true iff not equal.

Implements BPASRing< UnivariateRationalFunction< UnivariatePolynomialOverField, Field > >.

◆ operator%()

template<class UnivariatePolynomialOverField, class Field>
UnivariateRationalFunction<UnivariatePolynomialOverField, Field> UnivariateRationalFunction< UnivariatePolynomialOverField, Field >::operator% ( const UnivariateRationalFunction< UnivariatePolynomialOverField, Field > &  b) const
inlinevirtual

Get the remainder of *this and b;.

Parameters
bthe divisor
Returns
the remainder

Implements BPASEuclideanDomain< UnivariateRationalFunction< UnivariatePolynomialOverField, Field > >.

◆ operator%=()

template<class UnivariatePolynomialOverField, class Field>
UnivariateRationalFunction<UnivariatePolynomialOverField, Field>& UnivariateRationalFunction< UnivariatePolynomialOverField, Field >::operator%= ( const UnivariateRationalFunction< UnivariatePolynomialOverField, Field > &  b)
inlinevirtual

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

Parameters
bthe divisor
Returns
this after assignment.

Implements BPASEuclideanDomain< UnivariateRationalFunction< UnivariatePolynomialOverField, Field > >.

◆ operator/()

template<class UnivariatePolynomialOverField, class Field>
UnivariateRationalFunction<UnivariatePolynomialOverField,Field> UnivariateRationalFunction< UnivariatePolynomialOverField, Field >::operator/ ( const UnivariateRationalFunction< UnivariatePolynomialOverField, Field > &  d) const
inlinevirtual

Exact division.

Parameters
dthe divisor.
Returns
the equotient.

Implements BPASIntegralDomain< UnivariateRationalFunction< UnivariatePolynomialOverField, Field > >.

◆ operator/=()

template<class UnivariatePolynomialOverField, class Field>
UnivariateRationalFunction<UnivariatePolynomialOverField,Field>& UnivariateRationalFunction< UnivariatePolynomialOverField, Field >::operator/= ( const UnivariateRationalFunction< UnivariatePolynomialOverField, Field > &  d)
inlinevirtual

Exact division assignment.

Parameters
dthe divisor.
Returns
a reference to this after assignment.

Implements BPASIntegralDomain< UnivariateRationalFunction< UnivariatePolynomialOverField, Field > >.

◆ operator=()

template<class UnivariatePolynomialOverField, class Field>
UnivariateRationalFunction<UnivariatePolynomialOverField,Field>& UnivariateRationalFunction< UnivariatePolynomialOverField, Field >::operator= ( const UnivariateRationalFunction< UnivariatePolynomialOverField, Field > &  b)
inlinevirtual

Overload operator =.

Parameters
bA rational function

Implements BPASRing< UnivariateRationalFunction< UnivariatePolynomialOverField, Field > >.

◆ operator==()

template<class UnivariatePolynomialOverField, class Field>
bool UnivariateRationalFunction< UnivariatePolynomialOverField, Field >::operator== ( const UnivariateRationalFunction< UnivariatePolynomialOverField, Field > &  ) const
inlinevirtual

Equality test,.

returns true iff equal

Implements BPASRing< UnivariateRationalFunction< UnivariatePolynomialOverField, Field > >.

◆ operator^()

template<class UnivariatePolynomialOverField, class Field>
UnivariateRationalFunction<UnivariatePolynomialOverField,Field> UnivariateRationalFunction< UnivariatePolynomialOverField, Field >::operator^ ( long long int  e) const
inlinevirtual

Overload operator ^ replace xor operation by exponentiation.

Parameters
eThe exponentiation, e > 0

Implements BPASRing< UnivariateRationalFunction< UnivariatePolynomialOverField, Field > >.

◆ operator^=()

template<class UnivariatePolynomialOverField, class Field>
UnivariateRationalFunction<UnivariatePolynomialOverField,Field>& UnivariateRationalFunction< UnivariatePolynomialOverField, Field >::operator^= ( long long int  e)
inlinevirtual

Overload operator ^= replace xor operation by exponentiation.

Parameters
eThe exponentiation, e > 0

Implements BPASRing< UnivariateRationalFunction< UnivariatePolynomialOverField, Field > >.

◆ print()

template<class UnivariatePolynomialOverField, class Field>
void UnivariateRationalFunction< UnivariatePolynomialOverField, Field >::print ( std::ostream &  ostream) const
inlinevirtual

Overload stream operator <<.

Parameters
outStream object
bThe rational function

Reimplemented from BPASRing< UnivariateRationalFunction< UnivariatePolynomialOverField, Field > >.

◆ quotient()

template<class UnivariatePolynomialOverField, class Field>
UnivariateRationalFunction<UnivariatePolynomialOverField, Field> UnivariateRationalFunction< UnivariatePolynomialOverField, Field >::quotient ( const UnivariateRationalFunction< UnivariatePolynomialOverField, Field > &  b) const
inlinevirtual

Get the quotient of *this and b.

Parameters
bthe divisor
Returns
the quotient

Implements BPASEuclideanDomain< UnivariateRationalFunction< UnivariatePolynomialOverField, Field > >.

◆ remainder()

template<class UnivariatePolynomialOverField, class Field>
UnivariateRationalFunction<UnivariatePolynomialOverField, Field> UnivariateRationalFunction< UnivariatePolynomialOverField, Field >::remainder ( const UnivariateRationalFunction< UnivariatePolynomialOverField, Field > &  b) const
inlinevirtual

Get the remainder of *this and b.

Parameters
bthe divisor
Returns
the remainder

Implements BPASEuclideanDomain< UnivariateRationalFunction< UnivariatePolynomialOverField, Field > >.

◆ unitCanonical()

template<class UnivariatePolynomialOverField, class Field>
UnivariateRationalFunction<UnivariatePolynomialOverField,Field> UnivariateRationalFunction< UnivariatePolynomialOverField, Field >::unitCanonical ( UnivariateRationalFunction< UnivariatePolynomialOverField, Field > *  u = NULL,
UnivariateRationalFunction< UnivariatePolynomialOverField, Field > *  v = NULL 
) const
inlinevirtual

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< UnivariateRationalFunction< UnivariatePolynomialOverField, Field > >.


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