star-involution using setindex!

This commit is contained in:
kalmar 2017-05-17 12:34:24 +02:00
parent 5913206954
commit b73aebe33a
1 changed files with 19 additions and 0 deletions

View File

@ -277,6 +277,25 @@ end
(*)(X::GroupRingElem, Y::GroupRingElem) = groupring_mult(X,Y)
###############################################################################
#
# *-involution
#
###############################################################################
function star(X::GroupRingElem)
isdefined(X, :parent) || throw("Define parent object for $X first")
RG = parent(X)
result = RG()
for (i,c) in enumerate(X.coeffs)
if c != zero(eltype(X.coeffs))
g = inv(RG.basis[i])
result[g] = c
end
end
return result
end
###############################################################################
#
# Misc