diff --git a/src/LeastSquares.jl b/src/LeastSquares.jl index 2a31d4a..f7150f0 100644 --- a/src/LeastSquares.jl +++ b/src/LeastSquares.jl @@ -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 @@ -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])