mirror of
https://github.com/kalmarek/GroupRings.jl.git
synced 2025-01-01 03:40:29 +01:00
add eltype(::GroupRingElem)
This commit is contained in:
parent
9048eb656d
commit
486f2cff9a
@ -3,7 +3,7 @@ module GroupRings
|
|||||||
using Nemo
|
using Nemo
|
||||||
import Nemo: Group, GroupElem, Ring, RingElem, parent, elem_type, parent_type
|
import Nemo: Group, GroupElem, Ring, RingElem, parent, elem_type, parent_type
|
||||||
|
|
||||||
import Base: convert, show, hash, ==, +, -, *, //, /, length, norm, rationalize, deepcopy_internal, getindex, setindex!
|
import Base: convert, show, hash, ==, +, -, *, //, /, length, norm, rationalize, deepcopy_internal, getindex, setindex!, eltype
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
#
|
#
|
||||||
@ -160,6 +160,8 @@ function setindex!(X::GroupRingElem, value, g::GroupElem)
|
|||||||
X.coeffs[RG.basis_dict[g]] = value
|
X.coeffs[RG.basis_dict[g]] = value
|
||||||
end
|
end
|
||||||
|
|
||||||
|
eltype(X::GroupRingElem) = eltype(X.coeffs)
|
||||||
|
|
||||||
function generators(RG::GroupRing)
|
function generators(RG::GroupRing)
|
||||||
S = generators(RG.group)
|
S = generators(RG.group)
|
||||||
S = unique([S..., [inv(s) for s in S]...])
|
S = unique([S..., [inv(s) for s in S]...])
|
||||||
|
Loading…
Reference in New Issue
Block a user