From 93ba763402872b5236d7aae4cd1219bacf8b3308 Mon Sep 17 00:00:00 2001 From: kalmar Date: Thu, 27 Jul 2017 22:05:39 +0200 Subject: [PATCH] Allow evaluation of Characters on GroupRingElems --- src/Projections.jl | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/Projections.jl b/src/Projections.jl index d1cd5e2..ae47405 100644 --- a/src/Projections.jl +++ b/src/Projections.jl @@ -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