mirror of
https://github.com/kalmarek/GroupRings.jl.git
synced 2025-01-01 11:45:28 +01:00
indentation and other trivial changes
This commit is contained in:
parent
c6b557080d
commit
65d2df3a40
@ -27,8 +27,6 @@ function mul!(result::GroupRingElem, X::GroupRingElem, Y::GroupRingElem)
|
|||||||
result = zero!(_dealias(result, X, Y))
|
result = zero!(_dealias(result, X, Y))
|
||||||
X_nzeros_idx = findall(!iszero, X.coeffs)
|
X_nzeros_idx = findall(!iszero, X.coeffs)
|
||||||
Y_nzeros_idx = findall(!iszero, Y.coeffs)
|
Y_nzeros_idx = findall(!iszero, Y.coeffs)
|
||||||
# X_nzeros_idx = [i for i in eachindex(X.coeffs) if X[i] != zero(eltype(X))]
|
|
||||||
# Y_nzeros_idx = [i for i in eachindex(Y.coeffs) if Y[i] != zero(eltype(Y))]
|
|
||||||
|
|
||||||
RG = parent(X)
|
RG = parent(X)
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ end
|
|||||||
|
|
||||||
Base.isequal(X::GroupRingElem, Y::GroupRingElem) = X == Y
|
Base.isequal(X::GroupRingElem, Y::GroupRingElem) = X == Y
|
||||||
|
|
||||||
_equalorzero(x,y) = x == y || x == 0 || y == 0
|
_equalorzero(x,y) = x == 0 || y == 0 || x == y
|
||||||
|
|
||||||
function ==(A::GroupRing, B::GroupRing)
|
function ==(A::GroupRing, B::GroupRing)
|
||||||
A.group == B.group || return false
|
A.group == B.group || return false
|
||||||
@ -105,8 +105,8 @@ function ==(A::GroupRing, B::GroupRing)
|
|||||||
if bases && caches
|
if bases && caches
|
||||||
length(A) == length(B) || return false
|
length(A) == length(B) || return false
|
||||||
size(A.pm) == size(B.pm) || return false
|
size(A.pm) == size(B.pm) || return false
|
||||||
all(A.basis[i] == B.basis[i] for i in eachindex(A.basis)) || return false
|
all(A.basis[i] == B.basis[i] for i = eachindex(A.basis)) || return false
|
||||||
all(_equalorzero(A.pm[i], B.pm[i]) for i in eachindex(A.pm)) || return false
|
all(_equalorzero(A.pm[i], B.pm[i]) for i=eachindex(A.pm)) || return false
|
||||||
return true
|
return true
|
||||||
elseif bases # && !caches
|
elseif bases # && !caches
|
||||||
length(A) == length(B) || return false
|
length(A) == length(B) || return false
|
||||||
@ -161,6 +161,7 @@ function AbstractAlgebra.promote_rule(u::Type{U}, x::Type{GREl}) where {T, GREl<
|
|||||||
return AbstractAlgebra.promote_rule(x, u)
|
return AbstractAlgebra.promote_rule(x, u)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function Base.rand(RG::GroupRing, density=0.05, args...)
|
function Base.rand(RG::GroupRing, density=0.05, args...)
|
||||||
l = length(RG)
|
l = length(RG)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user