Skip to content

Commit

Permalink
Re-add weights
Browse files Browse the repository at this point in the history
  • Loading branch information
jonschumacher committed Apr 29, 2024
1 parent 320930f commit 2394ecc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/LeastSquares.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ export LeastSquaresParameters
abstract type AbstractSolverParameters <: AbstractMPIRecoParameters end

export LeastSquaresParameters
Base.@kwdef struct LeastSquaresParameters{L<:AbstractLinearSolver, O, M, R<:AbstractRegularization, P<:AbstractSolverParameters} <: AbstractMPIRecoParameters
Base.@kwdef struct LeastSquaresParameters{L<:AbstractLinearSolver, O, M, R<:AbstractRegularization, P<:AbstractSolverParameters, W} <: AbstractMPIRecoParameters
solver::Type{L} = Kaczmarz
op::O = nothing
S::M
reg::Vector{R}
solverParams::P
weights::W = nothing
end

# TODO place weights and more
Expand Down Expand Up @@ -37,7 +38,7 @@ function process(t::Type{<:AbstractMPIRecoAlgorithm}, params::LeastSquaresParame
reg, args = prepareRegularization(params.reg, params)
args[:reg] = reg

solv = createLinearSolver(params.solver, params.S; args...)
solv = createLinearSolver(params.solver, params.S; args..., weights = params.weights)

for l=1:L
d = solve!(solv, u[:, l])
Expand Down

0 comments on commit 2394ecc

Please sign in to comment.