The monomials of the monomial basis will be ordered according to the monomial ordering used by the implementation
So if you use DynamicPolynomials, it will be grlex
Marcelo Forets
@mforets
ok
Philip Zucker
@philzook58
Would it make sense to write a wrapper struct Lex around a dynamicpolynomial and define a new method of leadingmonomial, leadingterm for that? Or will that screw up a representation somehow?
Benoît Legat
@blegat
Redirecting all functions might be painful, we could add the comparison function in the type arguments, along with C and T
Mathieu Besançon
@matbesancon
I am creating a multivariate polynomial and evaluating it wrt varying coefficients, always on a given set of points x_i, and computing its gradient wrt the coefficients (not the variables). For now I am creating the polynomial from scratch for every new value of the coefficients, would there be a smarter way to do it? Function and gradient evaluations are fairly expensive like this
Mathieu Besançon
@matbesancon
For instance has it been observed to improve perf to use the coefficient as another multiplicative term on each monomial, and then differentiate wrt coefficient and use evaluation with parameter?
_
Mathieu Besançon
@matbesancon
or would there be an efficient way to do batch substitutions, multiple substitutions with fixed coefficients and terms?
Using MultivariatePolynomials.jl, any time I have an operation that results in a zero polynmial my code crashes. This problem has been very annoying to deal with.
For example, the following simple code will crash: divrem(x, x^2)[1]
Benoît Legat
@blegat
divrem(x, x^2)[1] is trying to take the first term but there is no first term since the polynomial is zero
What do you expect to get ?
George Stepaniants
@sgstepaniants
Ah yes the first term should be 0, but I was expecting it to return zero or error. Instead my entire Julia REPL is crashing, this seems to happen only in VSCode