Gröbner basis project
Codebase for research into Gröbner basis computation
|
the weighted grevlex ordering for a specified number of variables, with cached weights for each monomial More...
#include <particular_orderings.hpp>
Public Member Functions | |
Construction | |
CachedWGrevlex_Ordering (NVAR_TYPE number_of_variables, WT_TYPE *w, bool thorough=true) | |
creates a weighted grevlex ordering specific to \(n\) variables, using the weights specified by \(w\) More... | |
Basic properties | |
const WT_TYPE * | order_weights () |
the weights that define this ordering | |
Comparison | |
virtual int | cmp (const Monomial &, const Monomial &) const |
resturns 0 if they are alike; positive if first larger; negative otherwise | |
virtual bool | first_larger (const Monomial &t, const Monomial &u) const |
returns true iff \(t>u\) by sums of successively fewer exponents | |
virtual bool | first_smaller (const Monomial &t, const Monomial &u) const |
returns true iff \(t< u\) by 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>u\) by sums of successively fewer exponents | |
Utility | |
DEG_TYPE | partial_degree (const Monomial &t, NVAR_TYPE i) const |
reports the weighted sum of the first i exponents More... | |
DEG_TYPE | compute_ith_weight (const Monomial &t, NVAR_TYPE i) const |
computes the 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 bool | fully_apply |
whether to apply the weights to more than the first sum | |
const NVAR_TYPE | n |
the number of variables, which should remain constant | |
const WT_TYPE * | weights |
the weights that define this ordering | |
Friends | |
I/O | |
ostream & | operator<< (ostream &os, const CachedWGrevlex_Ordering &word) |
the weighted grevlex ordering for a specified number of variables, with cached weights for each monomial
The weighted grevlex ordering first compares weighted sums of all 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. Whether the weights are applied to more than one sum can be decided at construction.
Definition at line 380 of file particular_orderings.hpp.
CachedWGrevlex_Ordering::CachedWGrevlex_Ordering | ( | NVAR_TYPE | number_of_variables, |
WT_TYPE * | w, | ||
bool | thorough = true |
||
) |
creates a weighted grevlex ordering specific to \(n\) variables, using the weights specified by \(w\)
thorough | determines whether the weights are applied to subsequent orderings; if false , the second, third, etc. sums are ordinary sums of the exponents, rather than weighted sums |
number_of_variables | the number of variables this will compare; weights should have this length! |
w | the weights to multiply to each exponent |
Definition at line 398 of file particular_orderings.cpp.
DEG_TYPE CachedWGrevlex_Ordering::partial_degree | ( | const Monomial & | t, |
NVAR_TYPE | i | ||
) | const |
reports the weighted sum of the first i exponents
t
has the correct ordering! Definition at line 470 of file particular_orderings.cpp.