mirror of
https://github.com/kalmarek/Groups.jl.git
synced 2024-11-19 06:30:29 +01:00
add parent; move GWord constructor and GSymbol -> GWord conversion
This commit is contained in:
parent
4718c40bd1
commit
a3db7ab92c
@ -48,10 +48,12 @@ type GWord{T<:GSymbol} <: GroupElem
|
||||
end
|
||||
end
|
||||
|
||||
GWord{T<:GSymbol}(s::T) = GWord{T}([s])
|
||||
convert{T<:GSymbol, W<:Word}(::Type{W}, s::T) = GWord{T}(s)
|
||||
|
||||
|
||||
parent{T<:GSymbol}(w::GWord{T}) = w.parent
|
||||
|
||||
GWord{T<:GSymbol}(s::T) = GWord{T}(T[s])
|
||||
convert{T<:GSymbol}(::Type{GWord{T}}, s::T) = GWord{T}(T[s])
|
||||
|
||||
|
||||
function hash(W::GWord, h::UInt)
|
||||
|
Loading…
Reference in New Issue
Block a user