From e28c296bce3100e1323e04b15bd05301ae8a3f77 Mon Sep 17 00:00:00 2001 From: kalmarek Date: Fri, 21 Sep 2018 18:10:34 +0200 Subject: [PATCH] PermGroup is iterable in AbstractAlgebra master --- src/AutGroup.jl | 2 +- src/Groups.jl | 2 ++ src/WreathProducts.jl | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/AutGroup.jl b/src/AutGroup.jl index a9d206a..b8d2d41 100644 --- a/src/AutGroup.jl +++ b/src/AutGroup.jl @@ -165,7 +165,7 @@ function AutGroup(G::FreeGroup; special=false) if !special flips = [flip_autsymbol(i) for i in 1:n] - syms = [perm_autsymbol(p) for p in elements(PermutationGroup(n))][2:end] + syms = [perm_autsymbol(p) for p in PermutationGroup(n)][2:end] append!(S, [flips; syms]) diff --git a/src/Groups.jl b/src/Groups.jl index 18bc4cb..3b52cd8 100644 --- a/src/Groups.jl +++ b/src/Groups.jl @@ -11,6 +11,8 @@ import Base: inv, reduce, *, ^, power_by_squaring import Base: findfirst, findnext import Base: deepcopy_internal +export elements + using LinearAlgebra using Markdown diff --git a/src/WreathProducts.jl b/src/WreathProducts.jl index 14647ba..ec985cd 100644 --- a/src/WreathProducts.jl +++ b/src/WreathProducts.jl @@ -202,7 +202,7 @@ matrix_repr(g::WreathProductElem) = Any[matrix_repr(g.p) g.n] function elements(G::WreathProduct) Nelts = collect(elements(G.N)) - Pelts = collect(elements(G.P)) + Pelts = collect(G.P) return (WreathProductElem(n, p, false) for n in Nelts, p in Pelts) end