1
0
mirror of https://github.com/kalmarek/Groups.jl.git synced 2024-11-19 06:30:29 +01:00

use KnuthBendix.print_repr

This commit is contained in:
Marek Kaluba 2021-05-24 01:41:37 +02:00
parent 0fb84a9c61
commit 60f3b686ba
No known key found for this signature in database
GPG Key ID: 8BF1A3855328FC15

View File

@ -19,9 +19,8 @@ By default `alphabet(G)` is returned, which amounts to free rewriting in `G`.
* `relations(G::MyFPGroup)` : return a set of defining relations.
AbstractFPGroup may also override `word_type(::Type{MyFPGroup}) = Word{UInt16}`,
which controls the word type used for group elements. If if your group has less
than `255` generators you may define
> `word_type(::Type{MyFPGroup}) = Word{UInt8}`
which controls the word type used for group elements. If a group has more than `255` generators you need to define e.g.
> `word_type(::Type{MyFPGroup}) = Word{UInt16}`
"""
abstract type AbstractFPGroup <: GroupsCore.Group end
@ -83,7 +82,7 @@ KnuthBendix.alphabet(g::FPGroupElement) = alphabet(parent(g))
function Base.show(io::IO, f::FPGroupElement)
f = normalform!(f)
print(io, KnuthBendix.string_repr(word(f), alphabet(f)))
KnuthBendix.print_repr(io, word(f), alphabet(f))
end
## GroupElement Interface for FPGroupElement