mirror of
https://github.com/kalmarek/Groups.jl.git
synced 2024-12-04 10:06:27 +01:00
fine tuned elem_type, parent_type
This commit is contained in:
parent
d02c5afc65
commit
7f1b6f61d0
@ -29,9 +29,11 @@ end
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
elem_type{T<:Group}(G::DirectProductGroup{T}) = DirectProductGroupElem{elem_type(first(G.factors))}
|
||||
elem_type{T<:Group}(G::DirectProductGroup{T}) =
|
||||
DirectProductGroupElem{elem_type(G.group)}
|
||||
|
||||
parent_type(::Type{DirectProductGroupElem}) = DirectProductGroup
|
||||
parent_type{T<:GroupElem}(::Type{DirectProductGroupElem{T}}) =
|
||||
DirectProductGroup{parent_type(T)}
|
||||
|
||||
parent(g::DirectProductGroupElem) = DirectProductGroup([parent(h) for h in g.elts])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user