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

perm_avg → perm_avg!

This commit is contained in:
kalmarek 2019-10-31 00:16:06 +01:00
parent 70bf9ad74c
commit ead95d20c3
No known key found for this signature in database
GPG Key ID: 8BF1A3855328FC15
2 changed files with 3 additions and 2 deletions

View File

@ -7,6 +7,7 @@ julia:
- 1.0 - 1.0
- 1.1 - 1.1
- 1.2 - 1.2
- 1.3
- nightly - nightly
notifications: notifications:
email: true email: true

View File

@ -147,7 +147,7 @@ function reconstruct(Ps::Vector{M},
tmp = [zeros(Float64, size(first(transfP))) for _ in 1:lU] tmp = [zeros(Float64, size(first(transfP))) for _ in 1:lU]
Threads.@threads for π in 1:lU Threads.@threads for π in 1:lU
tmp[π] = perm_avg(tmp[π], transfP[π], values(preps)) tmp[π] = perm_avg!(tmp[π], transfP[π], values(preps))
end end
recP = sum(tmp)./length(preps) recP = sum(tmp)./length(preps)
@ -155,7 +155,7 @@ function reconstruct(Ps::Vector{M},
return recP return recP
end end
function perm_avg(result, P, perms) function perm_avg!(result, P, perms)
lp = length(first(perms).d) lp = length(first(perms).d)
for p in perms for p in perms
# result .+= view(P, p.d, p.d) # result .+= view(P, p.d, p.d)