mirror of
https://github.com/kalmarek/GroupRings.jl.git
synced 2024-10-11 15:00:36 +02:00
new version of *, with optional check::Bool=true
This commit is contained in:
parent
f586cb5146
commit
f2ad7c8045
@ -371,10 +371,15 @@ function mul!{T<:Number}(result::GroupRingElem{T}, X::GroupRingElem, Y::GroupRin
|
|||||||
return result
|
return result
|
||||||
end
|
end
|
||||||
|
|
||||||
function mul{T<:Number}(X::AbstractVector{T}, Y::AbstractVector{T},
|
function *{T<:Number, S<:Number}(X::GroupRingElem{T}, Y::GroupRingElem{S}, check::Bool=true)
|
||||||
pm::Array{Int,2})
|
if true
|
||||||
result = zeros(X)
|
parent(X) == parent(Y) || throw("Elements don't seem to belong to the same Group Ring!")
|
||||||
mul!(result, X, Y, pm)
|
end
|
||||||
|
|
||||||
|
TT = typeof(first(X.coeffs)*first(Y.coeffs))
|
||||||
|
warn("Multiplying elements with different base rings! Promoting the result to $TT.")
|
||||||
|
|
||||||
|
result = mul!(result, X, Y)
|
||||||
return result
|
return result
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user