Skip to content

Commit

Permalink
Improvements for group algebras (#311)
Browse files Browse the repository at this point in the history
  • Loading branch information
thofma authored Jun 11, 2021
1 parent 76e084c commit 3c7e403
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/AlgAss/Elem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,17 @@ function *(a::AlgGrpElem{T, S}, b::AlgGrpElem{T, S}) where {T, S}
for i in 1:d
v[i] = zero(base_ring(A))
end
t = zero(base_ring(A))
mt = multiplication_table(A, copy = false)
acoeff = coefficients(a, copy = false)
bcoeff = coefficients(b, copy = false)
for i in 1:d
if iszero(acoeff[i])
continue
end
for j in 1:d
v[multiplication_table(A, copy = false)[i, j]] += coefficients(a, copy = false)[i] * coefficients(b, copy = false)[j]
k = mt[i, j]
v[k] = addmul!(v[k], acoeff[i], bcoeff[j], t)
end
end
return A(v)
Expand Down

0 comments on commit 3c7e403

Please sign in to comment.