fix setindex!

This commit is contained in:
kalmar 2017-07-23 03:24:05 +02:00
parent aad2907c51
commit 251fdd4afa
1 changed files with 3 additions and 2 deletions

View File

@ -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
###############################################################################