1
0
mirror of https://github.com/kalmarek/PropertyT.jl.git synced 2024-11-14 14:15:28 +01:00

change view to slice: it's not the bottleneck and thread safe

This commit is contained in:
kalmar 2017-04-08 13:50:59 +02:00
parent 8ccfe09105
commit 76a2135063

View File

@ -38,7 +38,7 @@ function correct_to_augmentation_ideal{T<:Rational}(sqrt_matrix::Array{T,2})
sqrt_corrected = similar(sqrt_matrix)
l = size(sqrt_matrix,2)
for i in 1:l
col = view(sqrt_matrix,:,i)
col = sqrt_matrix[:,i]
sqrt_corrected[:,i] = col - sum(col)//l
# @assert sum(sqrt_corrected[:,i]) == 0
end