mirror of
https://github.com/kalmarek/Groups.jl.git
synced 2024-11-19 06:30:29 +01:00
remove isone(::GSymbol)
This commit is contained in:
parent
d1db939a63
commit
c880b51346
@ -102,9 +102,10 @@ end
|
||||
###############################################################################
|
||||
|
||||
function (==)(s::FreeSymbol, t::FreeSymbol)
|
||||
isone(s) && isone(t) && return true
|
||||
s.str == t.str || return false
|
||||
s.pow == t.pow || return false
|
||||
s.pow == 0 && return true
|
||||
s.str == t.str || return false
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
|
@ -103,8 +103,6 @@ function deepcopy_internal(W::T, dict::ObjectIdDict) where {T<:GWord}
|
||||
return G(T(deepcopy(W.symbols)))
|
||||
end
|
||||
|
||||
isone(s::GSymbol) = s.pow == 0
|
||||
|
||||
length(W::GWord) = sum([length(s) for s in W.symbols])
|
||||
|
||||
function delete_ids!(W::GWord)
|
||||
@ -189,9 +187,7 @@ function show(io::IO, W::GWord)
|
||||
end
|
||||
|
||||
function show(io::IO, s::T) where {T<:GSymbol}
|
||||
if isone(s)
|
||||
print(io, "(id)")
|
||||
elseif s.pow == 1
|
||||
if s.pow == 1
|
||||
print(io, s.str)
|
||||
else
|
||||
print(io, (s.str)*"^$(s.pow)")
|
||||
|
Loading…
Reference in New Issue
Block a user