From 6dd130e789cde8e758392836ca8b8b8867d9b014 Mon Sep 17 00:00:00 2001 From: kalmar Date: Tue, 16 May 2017 18:34:21 +0200 Subject: [PATCH] show GroupRing/GroupRingElem --- src/GroupAlgebras.jl | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/GroupAlgebras.jl b/src/GroupAlgebras.jl index 90eda11..f6339d7 100644 --- a/src/GroupAlgebras.jl +++ b/src/GroupAlgebras.jl @@ -29,8 +29,6 @@ end export GroupRing, GroupRingElem -show{T}(io::IO, X::GroupAlgebraElement{T}) = print(io, - "Element of Group Algebra over $T of length $(length(X)):\n $(X.coefficients)") GroupRingElem{T}(c::AbstractVector{T}, A::GroupRing) = GroupRingElem{T}(c,A) @@ -59,6 +57,16 @@ function GroupRing(G::Group; complete=false) end return A end + +function show(io::IO, A::GroupRing) + print(io, "GroupRing of $(A.group)") +end + +function show(io::IO, X::GroupRingElem) + T = eltype(X.coeffs) + print(io, "Element of Group Algebra of $(parent(X)) over $T:\n $(X.coeffs)") +end + end (==)(X::GroupAlgebraElement, Y::GroupAlgebraElement) = isequal(X,Y)