1
0
mirror of https://github.com/kalmarek/Groups.jl.git synced 2024-12-03 17:56:28 +01:00

don't print overly long presentations

This commit is contained in:
kalmarek 2018-03-22 10:49:52 +01:00
parent d834935d05
commit 203e084ff3

View File

@ -104,8 +104,13 @@ length(s::FPSymbol) = abs(s.pow)
###############################################################################
function show(io::IO, G::FPGroup)
print(io, "FPgroup on $(length(G.gens)) generators: ")
print(io, "", join(G.gens, ", "), " | ", join(G.rels, ", "), " ⟩.")
print(io, "FPgroup on $(length(G.gens)) generators ")
strrels = join(G.rels, ", ")
if length(strrels) > 300
print(io, "", join(G.gens, ", "), " | $(length(G.rels)) relation(s) ⟩.")
else
print(io, "", join(G.gens, ", "), " | ", join(G.rels, ", "), " ⟩.")
end
end
###############################################################################