mirror of
https://github.com/kalmarek/Groups.jl.git
synced 2024-12-11 06:56:28 +01:00
fix setindex!
This commit is contained in:
parent
aad2907c51
commit
251fdd4afa
@ -48,8 +48,9 @@ Base.size(g::DirectProductGroupElem) = size(g.elts)
|
||||
Base.linearindexing(::Type{DirectProductGroupElem}) = Base.LinearFast()
|
||||
Base.getindex(g::DirectProductGroupElem, i::Int) = g.elts[i]
|
||||
function Base.setindex!{T<:GroupElem}(g::DirectProductGroupElem{T}, v::T, i::Int)
|
||||
p.part[i] = v
|
||||
return p
|
||||
parent(v) == parent(first(g.elts)) || throw("$g is not an element of $i-th factor of $(parent(G))")
|
||||
g.elts[i] = v
|
||||
return g
|
||||
end
|
||||
|
||||
###############################################################################
|
||||
|
Loading…
Reference in New Issue
Block a user