You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am not sure whether there is a standard definition of degree for monomial containing non-commutative variables, but I think the following behavior is counter-intuitive:
julia>using DynamicPolynomials
julia>@ncpolyvar x y z
(x, y, z)
julia>degree(x*y*x, x)
1
Maybe the degree function can be modified as something like
functiondegree(m::AbstractMonomial, v::AbstractVariable)
indices =findall(isequal(v), variables(m))
ifisempty(indices)
return0elsereturnsum(exponents(m)[indices])
endend
Any comments?
The text was updated successfully, but these errors were encountered:
I am not sure whether there is a standard definition of degree for monomial containing non-commutative variables, but I think the following behavior is counter-intuitive:
Maybe the
degree
function can be modified as something likeAny comments?
The text was updated successfully, but these errors were encountered: