1
0
mirror of https://github.com/kalmarek/Groups.jl.git synced 2024-10-20 16:20:36 +02:00

replace converts by constructors

This commit is contained in:
kalmarek 2018-09-21 18:09:13 +02:00
parent 77efcdff3e
commit 0286ca7c4d
2 changed files with 3 additions and 3 deletions

View File

@ -182,9 +182,7 @@ SAut(G::Group) = AutGroup(G, special=true)
# #
############################################################################### ###############################################################################
function convert(::Type{Automorphism{N}}, s::AutSymbol) where N Automorphism{N}(s::AutSymbol) where N = Automorphism{N}(AutSymbol[s])
return Automorphism{N}(AutSymbol[s])
end
function (G::AutGroup{N})() where N function (G::AutGroup{N})() where N
id = Automorphism{N}(id_autsymbol()) id = Automorphism{N}(id_autsymbol())

View File

@ -88,6 +88,8 @@ parent(w::GWord{T}) where {T<:GSymbol} = w.parent
############################################################################### ###############################################################################
GroupWord(s::T) where {T<:GSymbol} = GroupWord{T}(T[s]) 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]) convert(::Type{GroupWord{T}}, s::T) where {T<:GSymbol} = GroupWord{T}(T[s])
############################################################################### ###############################################################################