mirror of
https://github.com/kalmarek/Groups.jl.git
synced 2024-12-04 18:11:26 +01:00
remove Compat
This commit is contained in:
parent
1988e8fd40
commit
32a76f9efa
@ -4,16 +4,16 @@
|
|||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
@compat struct AutSymbol <: GSymbol
|
struct AutSymbol <: GSymbol
|
||||||
str::String
|
str::String
|
||||||
pow::Int
|
pow::Int
|
||||||
ex::Expr
|
ex::Expr
|
||||||
func::Function
|
func::Function
|
||||||
end
|
end
|
||||||
|
|
||||||
@compat AutGroupElem = GWord{AutSymbol}
|
AutGroupElem = GWord{AutSymbol}
|
||||||
|
|
||||||
@compat mutable struct AutGroup <: AbstractFPGroup
|
mutable struct AutGroup <: AbstractFPGroup
|
||||||
objectGroup::Group
|
objectGroup::Group
|
||||||
gens::Vector{AutSymbol}
|
gens::Vector{AutSymbol}
|
||||||
end
|
end
|
||||||
|
@ -4,14 +4,14 @@
|
|||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
@compat struct FreeSymbol <: GSymbol
|
struct FreeSymbol <: GSymbol
|
||||||
str::String
|
str::String
|
||||||
pow::Int
|
pow::Int
|
||||||
end
|
end
|
||||||
|
|
||||||
@compat FreeGroupElem = GWord{FreeSymbol}
|
FreeGroupElem = GWord{FreeSymbol}
|
||||||
|
|
||||||
@compat mutable struct FreeGroup <: AbstractFPGroup
|
mutable struct FreeGroup <: AbstractFPGroup
|
||||||
gens::Vector{FreeSymbol}
|
gens::Vector{FreeSymbol}
|
||||||
# order::Vector{T}
|
# order::Vector{T}
|
||||||
# fastmult_table::Array{Int,2}
|
# fastmult_table::Array{Int,2}
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
module Groups
|
module Groups
|
||||||
using Compat
|
|
||||||
|
|
||||||
using Nemo
|
using Nemo
|
||||||
import Nemo: Group, GroupElem, Ring
|
import Nemo: Group, GroupElem, Ring
|
||||||
@ -25,7 +24,7 @@ doc"""
|
|||||||
> * `pow` which is the (multiplicative) exponent of a symbol.
|
> * `pow` which is the (multiplicative) exponent of a symbol.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
@compat abstract type GSymbol end
|
abstract type GSymbol end
|
||||||
|
|
||||||
doc"""
|
doc"""
|
||||||
W::GWord{T<:GSymbol} <:GroupElem
|
W::GWord{T<:GSymbol} <:GroupElem
|
||||||
@ -43,18 +42,18 @@ doc"""
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@compat mutable struct GWord{T<:GSymbol} <: GroupElem
|
mutable struct GWord{T<:GSymbol} <: GroupElem
|
||||||
symbols::Vector{T}
|
symbols::Vector{T}
|
||||||
savedhash::UInt
|
savedhash::UInt
|
||||||
modified::Bool
|
modified::Bool
|
||||||
parent::Group
|
parent::Group
|
||||||
|
|
||||||
@compat function GWord{T}(symbols::Vector{T}) where {T<:GSymbol}
|
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
|
||||||
|
|
||||||
@compat abstract type AbstractFPGroup <: Group end
|
abstract type AbstractFPGroup <: Group end
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
#
|
#
|
||||||
@ -81,7 +80,7 @@ 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)
|
res = xor(W.savedhash, h)
|
||||||
return res
|
return res
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user