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

Don't multiply if not necessary -> directly create element

This commit is contained in:
kalmar 2017-07-21 16:04:11 +02:00
parent d668574805
commit 6f08259466

View File

@ -201,7 +201,7 @@ matrix_repr(g::WreathProductElem) = Any[matrix_repr(g.p) g.n]
function elements(G::WreathProduct) function elements(G::WreathProduct)
iter = Base.product(collect(elements(G.N)), collect(elements(G.P))) iter = Base.product(collect(elements(G.N)), collect(elements(G.P)))
return (G(n)*G(p) for (n,p) in iter) return (WreathProductElem(n, p, false) for (n,p) in iter)
end end
order(G::WreathProduct) = order(G.P)*order(G.N) order(G::WreathProduct) = order(G.P)*order(G.N)