mirror of
https://github.com/kalmarek/Groups.jl.git
synced 2024-11-19 06:30:29 +01:00
define isone for <:GSymbol
This commit is contained in:
parent
9dafd3c09c
commit
3d944d2de2
@ -82,8 +82,6 @@ end
|
||||
|
||||
hash(s::FPSymbol, h::UInt) = hash(s.str, hash(s.pow, hash(FPSymbol, h)))
|
||||
|
||||
isone(s::FPSymbol) = s.pow == 0
|
||||
|
||||
change_pow(s::FPSymbol, n::Int) = FPSymbol(s.str, n)
|
||||
|
||||
length(s::FPSymbol) = abs(s.pow)
|
||||
|
@ -86,6 +86,8 @@ function deepcopy_internal{T<:GSymbol}(W::GWord{T}, dict::ObjectIdDict)
|
||||
return G(GWord{T}(deepcopy(W.symbols)))
|
||||
end
|
||||
|
||||
isone{T<:GSymbol}(s::T) = s.pow == 0
|
||||
|
||||
length(W::GWord) = sum([length(s) for s in W.symbols])
|
||||
|
||||
function free_reduce!(W::GWord)
|
||||
|
Loading…
Reference in New Issue
Block a user