compute parent of element as needed ==> avoid calling parent(g)

This commit is contained in:
kalmar 2017-07-21 13:21:38 +02:00
parent 7f1b6f61d0
commit 7f67a68176
1 changed files with 2 additions and 1 deletions

View File

@ -35,7 +35,8 @@ elem_type{T<:Group}(G::DirectProductGroup{T}) =
parent_type{T<:GroupElem}(::Type{DirectProductGroupElem{T}}) =
DirectProductGroup{parent_type(T)}
parent(g::DirectProductGroupElem) = DirectProductGroup([parent(h) for h in g.elts])
parent(g::DirectProductGroupElem) =
DirectProductGroup(parent(first(g.elts)), length(g.elts))
###############################################################################
#