We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fcb1b29 commit 0220868Copy full SHA for 0220868
src/operators.jl
@@ -264,6 +264,13 @@ end
264
Base.isapprox(p::_APL, α; kwargs...) = isapprox(promote(p, α)...; kwargs...)
265
Base.isapprox(α, p::_APL; kwargs...) = isapprox(promote(p, α)...; kwargs...)
266
267
+MA.operate!(::typeof(-), p::AbstractTermLike) = error("not implemented yet")
268
+
269
+function MA.operate!(::typeof(-), p::_APL)
270
+ negate!! = x -> MA.operate!!(-, x)
271
+ map_coefficients!(negate!!, p, nonzero = true)
272
+end
273
274
# `MA.operate(-, p)` redirects to `-p` as it assumes that `-p` can be modified
275
# through the MA API without modifying `p`. We should either copy the monomial
276
# here or implement a `MA.operate(-, p)` that copies it. We choose the first
0 commit comments