mirror of
https://github.com/kalmarek/Groups.jl.git
synced 2024-12-25 18:15:29 +01:00
use KnuthBendix.print_repr
This commit is contained in:
parent
0fb84a9c61
commit
60f3b686ba
@ -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.
|
* `relations(G::MyFPGroup)` : return a set of defining relations.
|
||||||
|
|
||||||
AbstractFPGroup may also override `word_type(::Type{MyFPGroup}) = Word{UInt16}`,
|
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
|
which controls the word type used for group elements. If a group has more than `255` generators you need to define e.g.
|
||||||
than `255` generators you may define
|
> `word_type(::Type{MyFPGroup}) = Word{UInt16}`
|
||||||
> `word_type(::Type{MyFPGroup}) = Word{UInt8}`
|
|
||||||
"""
|
"""
|
||||||
abstract type AbstractFPGroup <: GroupsCore.Group end
|
abstract type AbstractFPGroup <: GroupsCore.Group end
|
||||||
|
|
||||||
@ -83,7 +82,7 @@ KnuthBendix.alphabet(g::FPGroupElement) = alphabet(parent(g))
|
|||||||
|
|
||||||
function Base.show(io::IO, f::FPGroupElement)
|
function Base.show(io::IO, f::FPGroupElement)
|
||||||
f = normalform!(f)
|
f = normalform!(f)
|
||||||
print(io, KnuthBendix.string_repr(word(f), alphabet(f)))
|
KnuthBendix.print_repr(io, word(f), alphabet(f))
|
||||||
end
|
end
|
||||||
|
|
||||||
## GroupElement Interface for FPGroupElement
|
## GroupElement Interface for FPGroupElement
|
||||||
|
Loading…
Reference in New Issue
Block a user