From 5d51855d1737bae0f2da0b97ea9946c76e1c5e77 Mon Sep 17 00:00:00 2001 From: kalmar Date: Wed, 5 Jul 2017 16:26:14 +0200 Subject: [PATCH] add unified gens(G::FPGroup) function --- src/AutGroup.jl | 2 -- src/FreeGroup.jl | 2 -- src/Groups.jl | 5 +++-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/AutGroup.jl b/src/AutGroup.jl index 7e24604..01f8d8d 100644 --- a/src/AutGroup.jl +++ b/src/AutGroup.jl @@ -211,8 +211,6 @@ end length(s::AutSymbol) = abs(s.pow) -generators(G::AutGroup) = [G(AutGroupElem(elt)) for elt in G.gens] - ############################################################################### # # String I/O diff --git a/src/FreeGroup.jl b/src/FreeGroup.jl index 99f8e43..56f9e83 100644 --- a/src/FreeGroup.jl +++ b/src/FreeGroup.jl @@ -85,8 +85,6 @@ change_pow(s::FreeSymbol, n::Int) = FreeSymbol(s.str, n) length(s::FreeSymbol) = abs(s.pow) -generators(G::FreeGroup) = [G(FreeGroupElem(g)) for g in G.gens] - ############################################################################### # # String I/O diff --git a/src/Groups.jl b/src/Groups.jl index 64d5c3a..53daf9d 100644 --- a/src/Groups.jl +++ b/src/Groups.jl @@ -3,7 +3,7 @@ module Groups using Nemo import Nemo: Group, GroupElem, Ring import Nemo: parent, parent_type, elem_type -import Nemo: elements, order +import Nemo: elements, order, gens import Base: length, ==, hash, show, convert import Base: inv, reduce, *, ^ @@ -135,6 +135,8 @@ doc""" """ reduce(W::GWord) = reduce!(deepcopy(W)) +gens(G::FPGroup) = [G(g) for g in G.gens] + ############################################################################### # # String I/O @@ -390,7 +392,6 @@ function generate_balls{T<:GroupElem}(S::Vector{T}, Id::T; radius=2) return B, sizes end - ############################################################################### # # Includes