mirror of
https://github.com/kalmarek/Groups.jl.git
synced 2024-12-25 18:15:29 +01:00
remove the default rewriting(G::AbstractFPGroup)
It's better to show MethodError than to default to surprising behaviour.
This commit is contained in:
parent
72ea5c8123
commit
20711aa1e8
14
src/types.jl
14
src/types.jl
@ -20,8 +20,18 @@ word_type(G::AbstractFPGroup) = word_type(typeof(G))
|
|||||||
# the default:
|
# the default:
|
||||||
word_type(::Type{<:AbstractFPGroup}) = Word{UInt8}
|
word_type(::Type{<:AbstractFPGroup}) = Word{UInt8}
|
||||||
|
|
||||||
# the default (results in free rewriting)
|
"""
|
||||||
rewriting(G::AbstractFPGroup) = alphabet(G)
|
rewriting(G::AbstractFPGroup)
|
||||||
|
Return a "rewriting object" for elements of `G`. The rewriting object must must implement
|
||||||
|
KnuthBendix.rewrite_from_left!(
|
||||||
|
u::AbstractWord,
|
||||||
|
v::AbstractWord,
|
||||||
|
rewriting(G)
|
||||||
|
)
|
||||||
|
|
||||||
|
For example if `G` is a `FreeGroup` then `alphabet(G)` is returned which results in free rewriting. For `FPGroup` a rewriting system is returned which may (or may not) rewrite word `v` to its normal form.
|
||||||
|
"""
|
||||||
|
function rewriting end
|
||||||
|
|
||||||
Base.@propagate_inbounds function (G::AbstractFPGroup)(
|
Base.@propagate_inbounds function (G::AbstractFPGroup)(
|
||||||
word::AbstractVector{<:Integer},
|
word::AbstractVector{<:Integer},
|
||||||
|
Loading…
Reference in New Issue
Block a user