1
0
mirror of https://github.com/kalmarek/GroupRings.jl.git synced 2024-12-29 11:00:28 +01:00

add scalar in-place mul!

This commit is contained in:
kalmar 2017-08-04 18:25:44 +02:00
parent 50629a762c
commit 7bbfe4408c

View File

@ -271,6 +271,11 @@ end
(-)(X::GroupRingElem) = GroupRingElem(-X.coeffs, parent(X))
function mul!{T<:Number}(a::T, X::GroupRingElem{T})
X.coeffs .*= a
return X
end
mul{T<:Number}(a::T, X::GroupRingElem{T}) = GroupRingElem(a*X.coeffs, parent(X))
function mul{T<:Number, S<:Number}(a::T, X::GroupRingElem{S})