mirror of
https://github.com/kalmarek/GroupRings.jl.git
synced 2024-12-29 11:00:28 +01:00
throw if idices of X or Y go beyond size(pm)
This commit is contained in:
parent
de72253e90
commit
c21f9e043b
@ -375,10 +375,14 @@ function mul!{T}(result::GroupRingElem{T}, X::GroupRingElem, Y::GroupRingElem)
|
||||
|
||||
RG = parent(X)
|
||||
|
||||
s = size(RG.pm)
|
||||
|
||||
for j::Int in eachindex(Y.coeffs)
|
||||
if Y.coeffs[j] != z
|
||||
j <= s[2] || throw("Element in Y outside of support of RG.pm")
|
||||
for i::Int in eachindex(X.coeffs)
|
||||
if X.coeffs[i] != z
|
||||
i <= s[1] || throw("Element in X outside of support of RG.pm")
|
||||
if RG.pm[i,j] == 0
|
||||
g::elem_type(parent(X).group) = RG.basis[i]*RG.basis[j]
|
||||
RG.pm[i,j] = RG.basis_dict[g]
|
||||
|
Loading…
Reference in New Issue
Block a user