diff --git a/src/Kaczmarz.jl b/src/Kaczmarz.jl index e4f6283a..12c84b64 100644 --- a/src/Kaczmarz.jl +++ b/src/Kaczmarz.jl @@ -135,9 +135,9 @@ function init!(solver::Kaczmarz, b; x0 = 0) solver.vl .= 0 weights = solverweights(solver) - solver.u .= b ./(weights) + solver.u .= b for (i, weight) = enumerate(weights[solver.rowindex]) - solver.ɛw[i] = sqrt(λ_) / weight + solver.ɛw[i] = sqrt(λ_) end end @@ -174,7 +174,6 @@ function iterate(solver::Kaczmarz, iteration::Int=0) end iterate_row_index(solver::Kaczmarz, A::AbstractLinearSolver, row, index) = iterate_row_index(solver, Matrix(A[row, :]), row, index) -iterate_row_index(solver::Kaczmarz, A::ProdOp{T, <:WeightingOp, matT}, row, index) where {T, matT} = iterate_row_index(solver, A.B, row, index) function iterate_row_index(solver::Kaczmarz, A, row, index) solver.τl = dot_with_matrix_row(A,solver.x,row) solver.αl = solver.denom[index]*(solver.u[row]-solver.τl-solver.ɛw[index]*solver.vl[row]) @@ -221,7 +220,7 @@ function initkaczmarz(A,λ) for (i, weight) in enumerate(weights) s² = rownorm²(A,i)*weight^2 if s²>0 - push!(denom,1/(s²+(λ/weight^2))) + push!(denom,1/(s²+λ)) push!(rowindex,i) end end