mirror of
https://github.com/kalmarek/GroupRings.jl.git
synced 2025-01-01 03:40:29 +01:00
add scalar in-place mul!
This commit is contained in:
parent
50629a762c
commit
7bbfe4408c
@ -271,6 +271,11 @@ end
|
|||||||
|
|
||||||
(-)(X::GroupRingElem) = GroupRingElem(-X.coeffs, parent(X))
|
(-)(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))
|
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})
|
function mul{T<:Number, S<:Number}(a::T, X::GroupRingElem{S})
|
||||||
|
Loading…
Reference in New Issue
Block a user