From 0286ca7c4daad371dc4f2f645af12effaef1dd94 Mon Sep 17 00:00:00 2001 From: kalmarek Date: Fri, 21 Sep 2018 18:09:13 +0200 Subject: [PATCH] replace converts by constructors --- src/AutGroup.jl | 4 +--- src/Groups.jl | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/AutGroup.jl b/src/AutGroup.jl index 13c08d6..a9d206a 100644 --- a/src/AutGroup.jl +++ b/src/AutGroup.jl @@ -182,9 +182,7 @@ SAut(G::Group) = AutGroup(G, special=true) # ############################################################################### -function convert(::Type{Automorphism{N}}, s::AutSymbol) where N - return Automorphism{N}(AutSymbol[s]) -end +Automorphism{N}(s::AutSymbol) where N = Automorphism{N}(AutSymbol[s]) function (G::AutGroup{N})() where N id = Automorphism{N}(id_autsymbol()) diff --git a/src/Groups.jl b/src/Groups.jl index c70c781..18bc4cb 100644 --- a/src/Groups.jl +++ b/src/Groups.jl @@ -88,6 +88,8 @@ parent(w::GWord{T}) where {T<:GSymbol} = w.parent ############################################################################### GroupWord(s::T) where {T<:GSymbol} = GroupWord{T}(T[s]) +GroupWord{T}(s::T) where {T<:GSymbol} = GroupWord{T}(T[s]) +GroupWord(w::GroupWord{T}) where {T<:GSymbol} = w convert(::Type{GroupWord{T}}, s::T) where {T<:GSymbol} = GroupWord{T}(T[s]) ###############################################################################