mirror of
https://github.com/kalmarek/Groups.jl.git
synced 2024-12-26 18:30:29 +01:00
initial @compat changes, works on v0.6 without warnings
This commit is contained in:
parent
02c1022846
commit
df19042de6
@ -25,7 +25,7 @@ doc"""
|
|||||||
> * `pow` which is the (multiplicative) exponent of a symbol.
|
> * `pow` which is the (multiplicative) exponent of a symbol.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
abstract type GSymbol end
|
@compat abstract type GSymbol end
|
||||||
|
|
||||||
doc"""
|
doc"""
|
||||||
W::GWord{T<:GSymbol} <:GroupElem
|
W::GWord{T<:GSymbol} <:GroupElem
|
||||||
@ -44,17 +44,17 @@ doc"""
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
@compat mutable struct GWord{T<:GSymbol} <: GroupElem
|
@compat mutable struct GWord{T<:GSymbol} <: GroupElem
|
||||||
symbols::Vector{T}
|
symbols::Vector{T}
|
||||||
savedhash::UInt
|
savedhash::UInt
|
||||||
modified::Bool
|
modified::Bool
|
||||||
parent::Group
|
parent::Group
|
||||||
|
|
||||||
function GWord(symbols::Vector{T})
|
@compat function GWord{T}(symbols::Vector{T}) where {T<:GSymbol}
|
||||||
return new(symbols, hash(symbols), true)
|
return new(symbols, hash(symbols), true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
abstract AbstractFPGroup <: Group
|
@compat abstract type AbstractFPGroup <: Group end
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
#
|
#
|
||||||
@ -70,7 +70,7 @@ parent{T<:GSymbol}(w::GWord{T}) = w.parent
|
|||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
GWord{T<:GSymbol}(s::T) = GWord{T}(T[s])
|
GWord(s::T) where {T<:GSymbol} = GWord{T}(T[s])
|
||||||
convert{T<:GSymbol}(::Type{GWord{T}}, s::T) = GWord{T}(T[s])
|
convert{T<:GSymbol}(::Type{GWord{T}}, s::T) = GWord{T}(T[s])
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
@ -79,7 +79,6 @@ convert{T<:GSymbol}(::Type{GWord{T}}, s::T) = GWord{T}(T[s])
|
|||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
|
||||||
function hash(W::GWord, h::UInt)
|
function hash(W::GWord, h::UInt)
|
||||||
W.modified && reduce!(W)
|
W.modified && reduce!(W)
|
||||||
@compat res = xor(W.savedhash, h)
|
@compat res = xor(W.savedhash, h)
|
||||||
|
Loading…
Reference in New Issue
Block a user