1
0
mirror of https://github.com/kalmarek/Groups.jl.git synced 2024-09-13 08:25:39 +02:00

update \times outer constructor

This commit is contained in:
kalmar 2017-07-21 13:23:16 +02:00
parent 6820274f65
commit ae97c20e62

View File

@ -58,7 +58,10 @@ end
# #
############################################################################### ###############################################################################
×(G::Group, H::Group) = DirectProductGroup([G,H]) function ×(G::Group, H::Group)
G == H || throw("Direct products are defined only for the same groups")
return DirectProductGroup(G,2)
end
############################################################################### ###############################################################################
# #
@ -66,8 +69,6 @@ end
# #
############################################################################### ###############################################################################
(G::DirectProductGroup)() = G([H() for H in G.factors])
(G::DirectProductGroup)(g::DirectProductGroupElem) = G(g.elts) (G::DirectProductGroup)(g::DirectProductGroupElem) = G(g.elts)
doc""" doc"""