mirror of
https://github.com/kalmarek/GroupRings.jl.git
synced 2024-11-19 06:30:27 +01:00
== for GroupRing and GroupRingElem
This commit is contained in:
parent
ad97e1fab7
commit
955aaf48fa
@ -93,9 +93,22 @@ function show(io::IO, X::GroupRingElem)
|
||||
print(io, "Element of Group Algebra of $(parent(X)) over $T:\n $(X.coeffs)")
|
||||
end
|
||||
|
||||
|
||||
function (==)(X::GroupRingElem, Y::GroupRingElem)
|
||||
parent(X) == parent(Y) || return false
|
||||
if eltype(X.coeffs) != eltype(S.coeffs)
|
||||
warn("Comparing elements with different coeffs Rings!")
|
||||
end
|
||||
X.coeffs == Y.coeffs || return false
|
||||
return true
|
||||
end
|
||||
|
||||
function (==)(A::GroupRing, B::GroupRing)
|
||||
return A.group == B.group
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
(==)(X::GroupAlgebraElement, Y::GroupAlgebraElement) = isequal(X,Y)
|
||||
|
||||
function add{T<:Number}(X::GroupAlgebraElement{T}, Y::GroupAlgebraElement{T})
|
||||
X.product_matrix == Y.product_matrix || throw(ArgumentError(
|
||||
|
Loading…
Reference in New Issue
Block a user