allow for pm to be slowly filled when computing products

This commit is contained in:
kalmar 2017-07-19 22:54:18 +02:00
parent acb05e7a85
commit 9d5790d6d3
1 changed files with 4 additions and 0 deletions

View File

@ -351,6 +351,10 @@ function mul!{T}(result::GroupRingElem{T}, X::GroupRingElem, Y::GroupRingElem)
if Y.coeffs[j] != z
for i in eachindex(X.coeffs)
if X.coeffs[i] != z
if parent(X).pm[i,j] == 0
g = parent(X).basis[i]*parent(Y).basis[j]
parent(X).pm[i,j] = parent(X).basis_dict[g]
end
result.coeffs[parent(X).pm[i,j]] += X[i]*Y[j]
end
end