the new definition of FPGroup <: Group

This commit is contained in:
kalmar 2017-05-11 18:16:21 +02:00
parent de6f6bc52d
commit 6a29797557
1 changed files with 12 additions and 10 deletions

View File

@ -7,22 +7,24 @@ end
typealias FPGroupElem GWord{FPSymbol}
type FPGroup <: Group
gens::Vector{FPSymbol}
rels::Vector{FPGroupElem}
# order::Vector{T}
# fastmult_table::Array{Int,2}
function FPGroup{T<:GSymbol}(gens::Vector{T}, rels::Vector{GWord{T}})
G = new(gens, rels)
G.gens = gens
rels = [G(r) for r in rels]
G.rels = rels
return G
end
end
# FPSymbol(x::String, G::Group) = FPSymbol(x,1,G)
# FPSymbol(s::GSymbol, G::Group) = FPSymbol(s.gen, s.pow, G)
immutable FPGroup <: Group
gens::Vector{FPSymbol}
rels::Vector{FPGroupElem}
# order::Vector{T}
# fast_multable::Array{Int,2}
function FPGroup{T<:GSymbol}(gens::Vector{T}, rels::GWord{T})
G = new()
gens = [FPSymbol{G}(g.gen, G) for g in gens]
rels = []
end
end
FPGroup() = FPGroup(Vector{FPSymbol}(), Vector{GWord{FPSymbol}}())