1 #ifndef __PARTICULAR_ORDERINGS_HPP_ 2 #define __PARTICULAR_ORDERINGS_HPP_ 23 #include "system_constants.hpp" 25 #include "monomial.hpp" 67 if (a > b) result = 1;
68 else if (a < b) result = -1;
120 DEG_TYPE operator [] (NVAR_TYPE i)
const;
121 virtual DEG_TYPE
grading(NVAR_TYPE i)
const override {
return gradings[i]; }
129 void assign_gradings(
const Monomial &);
184 DEG_TYPE partial_degree(
const Monomial & t, NVAR_TYPE i)
const;
203 DEG_TYPE compute_ith_weight(
const Monomial & t, NVAR_TYPE i)
const;
235 WGrevlex(NVAR_TYPE, WT_TYPE *,
bool=
true);
267 DEG_TYPE partial_degree(
const Monomial & t, NVAR_TYPE i)
const;
277 if (a > b) result = 1;
278 else if (a < b) result = -1;
290 DEG_TYPE compute_ith_weight(
const Monomial & t, NVAR_TYPE i)
const;
297 friend ostream & operator<<(ostream & os,
const WGrevlex &word) {
300 for (
unsigned i = 0; i < word.
n; ++i) {
413 DEG_TYPE operator [] (NVAR_TYPE i)
const;
414 inline virtual DEG_TYPE
grading(NVAR_TYPE i)
const override {
return gradings[i]; }
428 void *
operator new(size_t);
430 void operator delete(
void *);
469 NVAR_TYPE number_of_variables, WT_TYPE * w,
bool thorough=
true 475 virtual const WT_TYPE * order_weights()
const override;
512 DEG_TYPE compute_ith_weight(
const Monomial & t, NVAR_TYPE i)
const;
522 for (
unsigned i = 0; i < word.
n; ++i) {
546 virtual const char * what()
const throw()
override;
data for the grevlex monomial ordering
const NVAR_TYPE n
the number of variables, which should remain constant
virtual int cmp(const Monomial &t, const Monomial &u) const override
const NVAR_TYPE number_of_gradings
length of gradings
virtual DEG_TYPE grading(NVAR_TYPE i) const override
default value is useless; orderings that supply gradings should redefine
virtual int cmp(const Monomial &t, const Monomial &u) const override
orderings defined by a nonsingular matrix
WT_TYPE * weights
the weights for this ordering
DEG_TYPE ordering_degree() const
returns the ordering degree for this Monomial
the grevlex ordering for a specified number of variables
virtual bool first_larger_than_multiple(const Monomial &, const Monomial &, const Monomial &) const override
returns true iff the first Monomial is larger than the product of the second and the third ...
const WT_TYPE ** W
the matrix that defines this ordering
virtual bool first_larger(const Monomial &, const Monomial &) const override
returns true iff the first Monomial is larger than the second
virtual int cmp(const Monomial &t, const Monomial &u) const override
exceptions for Matrix_Ordering
virtual bool first_smaller(const Monomial &, const Monomial &) const override
returns true iff the first Monomial is smaller than the second
data for a monomial ordering: optional, but stored in Monomial
DEG_TYPE partial_degree(const Monomial &t, NVAR_TYPE i) const
const NVAR_TYPE n
the number of columns
const NVAR_TYPE m
the number of rows
const WT_TYPE * weights
the weights that define this ordering
virtual const WT_TYPE * order_weights() const override
this weighted ordering’s weights
virtual DEG_TYPE grading(NVAR_TYPE i) const override
default value is useless; orderings that supply gradings should redefine
Implementation of monomials.
const NVAR_TYPE n
the number of variables, which should remain constant
interface to a monomial ordering
virtual void set_data(Monomial &t) const override
sets monomial ordering’s data; default is to do nothing
DEG_TYPE * gradings
list of partial sums of exponents
const NVAR_TYPE n
the number of variables, which should remain constant
generic grevlex ordering, works with any number of variables
Monomial_Order_Data * monomial_ordering_data() const
the Monomial_Order_Data associated with this Monomial
interface to a weighted monomial ordering
the lex ordering for a specified number of variables
virtual int cmp(const Monomial &t, const Monomial &u) const override
the grevlex ordering for a specified number of variables
data for the weighted grevlex monomial ordering
the weighted grevlex ordering for a specified number of variables, with cached weights for each monom...
const NVAR_TYPE n
the number of variables, which should remain constant
const bool fully_apply
whether to apply the weights to more than the first sum
const NVAR_TYPE number_of_gradings
length of gradings
virtual DEG_TYPE grading(NVAR_TYPE) const
default value is useless; orderings that supply gradings should redefine
DEG_TYPE * gradings
array of partial weighted sums of exponents
virtual int cmp(const Monomial &t, const Monomial &u) const override
bool thorough_weighting
whether to apply the weights to all the variables