mirror of
https://github.com/kalmarek/GroupRings.jl.git
synced 2024-09-05 14:46:44 +02:00
rename groupring_mult[!] -> mul[!]
This commit is contained in:
parent
fe1f552b26
commit
61ed1f7870
@ -296,7 +296,8 @@ end
|
|||||||
(+)(X::GroupRingElem, Y::GroupRingElem) = add(X,Y)
|
(+)(X::GroupRingElem, Y::GroupRingElem) = add(X,Y)
|
||||||
(-)(X::GroupRingElem, Y::GroupRingElem) = add(X,-Y)
|
(-)(X::GroupRingElem, Y::GroupRingElem) = add(X,-Y)
|
||||||
|
|
||||||
function groupring_mult!(X,Y,pm,result)
|
function mul!{T<:Number}(X::AbstractVector{T}, Y::AbstractVector{T},
|
||||||
|
pm::Array{Int,2}, result::AbstractVector{T})
|
||||||
for (j,y) in enumerate(Y)
|
for (j,y) in enumerate(Y)
|
||||||
if y != zero(eltype(Y))
|
if y != zero(eltype(Y))
|
||||||
for (i, index) in enumerate(pm[:,j])
|
for (i, index) in enumerate(pm[:,j])
|
||||||
@ -309,17 +310,17 @@ function groupring_mult!(X,Y,pm,result)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function groupring_mult{T<:Number}(X::AbstractVector{T}, Y::AbstractVector{T},
|
function mul{T<:Number}(X::AbstractVector{T}, Y::AbstractVector{T},
|
||||||
pm::Array{Int,2})
|
pm::Array{Int,2})
|
||||||
result = zeros(X)
|
result = zeros(X)
|
||||||
groupring_mult!(X,Y,pm,result)
|
mul!(X,Y,pm,result)
|
||||||
return result
|
return result
|
||||||
end
|
end
|
||||||
|
|
||||||
function groupring_mult(X::AbstractVector, Y::AbstractVector, pm::Array{Int,2})
|
function mul(X::AbstractVector, Y::AbstractVector, pm::Array{Int,2})
|
||||||
T = promote_type(eltype(X), eltype(Y))
|
T = promote_type(eltype(X), eltype(Y))
|
||||||
result = zeros(T, deepcopy(X))
|
result = zeros(T, deepcopy(X))
|
||||||
groupring_mult!(X, Y, pm, result)
|
mul!(X, Y, pm, result)
|
||||||
return result
|
return result
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -328,7 +329,7 @@ function *{T<:Number}(X::GroupRingElem{T}, Y::GroupRingElem{T})
|
|||||||
"Elements don't seem to belong to the same Group Ring!"))
|
"Elements don't seem to belong to the same Group Ring!"))
|
||||||
RG = parent(X)
|
RG = parent(X)
|
||||||
isdefined(RG, :pm) || complete(RG)
|
isdefined(RG, :pm) || complete(RG)
|
||||||
result = groupring_mult(X.coeffs, Y.coeffs, RG.pm)
|
result = mul(X.coeffs, Y.coeffs, RG.pm)
|
||||||
return GroupRingElem(result, RG)
|
return GroupRingElem(result, RG)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -338,7 +339,7 @@ function *{T<:Number, S<:Number}(X::GroupRingElem{T}, Y::GroupRingElem{S})
|
|||||||
warn("Multiplying elements with different base rings!")
|
warn("Multiplying elements with different base rings!")
|
||||||
RG = parent(X)
|
RG = parent(X)
|
||||||
isdefined(RG, :pm) || complete(RG)
|
isdefined(RG, :pm) || complete(RG)
|
||||||
result = groupring_mult(X.coeffs, Y.coeffs, RG.pm)
|
result = mul(X.coeffs, Y.coeffs, RG.pm)
|
||||||
return GroupRingElem(result, RG)
|
return GroupRingElem(result, RG)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user