From 2a0e6ee4fb14fc8b98ccc8d91216a8f1f45b390d Mon Sep 17 00:00:00 2001 From: kalmar Date: Tue, 17 Jan 2017 17:54:56 +0100 Subject: [PATCH] Parametrising Automorphisms --- FreeGroups.jl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/FreeGroups.jl b/FreeGroups.jl index 8561b28..d62c6cf 100644 --- a/FreeGroups.jl +++ b/FreeGroups.jl @@ -167,12 +167,14 @@ end (^)(x::GWord, n::Integer) = power_by_squaring(x,n) -type FGAutomorphism - domain::Vector{GSymbol} - image::Vector{GWord} + + +type FGAutomorphism{T<:GSymbol} + domain::Vector{T} + image::Vector{GWord{T}} map::Function - function FGAutomorphism(domain::Vector{FGSymbol}, image::Vector{GWord}, map::Function) + function FGAutomorphism{T}(domain::Vector{T}, image::Vector{GWord{T}}, map::Function) length(domain) == length(unique(domain)) || throw(ArgumentError("The elements of $domain are not unique")) length(domain) == length(image) ||