Basic Polynomial Algebra Subprograms (BPAS)  v. 1.652
sdmpolynomial.h
1 #ifndef _SMALLMMPOLYNOMIAL_H_
2 #define _SMALLMMPOLYNOMIAL_H_
3
4 #include "../polynomial.h"
5 #include "../FFT/src/modpn.h"
6 #include "../FFT/src/general_routine.h"
7 #include "../FFT/src/basic_routine.h"
8 #include "../FFT/src/DDMP.h"
9 //#include "../../include/FFT/src/modpn_hfiles/Types.h"
10 //#if FURER
11 //#include "src/fft_furer1.h"
12 //#else
13 //#include "src/fft_iter1.h"
14 //#endif
15
16
17 #define SDMPBASESIZE 1024
18
19 /**
20  * A multivariate polynomial with coefficients in a small prime field using a dense representation.
21  */
22 class SmallPrimeFieldDistributedDenseMultivariateModularPolynomial : public BPASMultivariatePolynomial<sfixn,SmallPrimeFieldDistributedDenseMultivariateModularPolynomial>,
23  public BPASGCDDomain<SmallPrimeFieldDistributedDenseMultivariateModularPolynomial> {
24  private:
25  Symbol* names; // Variable names
26  int var; // Number of variables
27  int n; // Number of terms
28  sfixn* coefs; // Coefficients in Prime field
29  int* degs; // Partial size
30  sfixn p; // Prime
31  int* acc;
32
33  void zeros();
35  bool shrink();
38
39  public:
40  static mpz_class characteristic;
41  static RingProperties properties;
42  // static bool isPrimeField;
43  // static bool isSmallPrimeField;
44  // static bool isComplexField;
45
46  /**
47  * Constructor using a default prime
48  **/
50  p = BPASPRIME;
51  coefs = new sfixn[1];
52  coefs[0] = 0;
53  degs = new int[1];
54  degs[0] = 0;
55  acc = new int[1];
56  acc[0] = 1;
57  names = new Symbol[1];
58  names[0] = "1";
59  }
60
61  /**
62  * Constructor with the field
63  *
64  * @param m: The prime
65  **/
67  coefs = new sfixn[1];
68  coefs[0] = 0;
69  degs = new int[1];
70  degs[0] = 0;
71  acc = new int[1];
72  acc[0] = 1;
73  names = new Symbol[1];
74  names[0] = "1";
75  }
76
77  /**
78  * Constructor with number of variables and terms
79  *
80  * @param v: Number of variables
81  * @param ds: Partial degrees
82  * @param m: The prime
83  **/
84  SmallPrimeFieldDistributedDenseMultivariateModularPolynomial (int v, int* ds, sfixn m) : var(v), p(m) {
85  degs = new int[var];
86  acc = new int[var];
87  acc[0] = 1;
88  for (int i = 0; i < var; ++i) {
89  degs[i] = ds[i];
90  if (i < var - 1)
91  acc[i+1] = acc[i] * (degs[i] + 1);
92  }
93  n = acc[var-1] * (degs[var-1] + 1);
94  coefs = new sfixn[n];
95  zeros();
96  names = new Symbol[var+1];
97  names[0] = "1";
98  for (int i = 1; i <= var; ++i) {
99  std::ostringstream convert;
100  convert << var - i + 1;
101  names[i] = "_";
102  names[i] += convert.str();
103  }
104  }
105
106  /**
107  * Construct with a variable name
108  * such that f(x) = x;
109  *
110  * @param x: The variable name
111  * @param m: The prime
112  **/
114  names = new Symbol[2];
115  names[0] = "9";
116  names[1] = x;
117  degs = new int[1];
118  degs[0] = 1;
119  acc = new int[1];
120  acc[0] = 1;
121  coefs = new sfixn[2];
122  coefs[0] = 0;
123  coefs[1] = 1;
124  }
125
126  /**
127  * Copy constructor
128  *
129  * @param b: A multivariate modular polynomial
130  **/
132  degs = new int[var];
133  std::copy(b.degs, b.degs+var, degs);
134  acc = new int[var];
135  std::copy(b.acc, b.acc+var, acc);
136  coefs = new sfixn[n];
137  std::copy(b.coefs, b.coefs+n, coefs);
138  names = new Symbol[var+1];
139  std::copy(b.names, b.names+var+1, names);
140  }
141
142  /**
143  * Deconstructor
144  *
145  * @param
146  **/
148  delete [] coefs;
149  delete [] degs;
150  delete [] names;
151  delete [] acc;
152  }
153
154  /**
156  *
157  * @param b: A multivariate modular polynomial
158  **/
160  if (this != &b) {
161  delete [] coefs;
162  delete [] degs;
163  delete [] names;
164  delete [] acc;
165
166  var = b.var;
167  degs = new int[var];
168  std::copy(b.degs, b.degs+var, degs);
169  acc = new int[var];
170  std::copy(b.acc, b.acc+var, acc);
171  n = b.n;
172  coefs = new sfixn[n];
173  std::copy(b.coefs, b.coefs+n, coefs);
174  names = new Symbol[var+1];
175  std::copy(b.names, b.names+var+1, names);
176  p = b.p;
177  }
178  return *this;
179  }
180
183  }
184
185  /**
186  * Is a zero polynomial
187  *
188  * @param
189  **/
190  inline bool isZero() const {
191  for (int i = 0; i < n; ++i) {
192  if (coefs[i] != 0)
193  return 0;
194  }
195  return 1;
196  }
197
198  /**
199  * Zero polynomial
200  *
201  * @param
202  **/
203  inline void zero() {
204  zeros();
205  }
206
207  /**
208  * Is polynomial 1
209  *
210  * @param
211  **/
212  inline bool isOne() const {
213  for (int i = 1; i < n; ++i) {
214  if (coefs[i] != 0)
215  return 0;
216  }
217  return (coefs[0] == 1);
218  }
219
220  /**
221  * Set polynomial to 1
222  *
223  * @param
224  **/
225  inline void one() {
226  coefs[0] = 1;
227  for (int i = 1; i < n; ++i)
228  coefs[i] = 0;
229  }
230
231  /**
232  * Is polynomial -1
233  *
234  * @param
235  **/
236  inline bool isNegativeOne() const {
237  for (int i = 1; i < n; ++i) {
238  if (coefs[i] != 0)
239  return 0;
240  }
241  return (coefs[0] == p - 1);
242  }
243
244  /**
245  * Set polynomial to -1
246  *
247  * @param
248  **/
249  inline void negativeOne() {
250  coefs[0] = p - 1;
251  for (int i = 1; i < n; ++i)
252  coefs[i] = 0;
253  }
254
255  /**
256  * Is a constant
257  *
258  * @param
259  **/
260  inline int isConstant() const {
261  for (int i = 1; i < n; ++i) {
262  if (coefs[i] != 0)
263  return 0;
264  }
265  if (coefs[0] < (p >> 1)) { return 1; }
266  else { return -1; }
267  }
268
273  mpz_class mpzPrime(p);
274
275  mpz_t temp;
276  mpz_init(temp);
278  mpz_set_si(temp, 0);
280  mpz_clear(temp);
281
283  if (u != NULL) {
285  }
286  if (v != NULL) {
288  }
289  return ret;
290  }
291
292  /**
293  * Get the number of variables
294  *
295  * @param
296  **/
297  inline int numberOfVariables() const {
298  return variables().size();
299  }
300
301  /**
302  * Get the number of variables in this polynomial ring.
303  */
304  inline int numberOfRingVariables() const {
305  return ringVariables().size();
306  }
307
308  /**
309  * Get the number of non-zero terms
310  *
311  * @param
312  **/
313  inline Integer numberOfTerms() const {
314  int k = 0;
315  for (int i = 0; i < n; ++i)
316  if (coefs[i] != 0) { k++; }
317  return k;
318  }
319
320  /**
321  * Get the size of the polynomial
322  *
323  * @param
324  **/
325  inline int size() const {
326  return n;
327  }
328
329  /**
330  * Total degree.
331  */
332  inline Integer degree() const {
333  std::cerr << "SmallPrimeFieldDistributedDenseMultivariateModularPolynomial::degree() NOT YET IMPLEMENTED" << std::endl;
334  //TODO
335  return 0;
336  }
337
338  /**
339  * Get a partial degree of variable x
340  *
341  * @param x: The variable name
342  **/
343  inline Integer degree(const Symbol& x) const {
344  int k = 0, d = 0;
345  for (int i = 1; i <= var; ++i) {
346  if (names[i] == x) {
347  k = i;
348  break;
349  }
350  }
351  if (k) {
352  k--;
353  for (int i = 0; i < n; ++i) {
354  int e = (i / acc[k]) % (degs[k] + 1);
355  if (coefs[i] != 0 && e > d)
356  d = e;
357  }
358  }
359  return d;
360  }
361
362  /**
363  * Get the leading coefficient
364  *
365  * @param
366  **/
367  inline sfixn leadingCoefficient() const {
368  for (int i = n-1; i > -1; --i) {
369  if (coefs[i] != 0)
370  return coefs[i];
371  }
372  return 0;
373  }
374
375  inline sfixn trailingCoefficient() const {
376  for (int i = 0; i < n; ++i) {
377  if (coefs[i] != 0) {
378  return coefs[i];
379  }
380  }
381  return 0;
382  }
383
384  inline bool isConstantTermZero() const {
385  return (coefs[0] == 0);
386  }
387
388  /**
389  * Get a coefficient
390  *
391  * @param v: Number of variables
392  * @param d: The exponent of each variable
393  **/
394  inline sfixn coefficient(int v, const int* d) const {
395  int k = 0;
396  for (int i = var-1, j = 0; i > -1 && j < v; --i, ++j) {
397  if (d[j] <= degs[i])
398  k += d[j] * acc[i];
399  else { return 0; }
400  }
401  for (int i = v-var-1; i > -1; --i)
402  if (d[i]) { return 0; }
403  return coefs[k];
404  }
405
406  inline sfixn coefficient(const std::vector<int>& v) const {
407  return coefficient(v.size(), v.data());
408  }
409
410  /**
411  * Set a coefficient
412  *
413  * @param v: Number of variables
414  * @param d: The exponent of each variable
415  * @param val: Value of the coefficient
416  **/
417  inline void setCoefficient(int v, const int* d, const sfixn& val) {
418  if (v != var) {
419  std::cout << "BPAS: error, SFDDMMP(" << var << "), but trying to setCoefficient with " << v << " variables." << std::endl;
420  exit(1);
421  }
422  int k = 0;
423  for (int i = var-1, j = 0; i > -1 && j < v; --i, ++j) {
424  if (d[j] <= degs[i])
425  k += d[j] * acc[i];
426  else {
427  std::cout << "BPAS: error, the degree of " << names[i+1] << " in SFDDMMP is " << degs[i] << "." << std::endl;
428  exit(1);
429  }
430  }
431  coefs[k] = val;
432  }
433
434  inline void setCoefficient(const std::vector<int>& v, const sfixn& val) {
435  setCoefficient(v.size(), v.data(), val);
436  }
437
438  /**
439  * Set a coefficient
440  *
441  * @param k: The offset in the coefficient array
442  * @param val: Value of the coefficient
443  **/
444  inline void setCoefficient(int k, const sfixn& val) {
445  if (k >= n || k < 0) {
446  std::cout << "BPAS: error, trying to access a non-exist coefficient in SFDDMMP<Field>." << std::endl;
447  exit(1);
448  }
449  coefs[k] = val;
450  }
451
452  /**
453  * Get variable names
454  *
455  * @param
456  **/
457  inline std::vector<Symbol> ringVariables() const {
458  std::vector<Symbol> xs;
459  for (int i = var; i > 0; --i)
460  xs.push_back(names[i]);
461  return xs;
462  }
463
464  /**
465  * Set variable names
466  *
467  * @param xs: Variable names
468  **/
469  inline void setRingVariables(const std::vector<Symbol>& xs) {
470  int ns = xs.size();
471  if (ns != var) {
472  std::cerr << "BPAS ERROR: SDMP shrinking and expanding polynomial ring NOT YET IMPLEMENTED" << std::endl;
473  return;
474  }
475  names[0] = "9";
476  for (int i = var, j = 0; i > 0 && j < ns; --i, ++j)
477  names[i] = xs[j];
478  }
479
480  inline std::vector<Symbol> variables() const {
481  std::cerr << "BPAS ERROR: SDMP::variables() NOT YET IMPLEMENTED" << std::endl;
482  return ringVariables();
483  }
484
485  /**
486  * Convert current object to its k-th derivative
487  *
488  * @param s: Symbol to differentiate with respect to
489  * @param k: Order of the derivative, k > 0
490  **/
491  void differentiate(const Symbol& s, int k) {}
492
493  /**
494  * Convert current object to its derivative
495  *
496  * @param s: Symbol to differentiate with respect to
497  **/
498  inline void differentiate(const Symbol& s) {
499  this->differentiate(s,0);
500  }
501
502  /**
503  * Return k-th derivative
504  *
505  * @param s: Symbol to differentiate with respect to
506  * @param k: Order of the k-th derivative, k > 0
507  **/
510  a.differentiate(s,k);
511  return a;
512  }
513  /**
514  * Compute derivative
515  *
516  * @param s: Symbol to differentiate with respect to
517  **/
519  return this->derivative(s,0);
520  }
521
522  /**
523  * Evaluate f(x)
524  *
525  * @param syms: Array of Symbols to evaluate at corresponding xs
526  * @param xs: Evaluation points
527  **/
528  inline SmallPrimeFieldDistributedDenseMultivariateModularPolynomial evaluate(int, const Symbol* syms, const sfixn* xs) const {
530  return a;
531  }
532
533  /**
534  * Evaluate f(x)
535  *
536  * @param syms: Vector of Symbols to evaluate at corresponding xs
537  * @param xs: Corresponding evaluation points
538  **/
539  inline SmallPrimeFieldDistributedDenseMultivariateModularPolynomial evaluate(const std::vector<Symbol>& syms, const std::vector<sfixn>& xs) const {
541  return a;
542  }
543
544  /**
546  *
547  * @param b: A multivariate modular polynomial
548  **/
550
551  /**
553  *
554  * @param b: A multivariate modular polynomial
555  **/
557  return !(*this == b);
558  }
559
560  /**
562  *
563  * @param b: A multivariate modular polynomial
564  **/
566
567  /**
569  *
570  * @param b: A multivariate modular polynomial
571  **/
573  *this = *this + b;
574  return *this;
575  }
576
577  /**
579  *
580  * @param e: A constant
581  **/
584  return (r += e);
585  }
586
588  return (f + e);
589  }
590
591  /**
593  *
594  * @param e: A constant
595  **/
597
598  /**
600  *
601  * @param b: A multivariate modular polynomial
602  **/
604
605  /**
607  *
608  * @param b: A multivariate modular polynomial
609  **/
611  *this = *this - b;
612  return *this;
613  }
614
615  /**
617  *
618  * @param e: A constant
619  **/
622  return (r -= e);
623  }
624
626  return (-r + e);
627  }
628
629  /**
631  *
632  * @param e: A constant
633  **/
635
636  /**
637  * Overload operator -, negate
638  *
639  * @param
640  **/
642
643  /**
644  * Negate, f(-x)
645  *
646  * @param
647  **/
648  void negate();
649
650  /**
652  *
653  * @param b: A multivariate modular polynomial
654  **/
656
657  /**
659  *
660  * @param b: A multivariate modular polynomial
661  **/
663  *this = *this * b;
664  return *this;
665  }
666
667  /**
669  *
670  * @param e: A constant
671  **/
674  return (r *= e);
675  }
676
678  return (f * e);
679  }
680
681  /**
683  *
684  * @param e: A constant
685  **/
687
688  /**
689  * Overload operator ^ for exponentiation.
690  *
691  *
692  */
694  //TODO
695  std::cerr << "BPAS ERROR: SmallPrimeFieldDistributedDenseMultivariateModularPolynomial::opeartor^ NOT YET IMPLEMENTED" << std::endl;
696  return *this;
697  }
698
699  /**
700  * Overload operator ^ for exponentiation.
701  *
702  *
703  */
705  *this = *this ^ e;
706  return *this;
707  }
708
709  SmallPrimeFieldDistributedDenseMultivariateModularPolynomial operator/ (const sfixn& e) const {
710  std::cerr << "BPAS ERROR: SmallPrimeFieldDistributedDenseMultivariateModularPolynomial::operator/(sfixn) NOT YET IMPLEMENTED" << std::endl;
711  return *this;
712  }
713
715  *this = *this / e;
716  return *this;
717  }
718  sfixn content() const {
719  std::cerr << "BPAS ERROR: SmallPrimeFieldDistributedDenseMultivariateModularPolynomial::content NOT YET IMPLEMENTED" << std::endl;
720  return sfixn(1);
721  }
722
724  std::cerr << "BPAS ERROR: SmallPrimeFieldDistributedDenseMultivariateModularPolynomial::primitivePart NOT YET IMPLEMENTED" << std::endl;
725  return *this;
726  }
727
728  void print(std::ostream& out) const;
729
730  /**
731  * Convert *this to an expression tree
732  *
733  */
735
737  std::cerr << "SmallPrimeFieldDistributedDenseMultivariateModularPolynomial::operator/ NOT YET IMPLEMENTED" << std::endl;
738  //TODO
739  return *this;
740  }
741
743  std::cerr << "SmallPrimeFieldDistributedDenseMultivariateModularPolynomial::operator/= NOT YET IMPLEMENTED" << std::endl;
744  //TODO
745  return *this;
746  }
747
749  std::cerr << "SmallPrimeFieldDistributedDenseMultivariateModularPolynomial::gcd NOT YET IMPLEMENTED" << std::endl;
750  //TODO
751  return *this;
752  }
753
754  /**
755  * Compute squarefree factorization of *this
756  */
758  std::cerr << "SmallPrimeFieldDistributedDenseMultivariateModularPolynomial::squareFree NOT YET IMPLEMENTED" << std::endl;
759  //TODO
760  std::vector<SmallPrimeFieldDistributedDenseMultivariateModularPolynomial> ret;
761  ret.push_back(*this);
762  return ret;
763  }
764
765 };
766
767 #endif
768
SmallPrimeFieldDistributedDenseMultivariateModularPolynomial & operator-=(const SmallPrimeFieldDistributedDenseMultivariateModularPolynomial &b)
Definition: sdmpolynomial.h:610
SmallPrimeFieldDistributedDenseMultivariateModularPolynomial & operator+=(const SmallPrimeFieldDistributedDenseMultivariateModularPolynomial &b)
Definition: sdmpolynomial.h:572
SmallPrimeFieldDistributedDenseMultivariateModularPolynomial derivative(const Symbol &s) const
Compute derivative.
Definition: sdmpolynomial.h:518
SmallPrimeFieldDistributedDenseMultivariateModularPolynomial evaluate(int, const Symbol *syms, const sfixn *xs) const
Evaluate f(x)
Definition: sdmpolynomial.h:528
void print(std::ostream &out) const
Print the Ring element.
A multivariate polynomial with coefficients in a small prime field using a dense representation.
Definition: sdmpolynomial.h:22
An abstract class defining the interface of a GCD domain.
Definition: BPASGCDDomain.hpp:14
bool isOne() const
Is polynomial 1.
Definition: sdmpolynomial.h:212
sfixn coefficient(int v, const int *d) const
Get a coefficient.
Definition: sdmpolynomial.h:394
SmallPrimeFieldDistributedDenseMultivariateModularPolynomial(Symbol x, sfixn m)
Construct with a variable name such that f(x) = x;.
Definition: sdmpolynomial.h:113
SmallPrimeFieldDistributedDenseMultivariateModularPolynomial operator*(const SmallPrimeFieldDistributedDenseMultivariateModularPolynomial &b) const
SmallPrimeFieldDistributedDenseMultivariateModularPolynomial(const SmallPrimeFieldDistributedDenseMultivariateModularPolynomial &b)
Copy constructor.
Definition: sdmpolynomial.h:131
SmallPrimeFieldDistributedDenseMultivariateModularPolynomial & operator*=(const SmallPrimeFieldDistributedDenseMultivariateModularPolynomial &b)
Definition: sdmpolynomial.h:662
Factors< SmallPrimeFieldDistributedDenseMultivariateModularPolynomial > squareFree() const
Compute squarefree factorization of *this.
Definition: sdmpolynomial.h:757
An ExpressionTree encompasses various forms of data that can be expressed generically as a binary tre...
Definition: ExpressionTree.hpp:17
void setRingVariables(const std::vector< Symbol > &xs)
Set variable names.
Definition: sdmpolynomial.h:469
~SmallPrimeFieldDistributedDenseMultivariateModularPolynomial()
Deconstructor.
Definition: sdmpolynomial.h:147
SmallPrimeFieldDistributedDenseMultivariateModularPolynomial operator+(const SmallPrimeFieldDistributedDenseMultivariateModularPolynomial &b) const
ExpressionTree convertToExpressionTree() const
Convert *this to an expression tree.
SmallPrimeFieldDistributedDenseMultivariateModularPolynomial unitCanonical(SmallPrimeFieldDistributedDenseMultivariateModularPolynomial *u=NULL, SmallPrimeFieldDistributedDenseMultivariateModularPolynomial *v=NULL) const
Obtain the unit normal (a.k.a canonical associate) of an element.
Definition: sdmpolynomial.h:269
int numberOfRingVariables() const
Get the number of variables in this polynomial ring.
Definition: sdmpolynomial.h:304
void zero()
Zero polynomial.
Definition: sdmpolynomial.h:203
void setCoefficient(int v, const int *d, const sfixn &val)
Set a coefficient.
Definition: sdmpolynomial.h:417
SmallPrimeFieldDistributedDenseMultivariateModularPolynomial(int v, int *ds, sfixn m)
Constructor with number of variables and terms.
Definition: sdmpolynomial.h:84
SmallPrimeFieldDistributedDenseMultivariateModularPolynomial derivative(const Symbol &s, int k) const
Return k-th derivative.
Definition: sdmpolynomial.h:508
void differentiate(const Symbol &s)
Convert current object to its derivative.
Definition: sdmpolynomial.h:498
An abstract class defining the interface of a multivariate polynomial over an arbitrary BPASRing...
Definition: polynomial.h:117
SmallPrimeFieldDistributedDenseMultivariateModularPolynomial & operator=(const SmallPrimeFieldDistributedDenseMultivariateModularPolynomial &b)
Definition: sdmpolynomial.h:159
bool operator==(const SmallPrimeFieldDistributedDenseMultivariateModularPolynomial &b) const
void differentiate(const Symbol &s, int k)
Convert current object to its k-th derivative.
Definition: sdmpolynomial.h:491
A simple data structure for encapsulating a collection of Factor elements.
Definition: Factors.hpp:95
SmallPrimeFieldDistributedDenseMultivariateModularPolynomial()
Constructor using a default prime.
Definition: sdmpolynomial.h:49
bool isZero() const
Is a zero polynomial.
Definition: sdmpolynomial.h:190
Integer numberOfTerms() const
Get the number of non-zero terms.
Definition: sdmpolynomial.h:313
Definition: sdmpolynomial.h:367
SmallPrimeFieldDistributedDenseMultivariateModularPolynomial evaluate(const std::vector< Symbol > &syms, const std::vector< sfixn > &xs) const
Evaluate f(x)
Definition: sdmpolynomial.h:539
An arbitrary-precision Integer.
Definition: Integer.hpp:22
bool isNegativeOne() const
Is polynomial -1.
Definition: sdmpolynomial.h:236
std::vector< Symbol > ringVariables() const
Get variable names.
Definition: sdmpolynomial.h:457
bool operator!=(const SmallPrimeFieldDistributedDenseMultivariateModularPolynomial &b) const
Definition: sdmpolynomial.h:556
SmallPrimeFieldDistributedDenseMultivariateModularPolynomial(sfixn m)
Constructor with the field.
Definition: sdmpolynomial.h:66
An encapsulation of a mathematical symbol.
Definition: Symbol.hpp:23
void negativeOne()
Set polynomial to -1.
Definition: sdmpolynomial.h:249
SmallPrimeFieldDistributedDenseMultivariateModularPolynomial & operator^=(long long int e)
Definition: sdmpolynomial.h:704
virtual mpz_class characteristic()
The characteristic of this ring class.
Definition: BPASRing.hpp:87
Integer degree() const
Total degree.
Definition: sdmpolynomial.h:332
int numberOfVariables() const
Get the number of variables.
Definition: sdmpolynomial.h:297
int isConstant() const
Is a constant.
Definition: sdmpolynomial.h:260
void setCoefficient(int k, const sfixn &val)
Set a coefficient.
Definition: sdmpolynomial.h:444
SmallPrimeFieldDistributedDenseMultivariateModularPolynomial operator/(const SmallPrimeFieldDistributedDenseMultivariateModularPolynomial &p) const
Exact division.
Definition: sdmpolynomial.h:736
SmallPrimeFieldDistributedDenseMultivariateModularPolynomial & operator/=(const SmallPrimeFieldDistributedDenseMultivariateModularPolynomial &p)
Exact division assignment.
Definition: sdmpolynomial.h:742
int size() const
Get the size of the polynomial.
Definition: sdmpolynomial.h:325
Integer degree(const Symbol &x) const
Get a partial degree of variable x.
Definition: sdmpolynomial.h:343
SmallPrimeFieldDistributedDenseMultivariateModularPolynomial operator^(long long int e) const