1
0
mirror of https://github.com/kalmarek/GroupRings.jl.git synced 2024-11-19 14:35:27 +01:00

fix one(GroupRing{<:MatSpace})

This commit is contained in:
kalmarek 2019-02-21 15:03:32 +01:00
parent b8779b44cc
commit 76e933313c
No known key found for this signature in database
GPG Key ID: 8BF1A3855328FC15

View File

@ -113,7 +113,7 @@ end
zero(RG::GroupRing, T::Type=Int) = RG(T) zero(RG::GroupRing, T::Type=Int) = RG(T)
one(RG::GroupRing, T::Type=Int) = RG(RG.group(), T) one(RG::GroupRing, T::Type=Int) = RG(RG.group(), T)
one(RG::GroupRing{R}, T::Type=Int) where {R<:Ring} = RG(one(RG.group()), T) one(RG::GroupRing{<:MatSpace}, T::Type=Int) = RG(one(RG.group), T)
function (RG::GroupRing)(T::Type=Int) function (RG::GroupRing)(T::Type=Int)
isdefined(RG, :basis) || throw("Can not coerce without basis of GroupRing") isdefined(RG, :basis) || throw("Can not coerce without basis of GroupRing")
@ -126,9 +126,9 @@ function (RG::GroupRing)(i::Int, T::Type=Int)
return elt return elt
end end
function (RG::GroupRing{R})(i::Int, T::Type=Int) where {R<:Ring} function (RG::GroupRing{<:MatSpace})(i::Int, T::Type=Int)
elt = RG(T) elt = RG(T)
elt[one(RG.group())] = i elt[one(RG.group)] = i
return elt return elt
end end