1 #ifndef __PARTICULAR_ORDERINGS_HPP_ 2 #define __PARTICULAR_ORDERINGS_HPP_ 23 #include "system_constants.hpp" 25 #include "monomial.hpp" 109 DEG_TYPE operator [] (NVAR_TYPE i)
const;
110 virtual DEG_TYPE
grading(NVAR_TYPE i)
const {
return gradings[i]; }
118 void assign_gradings(
const Monomial &);
124 const NVAR_TYPE number_of_gradings;
173 DEG_TYPE partial_degree(
const Monomial & t, NVAR_TYPE i)
const;
192 DEG_TYPE compute_ith_weight(
const Monomial & t, NVAR_TYPE i)
const;
224 WGrevlex(NVAR_TYPE, WT_TYPE *,
bool=
true);
256 DEG_TYPE partial_degree(
const Monomial & t, NVAR_TYPE i)
const;
275 DEG_TYPE compute_ith_weight(
const Monomial & t, NVAR_TYPE i)
const;
282 friend ostream & operator<<(ostream & os,
const WGrevlex &word) {
285 for (
unsigned i = 0; i < word.
n; ++i) {
298 bool thorough_weighting;
398 DEG_TYPE operator [] (NVAR_TYPE i)
const;
399 inline virtual DEG_TYPE
grading(NVAR_TYPE i)
const {
return gradings[i]; }
408 void assign_gradings(
const Monomial &t);
413 void *
operator new(size_t);
415 void operator delete(
void *);
421 const NVAR_TYPE number_of_gradings;
454 NVAR_TYPE number_of_variables, WT_TYPE * w,
bool thorough=
true 460 const WT_TYPE * order_weights()
const;
489 DEG_TYPE partial_degree(
const Monomial & t, NVAR_TYPE i)
const;
495 DEG_TYPE compute_ith_weight(
const Monomial & t, NVAR_TYPE i)
const;
505 for (
unsigned i = 0; i < word.
n; ++i) {
516 const WT_TYPE * weights;
518 const bool fully_apply;
529 virtual const char * what()
const throw();
virtual DEG_TYPE grading(NVAR_TYPE i) const
default value is useless; orderings that supply gradings should redefine
data for the grevlex monomial ordering
virtual const WT_TYPE * order_weights() const
this weighted ordering’s weights
virtual int cmp(const Monomial &t, const Monomial &u) const
orderings defined by a nonsingular matrix
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 ...
virtual bool first_larger(const Monomial &, const Monomial &) const override
returns true iff the first Monomial is larger than the second
exceptions for Matrix_Ordering
virtual int cmp(const Monomial &t, const Monomial &u) const
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
virtual DEG_TYPE grading(NVAR_TYPE i) const
default value is useless; orderings that supply gradings should redefine
virtual int cmp(const Monomial &t, const Monomial &u) const
const WT_TYPE * weights
the weights that define this ordering
Implementation of monomials.
const NVAR_TYPE n
the number of variables, which should remain constant
interface to a monomial ordering
WT_TYPE * weights
the weights for this ordering
virtual void set_data(Monomial &t) const override
sets monomial ordering’s data; default is to do nothing
generic grevlex ordering, works with any number of variables
interface to a weighted monomial ordering
the lex ordering for a specified number of variables
the grevlex ordering for a specified number of variables
virtual int cmp(const Monomial &t, const Monomial &u) const
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
virtual int cmp(const Monomial &t, const Monomial &u) const override
virtual int cmp(const Monomial &t, const Monomial &u) const