1 #ifndef _ZERODIMENSIONALREGULARCHAIN_H_     2 #define _ZERODIMENSIONALREGULARCHAIN_H_     4 #include "regularchain_macros.hpp"     6 #include "BPASZeroDimRegularChain.hpp"     7 #include "../Ring/BPASField.hpp"     8 #include "regularchain.hpp"     9 #include "chainstructures.hpp"    10 #include "../TriangularSet/triangularset.hpp"    11 #include "../SubResultantChain/subresultantchain.hpp"    15 extern long long unsigned int rcProfilingStart;
    16 extern float primitivePartTime;
    17 extern float squareFreePartTime;
    18 extern float subresultantChainTime;
    19 extern float zerodimensionalregularchainTime;
    20 extern float pseudoDivideTime;
    21 extern float normalFormTime;
    23 extern float zdrcCopyTime;
    29 template <
class Field, 
class RecursivePoly>
    83         void constructChain(
const RecursivePoly& p, 
int options=ASSUME_REGULAR);
    97         std::vector<ZeroDimensionalRegularChain<Field,RecursivePoly>> constructChains(
const RecursivePoly& p, 
int options=ASSUME_REGULAR) 
const;
   120         #if defined(RC_WITH_GENERATORS) && RC_WITH_GENERATORS   123         std::vector<PolyChainPair<RecursivePoly,ZeroDimensionalRegularChain<Field,RecursivePoly>>> lastNonZeroSubResultant(
const RecursivePoly& f, 
const RecursivePoly& g, 
const Symbol& v, 
bool assumeRegular) 
const;
   136         #if defined(RC_WITH_GENERATORS) && RC_WITH_GENERATORS   137         void lastNonZeroSubResultant_inner(
const RecursivePoly& f, 
const RecursivePoly& g, 
const Symbol& v, 
const SubResultantChain<RecursivePoly,RecursivePoly>& src, 
bool assumeRegular, AsyncGenerator<PolyChainPair<RecursivePoly,
ZeroDimensionalRegularChain<Field,RecursivePoly>>>& results) 
const;
   139         std::vector<PolyChainPair<RecursivePoly,ZeroDimensionalRegularChain<Field,RecursivePoly>>> lastNonZeroSubResultant_inner(
const RecursivePoly& f, 
const RecursivePoly& g, 
const Symbol& v, 
const SubResultantChain<RecursivePoly,RecursivePoly>& src, 
bool assumeRegular) 
const;
   150         #if defined(RC_WITH_GENERATORS) && RC_WITH_GENERATORS   154         std::vector<PolyChainPair<RecursivePoly,ZeroDimensionalRegularChain<Field,RecursivePoly>>> _regularizeInitial(
const RecursivePoly& p) 
const;
   155         std::vector<BoolChainPair<ZeroDimensionalRegularChain<Field,RecursivePoly>>> _isInvertible(
const RecursivePoly& f) 
const;
   169         #if defined(RC_WITH_GENERATORS) && RC_WITH_GENERATORS   172         std::vector<ZeroDimensionalRegularChain<Field,RecursivePoly>> 
_intersect(
const RecursivePoly& p) 
const;
   183         #if defined(RC_WITH_GENERATORS) && RC_WITH_GENERATORS   186         std::vector<PolyChainPair<RecursivePoly,ZeroDimensionalRegularChain<Field,RecursivePoly>>> 
_regularGCD(
const RecursivePoly& p, 
const RecursivePoly& q, 
const Symbol& v);
   196         #if defined(RC_WITH_GENERATORS) && RC_WITH_GENERATORS   199         std::vector<PolyChainPair<RecursivePoly,ZeroDimensionalRegularChain<Field,RecursivePoly>>> 
_regularize(
const RecursivePoly& p) 
const;
   529         std::vector<ZeroDimensionalRegularChain<Field,RecursivePoly>> 
intersect(
const RecursivePoly& p) 
const;
   538         std::vector<PolyChainPair<RecursivePoly,ZeroDimensionalRegularChain<Field,RecursivePoly>>> 
regularize(
const RecursivePoly& p) 
const;
   548         std::vector<PolyChainPair<RecursivePoly,ZeroDimensionalRegularChain<Field,RecursivePoly>>> 
regularizeInitial(
const RecursivePoly& p) 
const;
   557         std::vector<BoolChainPair<ZeroDimensionalRegularChain<Field,RecursivePoly>>> 
isInvertible(
const RecursivePoly& p) 
const;
   567         std::vector<PolyChainPair<RecursivePoly,ZeroDimensionalRegularChain<Field,RecursivePoly>>> 
regularGCD(
const RecursivePoly& p, 
const RecursivePoly& q, 
const Symbol& v);
 ZeroDimensionalRegularChain< Field, RecursivePoly > & operator+=(const RecursivePoly &p)
Add assignment operator +=: Adds a polynomial p to a zero-dimensional regular chain, assuming that the main variable of p is neither algebraic nor transcendental, p contains no other non-transcendental variables, and that init(p) is regular modulo the saturated ideal of the current object. 
 
bool isEmpty() const
Copy an object derived from abstract BPASTriangularSet class to type of current object. 
 
std::vector< RecursivePoly > polynomials() const
Get the vector of polynoials in the triangular set. 
Definition: triangularset.hpp:369
 
std::vector< Symbol > mainVariables() const
Get algebraic variables in the current object. 
Definition: zerodimensionalregularchain.hpp:448
 
An abstract class defining the interface of a zero-dimensional regular chain. 
Definition: BPASZeroDimRegularChain.hpp:12
 
void lower(const Symbol &s, BPASTriangularSet< Field, RecursivePoly > &ts) const
Returns the zero-dimensional regular chain consisting of polynomials with main variable strictly less...
 
bool isEmpty() const
Find out if the current object is the empty chain. 
Definition: zerodimensionalregularchain.hpp:475
 
std::vector< Symbol > transcendentalVariables() const
Get transcendental variables in the current object. 
Definition: zerodimensionalregularchain.hpp:457
 
ZeroDimensionalRegularChain< Field, RecursivePoly > & operator=(const ZeroDimensionalRegularChain< Field, RecursivePoly > &a)
Assignment operator =. 
 
A class for handling regular chains in dimension zero. 
Definition: regularchain.hpp:61
 
int numberOfTranscendentalVariables() const
Get the number of transcendental variables. 
Definition: triangularset.hpp:302
 
std::vector< Symbol > variables() const
Get the (potentially algebraic) variable names for the current object in decreasing order...
Definition: zerodimensionalregularchain.hpp:439
 
int numberOfTranscendentalVariables() const
Get the number of transcendental variables in the current object. 
Definition: zerodimensionalregularchain.hpp:428
 
RecursivePoly select(const Symbol &s) const
Select the polynomial in the current object with main variable s, if it exists. 
Definition: regularchain.hpp:904
 
int numberOfVariables() const
Get the number of (potentially algebraic) variables. 
Definition: zerodimensionalregularchain.hpp:410
 
bool isAlgebraic(const Symbol &s) const
Determine if the input variable s is algebraic, i.e., if the triangular set contains a polynomial wit...
Definition: triangularset.hpp:347
 
std::vector< PolyChainPair< RecursivePoly, ZeroDimensionalRegularChain< Field, RecursivePoly > > > _regularize(const RecursivePoly &p) const
Compute a decomposition of the current object such that on each component the input polynomial is eit...
 
bool isAlgebraic(const Symbol &s) const
Find out if the input symbol is an algebraic variable of the current object. 
Definition: zerodimensionalregularchain.hpp:466
 
bool operator!=(const ZeroDimensionalRegularChain< Field, RecursivePoly > &a) const
Negated identity operator !=. 
 
std::vector< PolyChainPair< RecursivePoly, ZeroDimensionalRegularChain< Field, RecursivePoly > > > regularize(const RecursivePoly &p) const
Compute a decomposition of the current object such that on each component the input polynomial is eit...
 
std::vector< RecursivePoly > polynomials() const
Get the list of polynomials in the current object. 
Definition: zerodimensionalregularchain.hpp:484
 
void upper(const Symbol &s, BPASTriangularSet< Field, RecursivePoly > &ts) const
Returns the regular chain consisting of polynomials with main variable strictly greater than s...
 
std::vector< ZeroDimensionalRegularChain< Field, RecursivePoly > > intersect(const RecursivePoly &p) const
Compute the common solutions of the input polynomial and the current regular chain. 
 
std::vector< Symbol > variables() const
Get the (potentially algebriac) variable names in decreasing order. 
Definition: regularchain.hpp:895
 
std::vector< BoolChainPair< ZeroDimensionalRegularChain< Field, RecursivePoly > > > isInvertible(const RecursivePoly &p) const
Determine whether a recursively viewed polynomial is invertible with respect to the current regular c...
 
int numberOfAlgebraicVariables() const
Get the number of algebraic variables in the current object. 
Definition: zerodimensionalregularchain.hpp:419
 
std::vector< PolyChainPair< RecursivePoly, ZeroDimensionalRegularChain< Field, RecursivePoly > > > regularGCD(const RecursivePoly &p, const RecursivePoly &q, const Symbol &v)
Compute the gcd of two input polynomials p and q modulo the saturated ideal of the current object...
 
std::vector< PolyChainPair< RecursivePoly, ZeroDimensionalRegularChain< Field, RecursivePoly > > > _regularGCD(const RecursivePoly &p, const RecursivePoly &q, const Symbol &v)
Compute the gcd of two input polynomials p and q modulo the saturated ideal of the current object...
 
int options() const
Get the encoded options of the regular chain, a bitwise or of RegularChainOption values. 
 
int numberOfAlgebraicVariables() const
Get the number of algebraic variables. 
Definition: triangularset.hpp:293
 
ZeroDimensionalRegularChain< Field, RecursivePoly > operator+(const RecursivePoly &p) const
Add operator +: Adds a polynomial p to a zero-dimensional regular chain and returns a new zero-dimens...
 
A class for handling regular chains of arbitrary dimension. 
Definition: regularchain.hpp:69
 
int numberOfVariables() const
Get the number of (potentially algebraic) variables in the current object. 
Definition: regularchain.hpp:784
 
An encapsulation of a mathematical symbol. 
Definition: Symbol.hpp:23
 
void randomZeroDimensionalRegularChain(int nVars, int nTrcVars, int nTerms, unsigned long int coefBound, int pSparsity, bool includeNeg)
Generate a random zero-dimensional regular chain based on the number of terms of the polynomials of t...
 
std::vector< PolyChainPair< RecursivePoly, ZeroDimensionalRegularChain< Field, RecursivePoly > > > regularizeInitial(const RecursivePoly &p) const
Compute a decomposition of the current object such that on each component the initial of the input po...
 
std::vector< ZeroDimensionalRegularChain< Field, RecursivePoly > > _intersect(const RecursivePoly &p) const
Compute the common solutions of the input polynomial and the current regular chain. 
 
std::vector< Symbol > transcendentalVariables() const
Get the transcendentalVariables variables. 
Definition: triangularset.hpp:329
 
bool operator==(const ZeroDimensionalRegularChain< Field, RecursivePoly > &a) const
Identity operator ==. 
 
RecursivePoly select(const Symbol &s) const
Select the polynomial in the current object with main variable s, if it exists. 
Definition: zerodimensionalregularchain.hpp:493
 
std::vector< Symbol > mainVariables() const
Get the algebraic variables. 
Definition: triangularset.hpp:320