1
0
mirror of https://github.com/kalmarek/Groups.jl.git synced 2024-12-26 02:20: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""" doc"""
(G::DirectProductGroup)(a::Vector, check::Bool=true) (G::DirectProductGroup)(a::Vector, check::Bool=true)
> Constructs element of the $n$-fold direct product group `G` by coercing each > 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) return DirectProductGroupElem(a)
end end
(G::DirectProductGroup)() = DirectProductGroupElem([G.group() for _ in 1:G.n])
(G::DirectProductGroup)(g::DirectProductGroupElem) = G(g.elts)
############################################################################### ###############################################################################
# #
# Basic manipulation # Basic manipulation