Skip to main content

Module sparse

Module sparse 

Source
Expand description

Sparse multivariate polynomial implementation.

A SparseMultivariatePolynomial stores only non-zero terms as a map from exponent vectors to coefficients. The exponent vector vec![e1, e2, ...] represents the monomial x1^e1 * x2^e2 * .... Monomial ordering is controlled by the MonomialOrder type parameter.

Structs§

Grevlex
Graded reverse lexicographic ordering: first by total degree descending, then reverse lexicographic.
Grlex
Graded lexicographic ordering: first by total degree descending, then lexicographic.
Lex
Lexicographic ordering: compare exponents left-to-right.
SparseMultivariatePolynomial
A sparse multivariate polynomial with coefficients in a domain D and monomial ordering O.

Traits§

MonomialOrder
A monomial ordering determines how terms are sorted and compared.

Functions§

monomial_are_coprime
Return true if the two monomials are coprime (no variable appears in both).
monomial_divides
Check whether monomial a divides monomial b: a[i] >= b[i] for all i.
monomial_lcm
Compute the least common multiple of two monomials: element-wise max.