mirror of
https://github.com/kalmarek/GroupRings.jl.git
synced 2024-12-29 11:00:28 +01:00
faster (RG::GroupRing)(i::Int)
This commit is contained in:
parent
b3024a36c6
commit
1a77e8a2bc
@ -120,7 +120,11 @@ end
|
||||
zero(RG::GroupRing, T::Type=Int) = RG(T)
|
||||
one(RG::GroupRing, T::Type=Int) = RG(RG.group(), T)
|
||||
|
||||
(RG::GroupRing)(i::Int, T::Type=Int) = i*one(RG, T)
|
||||
function (RG::GroupRing)(i::Int, T::Type=Int)
|
||||
elt = RG(T)
|
||||
elt[RG.group()] = i
|
||||
return elt
|
||||
end
|
||||
|
||||
function (RG::GroupRing)(T::Type=Int)
|
||||
isdefined(RG, :basis) || throw("Complete the definition of GroupRing first")
|
||||
|
Loading…
Reference in New Issue
Block a user