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

Type-parametrised star(::GroupRingElem)

This commit is contained in:
kalmar 2017-05-17 14:37:22 +02:00
parent 50e54fbe3b
commit 0dd23532ac

View File

@ -296,12 +296,12 @@ end
#
###############################################################################
function star(X::GroupRingElem)
function star{T}(X::GroupRingElem{T})
RG = parent(X)
isdefined(RG, :basis) || complete(RG)
result = RG()
result = RG(T)
for (i,c) in enumerate(X.coeffs)
if c != zero(eltype(X.coeffs))
if c != zero(T)
g = inv(RG.basis[i])
result[g] = c
end