mirror of
https://github.com/kalmarek/GroupRings.jl.git
synced 2024-09-05 06:45:40 +02:00
use a single zero object to compare
This commit is contained in:
parent
56a0964f30
commit
3b9e405565
@ -311,10 +311,11 @@ end
|
||||
|
||||
function mul!{T}(X::AbstractVector{T}, Y::AbstractVector{T},
|
||||
pm::Array{Int,2}, result::AbstractVector{T})
|
||||
z = zero(T)
|
||||
for (j,y) in enumerate(Y)
|
||||
if y != zero(eltype(Y))
|
||||
if y != z
|
||||
for (i, index) in enumerate(pm[:,j])
|
||||
if X[i] != zero(eltype(X))
|
||||
if X[i] != z
|
||||
index == 0 && throw(ArgumentError("The product don't seem to belong to the span of basis!"))
|
||||
result[index] += X[i]*y
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user