From df2e51128d4f108c159bb77d92b45718f1fce1a3 Mon Sep 17 00:00:00 2001 From: kalmarek Date: Sun, 10 Sep 2017 21:44:15 +0200 Subject: [PATCH] add baseless_warn global constant to suppress warnings for baseless Group Rings --- src/GroupRings.jl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/GroupRings.jl b/src/GroupRings.jl index 8a2e96e..45cbc16 100644 --- a/src/GroupRings.jl +++ b/src/GroupRings.jl @@ -11,6 +11,8 @@ import Base: convert, show, hash, ==, +, -, *, //, /, length, norm, rationalize, # ############################################################################### +baseless_warn = false + type GroupRing{Gr<:Group, T<:GroupElem} <: Ring group::Gr basis::Vector{T} @@ -232,7 +234,7 @@ function show(io::IO, X::GroupRingElem) end print(io, str) else - warn("Basis of the parent Group is not defined, showing coeffs") + baseless_warn && warn("Basis of the parent Group is not defined, showing coeffs") show(io, MIME("text/plain"), X.coeffs) end end @@ -257,7 +259,7 @@ function (==)(A::GroupRing, B::GroupRing) if isdefined(A, :basis) && isdefined(B, :basis) A.basis == B.basis || return false else - warn("Bases of GroupRings are not defined, comparing products mats.") + baseless_warn && warn("Bases of GroupRings are not defined, comparing products mats.") A.pm == B.pm || return false end return true