mirror of
https://github.com/kalmarek/GroupRings.jl.git
synced 2024-09-05 14:46:44 +02:00
pretty print of GroupRingElems
This commit is contained in:
parent
192c72a39c
commit
82f3ab6c34
@ -155,8 +155,13 @@ function show(io::IO, A::GroupRing)
|
||||
end
|
||||
|
||||
function show(io::IO, X::GroupRingElem)
|
||||
if X == parent(X)()
|
||||
print(io, "0*$((parent(X).group)())")
|
||||
else
|
||||
T = eltype(X.coeffs)
|
||||
print(io, "Element of Group Algebra of $(parent(X)) over $T:\n $(X.coeffs)")
|
||||
elts = ("$(X.coeffs[i])*$(parent(X).basis[i])" for i in 1:length(X) if X.coeffs[i] != zero(T))
|
||||
join(io, elts, " + ")
|
||||
end
|
||||
end
|
||||
|
||||
###############################################################################
|
||||
|
Loading…
Reference in New Issue
Block a user