mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2024-11-27 01:10:28 +01:00
change view to slice: it's not the bottleneck and thread safe
This commit is contained in:
parent
8ccfe09105
commit
76a2135063
@ -38,7 +38,7 @@ function correct_to_augmentation_ideal{T<:Rational}(sqrt_matrix::Array{T,2})
|
|||||||
sqrt_corrected = similar(sqrt_matrix)
|
sqrt_corrected = similar(sqrt_matrix)
|
||||||
l = size(sqrt_matrix,2)
|
l = size(sqrt_matrix,2)
|
||||||
for i in 1:l
|
for i in 1:l
|
||||||
col = view(sqrt_matrix,:,i)
|
col = sqrt_matrix[:,i]
|
||||||
sqrt_corrected[:,i] = col - sum(col)//l
|
sqrt_corrected[:,i] = col - sum(col)//l
|
||||||
# @assert sum(sqrt_corrected[:,i]) == 0
|
# @assert sum(sqrt_corrected[:,i]) == 0
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user