1
0
mirror of https://github.com/kalmarek/GroupRings.jl.git synced 2024-12-29 11:00:28 +01:00

critical fix: if g was not in basis setindex! failed silently

This commit is contained in:
kalmar 2017-07-11 18:28:30 +02:00
parent 9f6287382d
commit 8a3a4c70d6

View File

@ -180,9 +180,8 @@ function setindex!(X::GroupRingElem, value, g::GroupElem)
typeof(g) == elem_type(RG.group) || throw("$g is not an element of $(RG.group)")
if !(g in keys(RG.basis_dict))
g = (RG.group)(g)
else
X.coeffs[RG.basis_dict[g]] = value
end
X.coeffs[RG.basis_dict[g]] = value
end
eltype(X::GroupRingElem) = eltype(X.coeffs)