Allow evaluation of Characters on GroupRingElems

This commit is contained in:
kalmar 2017-07-27 22:05:39 +02:00
parent 536542c3a6
commit 93ba763402
1 changed files with 16 additions and 0 deletions

View File

@ -25,6 +25,22 @@ function (chi::DirectProdCharacter)(g::DirectProductGroupElem)
return reduce(*, 1, ((-1)^isone(g.elts[j]) for j in 1:chi.i))
end
for T in [PermCharacter, DirectProdCharacter]
@eval begin
function (chi::$T)(X::GroupRingElem)
RG = parent(X)
z = zero(eltype(X))
result = z
for i in 1:length(X.coeffs)
if X.coeffs[i] != z
result += chi(RG.basis[i])*X.coeffs[i]
end
end
return result
end
end
end
###############################################################################
#
# Projections