1
0
mirror of https://github.com/kalmarek/Groups.jl.git synced 2024-11-19 06:30:29 +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,9 +104,14 @@ length(s::FPSymbol) = abs(s.pow)
###############################################################################
function show(io::IO, G::FPGroup)
print(io, "FPgroup on $(length(G.gens)) generators: ")
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
###############################################################################
#