1
0
mirror of https://github.com/kalmarek/GroupRings.jl.git synced 2024-07-07 08:30:33 +02:00

coercion to GroupRing via specified function on underlying groups

This commit is contained in:
kalmar 2017-06-05 21:37:11 +02:00
parent 7ba59d6508
commit b2231c44e6

View File

@ -136,6 +136,14 @@ function (RG::GroupRing)(X::GroupRingElem)
return RG(X.coeffs)
end
function (RG::GroupRing)(X::GroupRingElem, emb::Function)
result = RG(eltype(X.coeffs))
for g in parent(X).basis
result[emb(g)] = X[g]
end
return result
end
###############################################################################
#
# Basic manipulation