my Characters return Julia's Ints

This commit is contained in:
kalmar 2017-07-27 22:06:32 +02:00
parent 93ba763402
commit 4bb52bd34b
1 changed files with 3 additions and 2 deletions

View File

@ -47,14 +47,15 @@ end
#
###############################################################################
function central_projection(RG::GroupRing, chi::Function, T::Type=Rational{Int})
function central_projection(RG::GroupRing, chi::AbstractCharacter,
T::Type=Rational{Int})
result = RG(T)
result.coeffs = full(result.coeffs)
dim = chi(RG.group())
ord = Int(order(RG.group))
for g in RG.basis
result[g] = convert(T, (Int(dim)//ord)*Int(chi(g)))
result[g] = convert(T, (dim//ord)*chi(g))
end
return result