AngouriMath

Navigation

MultivariatePolynomial


← Back to list of classes

Description

Summary

A polynomial in several variables over the rationals, stored sparsely.

Remarks

The coefficient domain is deliberately only Q. A polynomial whose
coefficients are arbitrary expressions is not one this can reason about: deciding
whether sqrt(2) - a is zero is as hard as the problem that sent us here, and
a divisor wrongly believed nonzero produces a wrong cancellation rather than a
missing one. Anything outside Q is refused at the door by
TryParse(AngouriMath.Entity,System.Collections.Generic.IReadOnlyDictionary{AngouriMath.Entity.Variable,System.Int32}).
An exponent vector is packed into one UInt64, a byte to a variable,
the first variable in the most significant byte. Comparing packed monomials is then
exactly the lexicographic order on exponents that DivideExact(AngouriMath.Functions.MultivariatePolynomial) needs,
and looking a monomial up costs one hash.
This and its neighbours in Functions/Algebra/Polynomials are kernel algebra:
the solvers, the evaluator and the simplifier all depend on them, and they depend on
none of those. That direction is the point of the folder. PolynomialGcd in particular is reached from simplification, from Core/Transformations and
from evaluation, which is why it lived under Functions/Simplification for as
long as simplification was the only caller anybody had counted.
Partial so that the operations only a Gröbner basis needs — monomial divisibility, an
order other than lexicographic, reduction against a set — live beside the solver that
wants them, in Functions/Algebra/Groebner, rather than here where every other
caller would have to read past them. See MultivariatePolynomial.Groebner.cs.

Members

























Angouri © 2019-2023 · Project's repo · Site's repo · Octicons · Transparency · 1953 pages online