Gröbner basis project
Codebase for research into Gröbner basis computation
|
the grevlex ordering for a specified number of variables More...
#include <particular_orderings.hpp>
Public Member Functions | |
Construction | |
WGrevlex (NVAR_TYPE, WT_TYPE *, bool=true) | |
Creates a grevlex ordering specific to the specified number of variables, with the given weights. The final parameter indicates whether to apply the weights when breaking ties. | |
Basic properties | |
virtual const WT_TYPE * | order_weights () |
this weighted ordering’s weights | |
Comparison | |
virtual bool | first_larger (const Monomial &t, const Monomial &u) const |
returns true iff \(t>u\) by weighted sums of successively fewer exponents | |
virtual bool | first_smaller (const Monomial &t, const Monomial &u) const |
returns true iff \(t< u\) by weighted sums of successively fewer exponents | |
virtual bool | first_larger_than_multiple (const Monomial &t, const Monomial &u, const Monomial &v) const |
returns true iff \(t>uv\) by weighted sums of successively fewer exponents | |
DEG_TYPE | partial_degree (const Monomial &t, NVAR_TYPE i) const |
compares the weighted sum of the first i exponents More... | |
virtual int | cmp (const Monomial &t, const Monomial &u) const |
{@ More... | |
Utility | |
DEG_TYPE | compute_ith_weight (const Monomial &t, NVAR_TYPE i) const |
computes the weighted sum of the first i exponents | |
virtual void | set_data (Monomial &t) |
sets the Monomial’s monomial_ordering_data | |
Basic properties | |
![]() | |
virtual | ~Monomial_Ordering () |
needs virtual destructor for polymorphic delete | |
bool | first_larger_or_equal (const Monomial &, const Monomial &) const |
returns true iff the first Monomial is larger or equal to the second More... | |
bool | first_smaller_or_equal (const Monomial &, const Monomial &) const |
returns true iff the first Monomial is smaller or equal to the second More... | |
bool | first_larger_or_equal_than_multiple (const Monomial &, const Monomial &, const Monomial &) const |
returns true iff the first Monomial is larger or equal to the specified multiple of the second More... | |
bool | first_smaller_than_multiple (const Monomial &, const Monomial &, const Monomial &) const |
returns true iff the first Monomial is smaller than the specified multiple of the second More... | |
bool | first_smaller_or_equal_than_multiple (const Monomial &, const Monomial &, const Monomial &) const |
returns true iff the first Monomial is smaller or equal to the specified multiple of the second More... | |
Protected Attributes | |
const NVAR_TYPE | n |
the number of variables, which should remain constant | |
bool | thorough_weighting |
whether to apply the weights to all the variables | |
WT_TYPE * | weights |
the weights for this ordering | |
Friends | |
I/O | |
ostream & | operator<< (ostream &os, const WGrevlex &word) |
the grevlex ordering for a specified number of variables
The grevlex ordering first compares the sums of the exponents, then the sums of all but the last exponent, then the sums of all but the last two exponents, and so forth, until either the sums differ or it runs out of variables.
Definition at line 180 of file particular_orderings.hpp.
{@
returns 0 if the Monomials are like; negative if smaller, positive if larger – for efficiency, you probably want to redefine this
Implements Monomial_Ordering.
Definition at line 220 of file particular_orderings.hpp.
DEG_TYPE WGrevlex::partial_degree | ( | const Monomial & | t, |
NVAR_TYPE | i | ||
) | const |
compares the weighted sum of the first i exponents
t
has the correct ordering!