mirror of
https://github.com/kalmarek/GroupRings.jl.git
synced 2024-09-06 23:06:44 +02:00
Merge branch 'enh/mul_addeq' of https://git.wmi.amu.edu.pl/kalmar/GroupRings.jl into enh/mul_addeq
This commit is contained in:
commit
b3024a36c6
@ -128,11 +128,7 @@ function (RG::GroupRing)(T::Type=Int)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function (RG::GroupRing)(g::GroupElem, T::Type=Int)
|
function (RG::GroupRing)(g::GroupElem, T::Type=Int)
|
||||||
g = try
|
g = RG.group(g)
|
||||||
RG.group(g)
|
|
||||||
catch
|
|
||||||
throw("Can't coerce $g to the underlying group of $RG")
|
|
||||||
end
|
|
||||||
result = RG(T)
|
result = RG(T)
|
||||||
result[g] = one(T)
|
result[g] = one(T)
|
||||||
return result
|
return result
|
||||||
@ -171,7 +167,7 @@ function deepcopy_internal(X::GroupRingElem, dict::ObjectIdDict)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function hash(X::GroupRingElem, h::UInt)
|
function hash(X::GroupRingElem, h::UInt)
|
||||||
return hash(X.coeffs, hash(parent(X), h))
|
return hash(full(X.coeffs), hash(parent(X), hash(GroupRingElem, h)))
|
||||||
end
|
end
|
||||||
|
|
||||||
function getindex(X::GroupRingElem, n::Int)
|
function getindex(X::GroupRingElem, n::Int)
|
||||||
|
Loading…
Reference in New Issue
Block a user