Advertisement
Guest User

Untitled

a guest
Jan 31st, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Julia 1.04 KB | None | 0 0
  1.     function reduce(k, ℓ)
  2.         # BEFORE ================
  3.         if verbose
  4.             println("iteration $n_iter \t reduce \t k=$k \t ℓ=$ℓ \t [μ[k,l]] = $(round_ties_down(μ[k,ℓ]))")
  5.             n_iter += 1
  6.         end
  7.  
  8.         if abs(μ[k, ℓ]) > 1/2
  9.             y[k, :] -= round_ties_down(μ[k, ℓ]) * y[ℓ, :]
  10.             for j in 1:ℓ-1
  11.                 μ[k, j] -= round_ties_down(μ[k, ℓ]) * μ[ℓ, j]
  12.             end
  13.             μ[k, ℓ] -= round_ties_down(μ[k, ℓ])
  14.         end
  15.     end
  16.  
  17.     function reduce(k, ℓ)
  18.         if abs(μ[k, ℓ]) > 1/2
  19.             # AFTER =============
  20.             if verbose
  21.                 println("iteration $n_iter \t reduce \t k=$k \t ℓ=$ℓ \t [μ[k,l]] = $(round_ties_down(μ[k,ℓ]))")
  22.                 n_iter += 1
  23.             end
  24.  
  25.             y[k, :] -= round_ties_down(μ[k, ℓ]) * y[ℓ, :]
  26.             for j in 1:ℓ-1
  27.                 μ[k, j] -= round_ties_down(μ[k, ℓ]) * μ[ℓ, j]
  28.             end
  29.             μ[k, ℓ] -= round_ties_down(μ[k, ℓ])
  30.         end
  31.     end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement