mirror of
https://github.com/kalmarek/GroupRings.jl.git
synced 2024-12-29 11:00:28 +01:00
star-involution using setindex!
This commit is contained in:
parent
5913206954
commit
b73aebe33a
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user