1
0
mirror of https://github.com/kalmarek/PropertyT.jl.git synced 2024-08-16 09:57:28 +02:00

Allow evaluation of Characters on GroupRingElems

This commit is contained in:
kalmar 2017-07-27 22:05:39 +02:00
parent 536542c3a6
commit 93ba763402

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)) return reduce(*, 1, ((-1)^isone(g.elts[j]) for j in 1:chi.i))
end 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 # Projections