mirror of
https://github.com/kalmarek/GroupRings.jl.git
synced 2024-11-19 14:35:27 +01:00
don't compare bases when ==(::GroupRing, ::GroupRing)
comparing pm should be enough
This commit is contained in:
parent
4dd2c02a4c
commit
f6b31ec2c9
@ -250,22 +250,24 @@ end
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
function (==)(X::GroupRingElem, Y::GroupRingElem)
|
function (==)(X::GroupRingElem, Y::GroupRingElem)
|
||||||
parent(X) == parent(Y) || return false
|
|
||||||
if eltype(X.coeffs) != eltype(Y.coeffs)
|
if eltype(X.coeffs) != eltype(Y.coeffs)
|
||||||
warn("Comparing elements with different coeffs Rings!")
|
warn("Comparing elements with different coeffs Rings!")
|
||||||
end
|
end
|
||||||
all(X.coeffs .== Y.coeffs) || return false
|
suppX = supp(X)
|
||||||
|
suppX == supp(Y) || return false
|
||||||
|
|
||||||
|
for g in suppX
|
||||||
|
X[g] == Y[g] || return false
|
||||||
|
end
|
||||||
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
function (==)(A::GroupRing, B::GroupRing)
|
function (==)(A::GroupRing, B::GroupRing)
|
||||||
A.group == B.group || return false
|
A.group == B.group || return false
|
||||||
if isdefined(A, :basis) && isdefined(B, :basis)
|
complete!(A)
|
||||||
A.basis == B.basis || return false
|
complete!(B)
|
||||||
else
|
|
||||||
baseless_warn && warn("Bases of GroupRings are not defined, comparing products mats.")
|
|
||||||
A.pm == B.pm || return false
|
A.pm == B.pm || return false
|
||||||
end
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user