compute parent of element as needed ==> avoid calling parent(g)
This commit is contained in:
parent
7f1b6f61d0
commit
7f67a68176
|
@ -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))
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue