mirror of
https://github.com/kalmarek/Groups.jl.git
synced 2024-11-19 06:30:29 +01:00
define show for <:GSymbol
This commit is contained in:
parent
3d944d2de2
commit
83e40972a7
@ -100,14 +100,6 @@ function show(io::IO, G::FPGroup)
|
||||
print(io, "rels:\t", join([rel for rel in G.rels], ", "))
|
||||
end
|
||||
|
||||
function show(io::IO, s::FPSymbol)
|
||||
if isone(s)
|
||||
print(io, "(id)")
|
||||
elseif s.pow == 1
|
||||
print(io, s.str)
|
||||
else
|
||||
print(io, (s.str)*"^$(s.pow)")
|
||||
end
|
||||
end
|
||||
|
||||
###############################################################################
|
||||
|
@ -150,6 +150,16 @@ function show(io::IO, W::GWord)
|
||||
end
|
||||
end
|
||||
|
||||
function show{T<:GSymbol}(io::IO, s::T)
|
||||
if isone(s)
|
||||
print(io, "(id)")
|
||||
elseif s.pow == 1
|
||||
print(io, s.str)
|
||||
else
|
||||
print(io, (s.str)*"^$(s.pow)")
|
||||
end
|
||||
end
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Comparison
|
||||
|
Loading…
Reference in New Issue
Block a user