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 eba594b7a4
commit ffee54616a
1 changed files with 1 additions and 2 deletions

View File

@ -189,9 +189,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
Base.size(X::GroupRingElem) = size(X.coeffs)