Monomials and orderings

1.Monomials

Monomials are essentially wrappers of vectors of integer types. The class monomial<M,V> is defined in monomial.hpp. The first template argument M refers to the class of vectors and V to a type of storage of the ordering on the monomials. The default value of M is vector<nat>. The default value of V corresponds to a global storage initialized with the lexicographic ordering.

#include <multimix/monomial.hpp>
…
monomial<> x (vec<nat> (1, 2)); // defines the monomial x * y^2

In the special context of “lacunary polynomials”, vector<integer> can be used for M.

2.Orderings

Several monomial orderings are defined in monomial_ordering.hpp. They are of type monomial_ordering<M>. The function lex_ordering<M> () returns the lexicographical ordering. Other classical orderings are obtained via reverse_lex_ordering<M> (), graded_lex_ordering<M> (), and graded_reverse_lex_ordering<M> ().

The static member monomial<M>::get_ordering () returns the current ordering, while monomial<M>::set_ordering (const monomial_ordering<M>&) allows to change it.

The function leq, meaning “less or equal”, compares two monomials with respect to the order given in its first argument. Other standard operators <, >, <=, >= refer to the current ordering. The sort function can sort a vector of monomials according to the order given in its first argument.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License. If you don't have this file, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.