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
1 changed files with 1 additions and 1 deletions

View File

@ -201,7 +201,7 @@ matrix_repr(g::WreathProductElem) = Any[matrix_repr(g.p) g.n]
function elements(G::WreathProduct)
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
order(G::WreathProduct) = order(G.P)*order(G.N)