solve_two_boundaries.m: do not modify lambda when stack_solve_algo=4

That algorithm (optimal path length) does not use it.
kalman_mex
Sébastien Villemot 2023-11-08 12:18:31 +01:00
parent 8556043c9a
commit b36507d005
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
1 changed files with 3 additions and 3 deletions

View File

@ -70,7 +70,7 @@ ilu_setup.milu = 'off';
ilu_setup.thresh = 1;
ilu_setup.udiag = 0;
max_resa=1e100;
lambda = 1; % Length of Newton step
lambda = 1; % Length of Newton step (unused for stack_solve_algo=4)
reduced = 0;
while ~(cvg || iter>maxit_)
r = NaN(Blck_size, periods);
@ -136,7 +136,7 @@ while ~(cvg || iter>maxit_)
return
end
end
elseif lambda>1e-8
elseif lambda>1e-8 && stack_solve_algo ~= 4
lambda=lambda/2;
reduced = 1;
if verbose
@ -156,7 +156,7 @@ while ~(cvg || iter>maxit_)
return
end
else
if lambda<1
if lambda<1 && stack_solve_algo ~= 4
lambda=max(lambda*2, 1);
end
end