All Classes Functions Friends
urpolynomial.h
1 #ifndef _UNIPOLYNOMIAL_H_
2 #define _UNIPOLYNOMIAL_H_
3 
4 /**
5  * Data Structure for univariate rational number polynomial
6  * stored in a dense case
7  **/
8 
9 #include "../globals.h"
10 #include "../Multiplication/multiplication.h" // Taylor Shift DnC
11 #include "../Interval/interval.h"
12 
13 
14 void ts_modulo (lfixz*, lfixz, lfixz, int);
15 
17  private:
18  std::string name; // Variable name
19  int curd; // Current degree
20  int n; // Maximum size of the polynomial
21  lfixq* coef; // Coefficients
22 
23  inline void zeros() {
24  for (int i = 0; i < n; ++i)
25  coef[i] = 0;
26  }
27  bool isEqual(DenseUnivariateRationalPolynomial&);
28 
29  void taylorShiftCVL();
30 
31  /* Taylor Shift DnC */
32  /* Compute degree to the power of 2 */
33  void taylorShiftDnC(int, int);
34 
35  /* Taylor Shift Dnc */
36  /* Compute coefficients in each (1+x)^{2^i}, i = 0..log[2](n) */
37  void taylorShiftDnC(int);
38  void binomials(lfixz*, int);
39  void taylorShiftBasePower2(lfixz*, int);
40 
41  /* Taylor Shift IncrementalCilkFor */
42  void taylorShiftIncrementalCilkFor(lfixq*, int, int);
43  void tableauBase(lfixq*, int);
44  void polygonBase(lfixq*, int, int, int);
45  void taylorShiftBase(lfixq*, int);
46  void taylorShift3RegularCilkFor(lfixq*, int, int);
47 
48  /* Taylor Shift Tableau */
49  void taylorShiftTableau(int);
50  void taylorShiftBase(lfixq*, lfixq*, int);
51  void tableauBaseInplace(lfixq*, lfixq*, int, int);
52  void tableauConstruction(lfixq*, lfixq*, int, int, int);
53  void taylorShiftGeneral(lfixq*, lfixq*, int, int);
54 
55  /* Root Bound */
56  lfixz positiveRootBound();
57  lfixz cauchyRootBound();
58  lfixz complexRootBound();
59  int rootBoundExp();
60 
61  /* Real Root Isolation */
62  long taylorConstant(int, lfixz, int, lfixz);
63  void genDescartes(Intervals* pIs, DenseUnivariateRationalPolynomial*, int);
64  void isolateScaledUnivariatePolynomial(Intervals*, DenseUnivariateRationalPolynomial*, int);
65  void isolatePositiveUnivariateRealRoots(Intervals*, DenseUnivariateRationalPolynomial*, int);
66  void isolateUnivariateRealRoots(Intervals*, DenseUnivariateRationalPolynomial*, int);
67  void refineUnivariateInterval(Interval*, lfixq, DenseUnivariateRationalPolynomial*, lfixq);
68  void refineUnivariateIntervals(Intervals*, Intervals*, DenseUnivariateRationalPolynomial*, lfixq);
69  void univariatePositiveRealRootIsolation(Intervals*, DenseUnivariateRationalPolynomial*, lfixq, int);
70  void univariateRealRootIsolation(Intervals*, DenseUnivariateRationalPolynomial*, lfixq, int);
71 
72 
73  void pomopo(lfixq c, lfixq t, DenseUnivariateRationalPolynomial& b);
74  void resetDegree();
75 
76  // gcd subroutines
79 
80  public:
81  static int characteristic;
82  static bool isPrimeField;
83  static bool isComplexField;
84  /**
85  * Construct a polynomial
86  *
87  * @param d
88  **/
89  DenseUnivariateRationalPolynomial () : curd(0), n(1), name("%") {
90  coef = new lfixq[1];
91  coef[0] = 0;
92  }
93  /**
94  * Construct a polynomial with degree
95  *
96  * @param d: Size of the polynomial
97  **/
99  if (s < 1) { s = 1; }
100  n = s;
101  coef = new lfixq[n];
102  curd = 0;
103  //coef[0] = 0;
104  zeros();
105  name = "%";
106  }
107 
108  /**
109  * Construct a polynomial with a coefficient
110  *
111  * @param e: The coefficient
112  **/
113  DenseUnivariateRationalPolynomial (Integer e) : curd(0), n(1), name("%") {
114  coef = new lfixq[1];
115  coef[0] = mpq_class(e.get_mpz());
116  }
117  DenseUnivariateRationalPolynomial (RationalNumber e) : curd(0), n(1), name("%") {
118  coef = new lfixq[1];
119  coef[0] = mpq_class(e.get_num(), e.get_den());
120  }
121  /**
122  * Copy constructor
123  *
124  * @param b: A densed univariate rationl polynomial
125  **/
127  n = curd + 1;
128  coef = new lfixq[n];
129  std::copy(b.coef, b.coef+n, coef);
130  }
131  /**
132  * Destroy the polynomial
133  *
134  * @param
135  **/
137  delete [] coef;
138  }
139 
140  /**
141  * Get degree of the polynomial
142  *
143  * @param
144  **/
145  inline int degree() {
146  return curd;
147  }
148 
149  /**
150  * Get the leading coefficient
151  *
152  * @param
153  **/
154  inline mpq_class leadingCoefficient() {
155  return coef[curd];
156  }
157  /**
158  * Get coefficients of the polynomial, given start offset
159  *
160  * @param k: Offset
161  **/
162  inline mpq_class* coefficients(int k=0) {
163 #ifdef BPASDEBUG
164  if (k < 0 || k >= n)
165  std::cout << "BPAS: warning, try to access a non-exist coefficient " << k << " from DUQP(" << n << ")." << std::endl;
166 #endif
167  return &coef[k];
168  }
169  /**
170  * Get a coefficient of the polynomial
171  *
172  * @param k: Offset
173  **/
174  inline mpq_class coefficient(int k) {
175  if (k < 0 || k >= n)
176  return lfixq(0);
177  return coef[k];
178  }
179  /**
180  * Set a coefficient of the polynomial
181  *
182  * @param k: Offset
183  * @param val: Coefficient
184  **/
185  inline void setCoefficient(int k, mpq_class value) {
186  if (k >= n || k < 0) {
187  std::cout << "BPAS: error, DUQP(" << n << ") but trying to access " << k << "." << std::endl;
188  exit(1);
189  }
190  coef[k] = value;
191  if (k > curd && value != 0)
192  curd = k;
193  resetDegree();
194  }
195  inline void setCoefficient(int k, RationalNumber value) {
196  setCoefficient(k, lfixq(value.get_num(), value.get_den()));
197  }
198  inline void setCoefficient(int k, double value) {
199  setCoefficient(k, lfixq(value));
200  }
201  /**
202  * Get variable's name
203  *
204  * @param
205  **/
206  inline std::string variable() {
207  return name;
208  }
209  /**
210  * Set variable's name
211  *
212  * @param x: Varable's name
213  **/
214  inline void setVariableName (std::string x) {
215  name = x;
216  }
217  /**
218  * Overload operator =
219  *
220  * @param b: A univariate rational polynoial
221  **/
223  if (this != &b) {
224  if (n) { delete [] coef; n = 0; }
225  name = b.name;
226  curd = b.curd;
227  n = curd + 1;
228  coef = new lfixq[n];
229  std::copy(b.coef, b.coef+n, coef);
230  }
231  return *this;
232  }
233  /**
234  * Overload operator !=
235  *
236  * @param b: A univariate rational polynoial
237  **/
239  return !(isEqual(b));
240  }
241  /**
242  * Overload operator ==
243  *
244  * @param b: A univariate rational polynoial
245  **/
247  return isEqual(b);
248  }
249 
250  /**
251  * Is zero polynomial
252  *
253  * @param
254  **/
255  inline bool isZero () {
256  if (!curd)
257  return (coef[0] == 0);
258  return 0;
259  }
260  /**
261  * Zero polynomial
262  *
263  * @param
264  **/
265  inline void zero() {
266  curd = 0;
267  zeros();
268  //coef[0] = 0;
269  }
270  /**
271  * Is polynomial a constatn 1
272  *
273  * @param
274  **/
275  inline bool isOne() {
276  if (!curd)
277  return (coef[0] == 1);
278  return 0;
279  }
280  /**
281  * Set polynomial to 1
282  *
283  * @param
284  **/
285  inline void one() {
286  curd = 0;
287  coef[0] = 1;
288  for (int i = 1; i < n; ++i)
289  coef[i] = 0;
290  }
291  /**
292  * Is polynomial a constatn -1
293  *
294  * @param
295  **/
296  inline bool isNegativeOne() {
297  if (!curd)
298  return (coef[0] == -1);
299  return 0;
300  }
301  /**
302  * Set polynomial to -1
303  *
304  * @param
305  **/
306  inline void negativeOne() {
307  curd = 0;
308  coef[0] = -1;
309  for (int i = 1; i < n; ++i)
310  coef[i] = 0;
311  }
312  /**
313  * Is a constant
314  *
315  * @param
316  **/
317  inline int isConstant() {
318  if (curd) { return 0; }
319  else if (coef[0] >= 0) { return 1; }
320  else { return -1; }
321  }
322  /**
323  * Content of the polynomial
324  *
325  * @param
326  **/
327  inline int content() {
328  return !isZero();
329  }
330  /**
331  * Overload operator ^
332  * replace xor operation by exponentiation
333  *
334  * @param e: The exponentiation, e > 0
335  **/
337  /**
338  * Overload operator ^=
339  * replace xor operation by exponentiation
340  *
341  * @param e: The exponentiation, e > 0
342  **/
344  *this = *this ^ e;
345  return *this;
346  }
347  /**
348  * Overload operator <<
349  * replace by muplitying x^k
350  *
351  * @param k: The exponent of variable, k > 0
352  **/
354  /**
355  * Overload operator <<=
356  * replace by muplitying x^k
357  *
358  * @param k: The exponent of variable, k > 0
359  **/
361  *this = *this << k;
362  return *this;
363  }
364  /**
365  * Overload operator >>
366  * replace by dividing x^k, and
367  * return the quotient
368  *
369  * @param k: The exponent of variable, k > 0
370  **/
372  /**
373  * Overload operator >>=
374  * replace by dividing x^k, and
375  * return the quotient
376  *
377  * @param k: The exponent of variable, k > 0
378  **/
380  *this = *this >> k;
381  return *this;
382  }
383  /**
384  * Overload operator +
385  *
386  * @param b: A univariate rational polynomial
387  **/
389  /**
390  * Overload Operator +=
391  *
392  * @param b: A univariate rational polynomial
393  **/
395  if (curd >= b.curd)
396  add(b);
397  else
398  *this = *this + b;
399  return *this;
400  }
401  /**
402  * Add another polynomial to itself
403  *
404  * @param b: A univariate rational polynomial
405  **/
407  /**
408  * Overload Operator +
409  *
410  * @param c: A rational number
411  **/
414  return (r += c);
415  }
416  inline DenseUnivariateRationalPolynomial operator+ (mpq_class c) {
418  return (r += c);
419  }
420  /**
421  * Overload Operator +=
422  *
423  * @param c: A rational number
424  **/
426  coef[0] += lfixq(c.get_mpq_t());
427  return *this;
428  }
429  inline DenseUnivariateRationalPolynomial& operator+= (mpq_class c) {
430  coef[0] += c;
431  return *this;
432  }
433 
435  return (p + c);
436  }
437  /**
438  * Subtract another polynomial
439  *
440  * @param b: A univariate rational polynomial
441  */
443  /**
444  * Overload operator -=
445  *
446  * @param b: A univariate rational polynomial
447  **/
449  if (curd >= b.curd)
450  subtract(b);
451  else
452  *this = *this - b;
453  return *this;
454  }
455  /**
456  * Overload operator -, negate
457  *
458  * @param
459  **/
461  /**
462  * Subtract another polynomial from itself
463  *
464  * @param b: A univariate rational polynomial
465  **/
467  /**
468  * Overload operator -
469  *
470  * @param c: A rational number
471  **/
474  return (r -= c);
475  }
476  inline DenseUnivariateRationalPolynomial operator- (mpq_class c) {
478  return (r -= c);
479  }
480  /**
481  * Overload operator -=
482  *
483  * @param c: A rational number
484  **/
486  coef[0] -= lfixq(c.get_mpq_t());
487  return *this;
488  }
489  inline DenseUnivariateRationalPolynomial& operator-= (mpq_class c) {
490  coef[0] -= c;
491  return *this;
492  }
493 
495  return (-p + c);
496  }
497  /**
498  * Multiply to another polynomial
499  *
500  * @param b: A univariate rational polynomial
501  **/
503  /**
504  * Overload operator *=
505  *
506  * @param b: A univariate rational polynomial
507  **/
509  *this = *this * b;
510  return *this;
511  }
512  /**
513  * Overload operator *
514  *
515  * @param e: A rational number
516  **/
519  return (r *= e);
520  }
521  inline DenseUnivariateRationalPolynomial operator* (mpq_class e) {
523  return (r *= e);
524  }
527  return (r *= e);
528  }
529  /**
530  * Overload operator *=
531  *
532  * @param e: A rational number
533  **/
536  /**
537  * Overload operator *=
538  *
539  * @param e: A constant
540  **/
542 
544  return (p * c);
545  }
547  return (p * c);
548  }
549  /**
550  * Overload operator /
551  * ExactDivision
552  *
553  * @param b: A univariate rational polynomial
554  **/
557  return (rem /= b);
558  }
559  /**
560  * Overload operator /=
561  * ExactDivision
562  *
563  * @param b: A univariate rational polynomial
564  **/
566  /**
567  * Overload operator /
568  *
569  * @param e: A rational number
570  **/
573  return (r /= e);
574  }
577  return (r /= e);
578  }
579  /**
580  * Overload operator /=
581  *
582  * @param e: A rational number
583  **/
586 
588  /**
589  * Monic division
590  * Return quotient and itself become the remainder
591  *
592  * @param b: The dividend polynomial
593  **/
595  /**
596  * Monic division
597  * Return quotient
598  *
599  * @param b: The dividend polynomial
600  * @param rem: The remainder polynomial
601  **/
603  /**
604  * Lazy pseudo dividsion
605  * Return the quotient and itself becomes remainder
606  * e is the exact number of division steps
607  *
608  * @param b: The dividend polynomial
609  * @param c: The leading coefficient of b to the power e
610  * @param d: That to the power deg(a) - deg(b) + 1 - e
611  **/
613  /**
614  * Lazy pseudo dividsion
615  * Return the quotient
616  * e is the exact number of division steps
617  *
618  * @param b: The divident polynomial
619  * @param rem: The remainder polynomial
620  * @param c: The leading coefficient of b to the power e
621  * @param d: That to the power deg(a) - deg(b) + 1 - e
622  **/
624  /**
625  * Pseudo dividsion
626  * Return the quotient and itself becomes remainder
627  *
628  * @param b: The divident polynomial
629  * @param d: The leading coefficient of b
630  * to the power deg(a) - deg(b) + 1
631  **/
633  /**
634  * Pseudo dividsion
635  * Return the quotient
636  *
637  * @param b: The divident polynomial
638  * @param rem: The remainder polynomial
639  * @param d: The leading coefficient of b
640  * to the power deg(a) - deg(b) + 1
641  **/
643  /**
644  * s * a \equiv g (mod b), where g = gcd(a, b)
645  *
646  * @param b: A univariate polynomial
647  * @param g: The GCD of a and b
648  **/
650  /**
651  * s*a + t*b = c, where c in the ideal (a,b)
652  *
653  * @param a: A univariate polynomial
654  * @oaran b: A univariate polynomial
655  * @param s: Either s = 0 or degree(s) < degree(b)
656  * @param t
657  **/
659 
660  /**
661  * Compute k-th differentiate
662  *
663  * @param k: k-th differentiate, k > 0
664  **/
665  void differentiate(int k);
666  /**
667  * Compute the integral with constant of integration 0
668  *
669  * @param
670  **/
672  /**
673  * Evaluate f(x)
674  *
675  * @param x: Evaluation point
676  **/
677  mpq_class evaluate(mpq_class x);
678 
679  /**
680  * Is the least signficant coefficient zero
681  *
682  * @param
683  **/
685  /**
686  * GCD(p, q)
687  *
688  * @param q: The other polynomial
689  **/
691  /**
692  * Square free
693  *
694  * @param
695  **/
696  std::vector<DenseUnivariateRationalPolynomial> squareFree();
697  /**
698  * Divide by variable if it is zero
699  *
700  * @param
701  **/
702  bool divideByVariableIfCan();
703  /**
704  * Number of coefficient sign variation
705  *
706  * @param
707  **/
708  int numberOfSignChanges();
709 
710  /**
711  * Revert coefficients
712  *
713  * @param
714  **/
715  void reciprocal();
716  /**
717  * Homothetic operation
718  *
719  * @param k > 0: 2^(k*d) * f(2^(-k)*x);
720  **/
721  void homothetic(int k=1);
722  /**
723  * Scale transform operation
724  *
725  * @param k > 0: f(2^k*x)
726  **/
727  void scaleTransform(int k);
728  /**
729  * Compute f(-x)
730  *
731  * @param
732  **/
733  void negativeVariable();
734 
735  /**
736  * Compute -f(x)
737  *
738  * @param
739  **/
740  void negate();
741 
742  /**
743  * Return an integer k such that any positive root
744  alpha of the polynomial satisfies alpha < 2^k
745  *
746  * @param
747  **/
748  mpz_class rootBound();
749  /**
750  * Taylor Shift operation by 1
751  *
752  * @param ts: Algorithm id
753  **/
754  void taylorShift(int ts=-1);
755  /**
756  * Positive real root isolation
757  * for square-free polynomials
758  *
759  * @param width: Interval's right - left < width
760  * @ts: Taylor Shift option: 0 - CMY; -1 - optimized
761  **/
762  inline Intervals positiveRealRootIsolate (mpq_class width, int ts=-1) {
763  Intervals pIs;
764  univariatePositiveRealRootIsolation(&pIs, this, width, ts);
765  std::vector<std::string> xs;
766  xs.push_back(variable());
767  pIs.setVariableNames(xs);
768  return pIs;
769  }
770  /**
771  * Real root isolation
772  * for square-free polynomials
773  *
774  * @param width: Interval's right - left < width
775  * @ts: Taylor Shift option: 0 - CMY; -1 - optimized
776  **/
777  inline Intervals realRootIsolate (mpq_class width, int ts=-1) {
778  Intervals pIs;
779  univariateRealRootIsolation(&pIs, this, width, ts);
780  return pIs;
781  }
782  /**
783  * Refine a root
784  *
785  * @param a: The root
786  * @param width: Interval's right - left < width
787  **/
788  inline void refineRoot(Interval* a, mpq_class width) {
789  refineUnivariateInterval(a, a->right+1, this, width);
790  }
791  /**
792  * Refine the roots
793  *
794  * @paran a: The roots
795  * @param width: Interval's right - left < width
796  **/
797  inline Intervals refineRoots(Intervals& a, mpq_class width) {
798  Intervals b;
799  refineUnivariateIntervals(&b, &a, this, width);
800  return b;
801  }
802  /**
803  * Overload stream operator <<
804  *
805  * @param out: Stream object
806  * @param b: A univariate rational polynoial
807  **/
808  friend std::ostream& operator<< (std::ostream &out, DenseUnivariateRationalPolynomial b);
809 };
810 
811 #endif
812 /* This file is part of the BPAS library http://www.bpaslib.org
813 
814  BPAS is free software: you can redistribute it and/or modify
815  it under the terms of the GNU General Public License as published by
816  the Free Software Foundation, either version 3 of the License, or
817  (at your option) any later version.
818 
819  BPAS is distributed in the hope that it will be useful,
820  but WITHOUT ANY WARRANTY; without even the implied warranty of
821  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
822  GNU General Public License for more details.
823 
824  You should have received a copy of the GNU General Public License
825  along with BPAS. If not, see <http://www.gnu.org/licenses/>.
826 
827  Copyright: Changbo Chen <changbo.chen@hotmail.com>
828  Farnam Mansouri <mansouri.farnam@gmail.com>
829  Marc Moreno Maza <moreno@csd.uwo.ca>
830  Ning Xie <nxie6@csd.uwo.ca>
831  Yuzhen Xie <yuzhenxie@yahoo.ca>
832 
833 */
834 
835 
DenseUnivariateRationalPolynomial(const DenseUnivariateRationalPolynomial &b)
Definition: urpolynomial.h:126
std::string variable()
Definition: urpolynomial.h:206
mpq_class leadingCoefficient()
Definition: urpolynomial.h:154
DenseUnivariateRationalPolynomial operator>>(int k)
DenseUnivariateRationalPolynomial & operator>>=(int k)
Definition: urpolynomial.h:379
void zero()
Definition: urpolynomial.h:265
bool operator!=(DenseUnivariateRationalPolynomial &b)
Definition: urpolynomial.h:238
DenseUnivariateRationalPolynomial & operator/=(DenseUnivariateRationalPolynomial b)
int isConstant()
Definition: urpolynomial.h:317
void setCoefficient(int k, mpq_class value)
Definition: urpolynomial.h:185
DenseUnivariateRationalPolynomial & operator<<=(int k)
Definition: urpolynomial.h:360
Intervals realRootIsolate(mpq_class width, int ts=-1)
Definition: urpolynomial.h:777
DenseUnivariateRationalPolynomial & operator+=(DenseUnivariateRationalPolynomial b)
Definition: urpolynomial.h:394
void one()
Definition: urpolynomial.h:285
DenseUnivariateRationalPolynomial & operator-=(DenseUnivariateRationalPolynomial b)
Definition: urpolynomial.h:448
std::vector< DenseUnivariateRationalPolynomial > squareFree()
bool isZero()
Definition: urpolynomial.h:255
void add(DenseUnivariateRationalPolynomial b)
DenseUnivariateRationalPolynomial operator+(DenseUnivariateRationalPolynomial b)
DenseUnivariateRationalPolynomial(Integer e)
Definition: urpolynomial.h:113
DenseUnivariateRationalPolynomial operator*(DenseUnivariateRationalPolynomial b)
Definition: interval.h:14
DenseUnivariateRationalPolynomial & operator^=(int e)
Definition: urpolynomial.h:343
void subtract(DenseUnivariateRationalPolynomial b)
void refineRoot(Interval *a, mpq_class width)
Definition: urpolynomial.h:788
void setVariableNames(std::vector< std::string > xs)
Definition: interval.h:191
mpq_class evaluate(mpq_class x)
DenseUnivariateRationalPolynomial operator/(DenseUnivariateRationalPolynomial b)
Definition: urpolynomial.h:555
DenseUnivariateRationalPolynomial operator-()
DenseUnivariateRationalPolynomial operator<<(int k)
void setVariableName(std::string x)
Definition: urpolynomial.h:214
int content()
Definition: urpolynomial.h:327
bool isNegativeOne()
Definition: urpolynomial.h:296
Definition: urpolynomial.h:16
DenseUnivariateRationalPolynomial()
Definition: urpolynomial.h:89
void negativeOne()
Definition: urpolynomial.h:306
Intervals refineRoots(Intervals &a, mpq_class width)
Definition: urpolynomial.h:797
DenseUnivariateRationalPolynomial & operator*=(DenseUnivariateRationalPolynomial b)
Definition: urpolynomial.h:508
Definition: ring.h:48
Definition: polynomial.h:30
DenseUnivariateRationalPolynomial integrate()
DenseUnivariateRationalPolynomial operator^(int e)
void diophantinEquationSolve(DenseUnivariateRationalPolynomial a, DenseUnivariateRationalPolynomial b, DenseUnivariateRationalPolynomial *s, DenseUnivariateRationalPolynomial *t)
bool operator==(DenseUnivariateRationalPolynomial &b)
Definition: urpolynomial.h:246
Intervals positiveRealRootIsolate(mpq_class width, int ts=-1)
Definition: urpolynomial.h:762
mpq_class * coefficients(int k=0)
Definition: urpolynomial.h:162
DenseUnivariateRationalPolynomial pseudoDivide(DenseUnivariateRationalPolynomial &b, mpq_class *d=NULL)
DenseUnivariateRationalPolynomial lazyPseudoDivide(DenseUnivariateRationalPolynomial &b, mpq_class *c, mpq_class *d=NULL)
DenseUnivariateRationalPolynomial monicDivide(DenseUnivariateRationalPolynomial &b)
DenseUnivariateRationalPolynomial & operator=(DenseUnivariateRationalPolynomial b)
Definition: urpolynomial.h:222
Definition: ring.h:166
DenseUnivariateRationalPolynomial(int s)
Definition: urpolynomial.h:98
mpq_class coefficient(int k)
Definition: urpolynomial.h:174
DenseUnivariateRationalPolynomial gcd(DenseUnivariateRationalPolynomial q, int type=0)
~DenseUnivariateRationalPolynomial()
Definition: urpolynomial.h:136
DenseUnivariateRationalPolynomial halfExtendedEuclidean(DenseUnivariateRationalPolynomial b, DenseUnivariateRationalPolynomial *g)
Definition: interval.h:35
bool isOne()
Definition: urpolynomial.h:275
int degree()
Definition: urpolynomial.h:145