1
0
mirror of https://github.com/kalmarek/Groups.jl.git synced 2024-12-25 02:05:30 +01:00

DirectProductGroup overloads: with vector and GroupElem

This commit is contained in:
kalmar 2017-07-21 13:27:00 +02:00
parent ba4400efbb
commit 10022fd31c

View File

@ -69,8 +69,6 @@ end
#
###############################################################################
(G::DirectProductGroup)(g::DirectProductGroupElem) = G(g.elts)
doc"""
(G::DirectProductGroup)(a::Vector, check::Bool=true)
> Constructs element of the $n$-fold direct product group `G` by coercing each
@ -85,6 +83,10 @@ function (G::DirectProductGroup)(a::Vector, check::Bool=true)
return DirectProductGroupElem(a)
end
(G::DirectProductGroup)() = DirectProductGroupElem([G.group() for _ in 1:G.n])
(G::DirectProductGroup)(g::DirectProductGroupElem) = G(g.elts)
###############################################################################
#
# Basic manipulation