Where communities thrive

• Join over 1.5M+ people
• Join over 100K+ communities
• Free without limits
Activity
Philip Zucker
@philzook58
Is there an example of how to use alternative monomial orderings than the stock ones in dynamicpolynomials?
Benoît Legat
@blegat
This is not possible with DynamicPolynomials or TypedPolynomials
However, the MultivariatePolynomials interface does not specify any ordering so other implementations could support other orderings
Marcelo Forets
@mforets
out of curiosity, is the functionality in MultivariateBases relevant to the question?
Benoît Legat
@blegat
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?
Benoît Legat
@blegat
George Stepaniants
@sgstepaniants
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