mirror of
https://github.com/kalmarek/GroupRings.jl.git
synced 2025-01-01 03:40:29 +01:00
deepcopy result if result === X to prevent X from zeroing
This commit is contained in:
parent
5a3e2761a4
commit
b80db52742
@ -331,8 +331,11 @@ function mul!{T}(result::AbstractVector{T}, X::AbstractVector{T}, Y::AbstractVec
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function mul!(result::GroupRingElem, X::GroupRingElem, Y::GroupRingElem)
|
function mul!{T}(result::GroupRingElem{T}, X::GroupRingElem{T}, Y::GroupRingElem{T})
|
||||||
result.coeffs *= 0
|
# @show result === X
|
||||||
|
if result === X
|
||||||
|
result = deepcopy(result)
|
||||||
|
end
|
||||||
mul!(result.coeffs, X.coeffs, Y.coeffs, parent(X).pm)
|
mul!(result.coeffs, X.coeffs, Y.coeffs, parent(X).pm)
|
||||||
return result
|
return result
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user