pretty print of GroupRingElems
This commit is contained in:
parent
192c72a39c
commit
82f3ab6c34
|
@ -155,8 +155,13 @@ function show(io::IO, A::GroupRing)
|
||||||
end
|
end
|
||||||
|
|
||||||
function show(io::IO, X::GroupRingElem)
|
function show(io::IO, X::GroupRingElem)
|
||||||
|
if X == parent(X)()
|
||||||
|
print(io, "0*$((parent(X).group)())")
|
||||||
|
else
|
||||||
T = eltype(X.coeffs)
|
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
|
end
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
Loading…
Reference in New Issue