1
0
mirror of https://github.com/kalmarek/Groups.jl.git synced 2024-12-04 18:11:26 +01:00

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

View File

@ -35,7 +35,8 @@ elem_type{T<:Group}(G::DirectProductGroup{T}) =
parent_type{T<:GroupElem}(::Type{DirectProductGroupElem{T}}) = parent_type{T<:GroupElem}(::Type{DirectProductGroupElem{T}}) =
DirectProductGroup{parent_type(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))
############################################################################### ###############################################################################
# #