Skip to content

Commit

Permalink
Fix error in init kaczmarz
Browse files Browse the repository at this point in the history
  • Loading branch information
nHackel committed Feb 19, 2024
1 parent a0cfb72 commit 6ad1a26
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Kaczmarz.jl
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,11 @@ This function calculates the probabilities of the rows of the system matrix

function rowProbabilities(A::AbstractMatrix, rowindex)
M,N = size(A)
normS = norm(A)
normS = norm(A)^2
p = zeros(length(rowindex))
for i=1:length(rowindex)
j = rowindex[i]
p[i] = (norm(A[j,:]))^2 / (normS)^2
p[i] = (norm(A[j,:]))^2 / (normS)
end

return p
Expand All @@ -212,7 +212,7 @@ function initkaczmarz(A,λ)
denom = T[]
rowindex = Int64[]

for i in size(A, 1)
for i in 1:size(A, 1)
= rownorm²(A,i)
if>0
push!(denom,1/(s²+λ))
Expand Down

0 comments on commit 6ad1a26

Please sign in to comment.