We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 30790bc commit 6cb17adCopy full SHA for 6cb17ad
src/Utilities/functions.jl
@@ -1542,6 +1542,16 @@ end
1542
function Base.:*(f::Union{MOI.SingleVariable, MOI.VectorOfVariables}, g::Number)
1543
return operate(*, typeof(g), f, g)
1544
end
1545
+# Used by sparse matrix multiplication after
1546
+# https://github.com/JuliaLang/julia/pull/33205
1547
+function Base.:*(f::TypedLike, g::Bool)
1548
+ if g
1549
+ return MA.copy_if_mutable(f)
1550
+ else
1551
+ return zero(typeof(f))
1552
+ end
1553
+end
1554
+Base.:*(f::Bool, g::TypedLike) = g * f
1555
1556
function Base.:^(func::MOI.ScalarAffineFunction{T}, p::Integer) where T
1557
if iszero(p)
0 commit comments