Right now e.g. in UKI, we have to call different methods update_ensemble_analysis! and succ_gauss_analysis!.
|
function update_ensemble_analysis!( |
|
uki::EnsembleKalmanProcess{FT, IT, U}, |
|
u_p::AbstractMatrix{FT}, |
|
g::AbstractMatrix{FT}, |
|
) where {FT <: AbstractFloat, IT <: Int, U <: Unscented} |
|
function succ_gauss_analysis!(uki, u_p, g, failed_ens) |
This is confusing, and at the very least, much of the logic is shared.
Possible solution.
As these methods largely derive from calling construct_mean or construct_successful_mean (and the same with cov) , there should be a way of safely removing much of the code duplication outside of these methods,
Right now e.g. in UKI, we have to call different methods
update_ensemble_analysis!andsucc_gauss_analysis!.EnsembleKalmanProcesses.jl/src/UnscentedKalmanInversion.jl
Lines 607 to 611 in 81e249a
EnsembleKalmanProcesses.jl/src/UnscentedKalmanInversion.jl
Line 275 in 81e249a
This is confusing, and at the very least, much of the logic is shared.
Possible solution.
As these methods largely derive from calling
construct_meanorconstruct_successful_mean(and the same withcov) , there should be a way of safely removing much of the code duplication outside of these methods,