Mercurial > octave
diff libinterp/corefcn/chol.cc @ 32485:22c90d779a24
Update deprecated `shift` to `circshift` in BISTs for chol() and qr()
author | Arun Giridhar <arungiridhar@gmail.com> |
---|---|
date | Thu, 23 Nov 2023 14:35:05 -0500 |
parents | 1f77c3f61aea |
children | 4b601ca024d5 |
line wrap: on
line diff
--- a/libinterp/corefcn/chol.cc Wed Nov 22 16:54:04 2023 -0800 +++ b/libinterp/corefcn/chol.cc Thu Nov 23 14:35:05 2023 -0500 @@ -1187,9 +1187,9 @@ positive definite matrix @w{@var{A} = @var{R}'*@var{R}}, @var{R}@tie{}upper triangular, return the Cholesky@tie{}factorization of @w{@var{A}(p,p)}, where @w{p} is the permutation @* -@code{p = [1:i-1, shift(i:j, 1), j+1:n]} if @w{@var{i} < @var{j}} @* +@code{p = [1:i-1, circshift(i:j, 1), j+1:n]} if @w{@var{i} < @var{j}} @* or @* -@code{p = [1:j-1, shift(j:i,-1), i+1:n]} if @w{@var{j} < @var{i}}. @* +@code{p = [1:j-1, circshift(j:i,-1), i+1:n]} if @w{@var{j} < @var{i}}. @* @seealso{chol, cholupdate, cholinsert, choldelete} @end deftypefn */) @@ -1276,13 +1276,13 @@ %!test %! R = chol (A); %! -%! i = 1; j = 3; p = [1:i-1, shift(i:j,-1), j+1:4]; +%! i = 1; j = 3; p = [1:i-1, circshift(i:j,-1), j+1:4]; %! R1 = cholshift (R, i, j); %! %! assert (norm (triu (R1)-R1, Inf), 0); %! assert (norm (R1'*R1 - A(p,p), Inf), 0, 1e1*eps); %! -%! j = 1; i = 3; p = [1:j-1, shift(j:i,+1), i+1:4]; +%! j = 1; i = 3; p = [1:j-1, circshift(j:i,+1), i+1:4]; %! R1 = cholshift (R, i, j); %! %! assert (norm (triu (R1) - R1, Inf), 0); @@ -1291,13 +1291,13 @@ %!test %! R = chol (Ac); %! -%! i = 1; j = 3; p = [1:i-1, shift(i:j,-1), j+1:4]; +%! i = 1; j = 3; p = [1:i-1, circshift(i:j,-1), j+1:4]; %! R1 = cholshift (R, i, j); %! %! assert (norm (triu (R1)-R1, Inf), 0); %! assert (norm (R1'*R1 - Ac(p,p), Inf), 0, 1e1*eps); %! -%! j = 1; i = 3; p = [1:j-1, shift(j:i,+1), i+1:4]; +%! j = 1; i = 3; p = [1:j-1, circshift(j:i,+1), i+1:4]; %! R1 = cholshift (R, i, j); %! %! assert (norm (triu (R1)-R1, Inf), 0); @@ -1306,13 +1306,13 @@ %!test %! R = chol (single (A)); %! -%! i = 1; j = 3; p = [1:i-1, shift(i:j,-1), j+1:4]; +%! i = 1; j = 3; p = [1:i-1, circshift(i:j,-1), j+1:4]; %! R1 = cholshift (R, i, j); %! %! assert (norm (triu (R1)-R1, Inf), 0); %! assert (norm (R1'*R1 - single (A(p,p)), Inf), 0, 1e1* eps ("single")); %! -%! j = 1; i = 3; p = [1:j-1, shift(j:i,+1), i+1:4]; +%! j = 1; i = 3; p = [1:j-1, circshift(j:i,+1), i+1:4]; %! R1 = cholshift (R, i, j); %! %! assert (norm (triu (R1)-R1, Inf), 0); @@ -1321,13 +1321,13 @@ %!test %! R = chol (single (Ac)); %! -%! i = 1; j = 3; p = [1:i-1, shift(i:j,-1), j+1:4]; +%! i = 1; j = 3; p = [1:i-1, circshift(i:j,-1), j+1:4]; %! R1 = cholshift (R, i, j); %! %! assert (norm (triu (R1)-R1, Inf), 0); %! assert (norm (R1'*R1 - single (Ac(p,p)), Inf), 0, 1e1* eps ("single")); %! -%! j = 1; i = 3; p = [1:j-1, shift(j:i,+1), i+1:4]; +%! j = 1; i = 3; p = [1:j-1, circshift(j:i,+1), i+1:4]; %! R1 = cholshift (R, i, j); %! %! assert (norm (triu (R1)-R1, Inf), 0);