mirror of
https://github.com/kalmarek/Groups.jl.git
synced 2025-01-06 04:50: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.linearindexing(::Type{DirectProductGroupElem}) = Base.LinearFast()
|
||||||
Base.getindex(g::DirectProductGroupElem, i::Int) = g.elts[i]
|
Base.getindex(g::DirectProductGroupElem, i::Int) = g.elts[i]
|
||||||
function Base.setindex!{T<:GroupElem}(g::DirectProductGroupElem{T}, v::T, i::Int)
|
function Base.setindex!{T<:GroupElem}(g::DirectProductGroupElem{T}, v::T, i::Int)
|
||||||
p.part[i] = v
|
parent(v) == parent(first(g.elts)) || throw("$g is not an element of $i-th factor of $(parent(G))")
|
||||||
return p
|
g.elts[i] = v
|
||||||
|
return g
|
||||||
end
|
end
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
Loading…
Reference in New Issue
Block a user