Mercurial > jwe > octave
changeset 29267:7e378993e8fa
maint: merge stable to default.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Tue, 05 Jan 2021 15:54:22 +0100 |
parents | 18ad3c01fc2a (current diff) f36ca61488e0 (diff) |
children | 1cdd4619d0b9 |
files | libinterp/corefcn/qr.cc test/mk-sparse-tst.sh |
diffstat | 3 files changed, 16 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/qr.cc Tue Jan 05 14:10:15 2021 +0100 +++ b/libinterp/corefcn/qr.cc Tue Jan 05 15:54:22 2021 +0100 @@ -1006,7 +1006,7 @@ %! r = qr (a); %! assert (r'*r, a'*a, 1e-10); -%!testif HAVE_COLAMD +%!testif HAVE_COLAMD; __have_feature__ ("SPQR") || __have_feature__ ("CXSPARSE") %! n = 20; d = 0.2; %! ## initialize generators to make behavior reproducible %! rand ("state", 42); @@ -1056,7 +1056,7 @@ %! r = qr (a); %! assert (r'*r,a'*a,1e-10); -%!testif HAVE_COLAMD +%!testif HAVE_COLAMD; __have_feature__ ("SPQR") || __have_feature__ ("CXSPARSE") %! n = 20; d = 0.2; %! ## initialize generators to make behavior reproducible %! rand ("state", 42);
--- a/scripts/sparse/spaugment.m Tue Jan 05 14:10:15 2021 +0100 +++ b/scripts/sparse/spaugment.m Tue Jan 05 15:54:22 2021 +0100 @@ -103,7 +103,7 @@ endfunction -%!testif HAVE_UMFPACK +%!testif HAVE_UMFPACK, HAVE_CXSPARSE %! m = 11; n = 10; mn = max (m ,n); %! A = spdiags ([ones(mn,1), 10*ones(mn,1), -ones(mn,1)],[-1,0,1], m, n); %! x0 = A \ ones (m,1);
--- a/test/mk-sparse-tst.sh Tue Jan 05 14:10:15 2021 +0100 +++ b/test/mk-sparse-tst.sh Tue Jan 05 15:54:22 2021 +0100 @@ -1032,7 +1032,7 @@ %! x = a \ b; %! assert (sparse (a * x), b, feps); %!endfunction -%!testif HAVE_UMFPACK +%!testif HAVE_UMFPACK, HAVE_CXSPARSE %! a = alpha*sprandn (10,11,0.2) + speye (10,11); %! f (a,[10,2],1e-10); %! ## Test this by forcing matrix_type, as can't get a certain @@ -1069,32 +1069,32 @@ %!assert (pds\xs, sparse (pdf\xs), 100*eps) %!test %! us = alpha*[[speye(10,10);sparse(1,10)],[[1,1];sparse(9,2);[1,1]]]; -%!testif HAVE_UMFPACK +%!testif HAVE_UMFPACK, HAVE_CXSPARSE %! assert (us*(us\xf), xf, 100*eps); -%!testif HAVE_UMFPACK +%!testif HAVE_UMFPACK, HAVE_CXSPARSE %! assert (us*(us\xs), xs, 100*eps); %!test %! pus = us(:,[2,1,3:12]); -%!testif HAVE_UMFPACK +%!testif HAVE_UMFPACK, HAVE_CXSPARSE %! assert (pus*(pus\xf), xf, 100*eps); -%!testif HAVE_UMFPACK +%!testif HAVE_UMFPACK, HAVE_CXSPARSE %! assert (pus*(pus\xs), xs, 100*eps); %!test %! us = alpha*[speye(11,9),[1;sparse(8,1);1;0]]; %!testif HAVE_CXSPARSE %! [c,r] = qr (us, xf); %! assert (us\xf, r\c, 100*eps); -%!testif HAVE_UMFPACK +%!testif HAVE_UMFPACK, HAVE_CXSPARSE %! [c,r] = qr (us, xs); %! r = matrix_type (r, "Singular"); ## Force Matrix Type %! assert (us\xs, r\c, 100*eps); %!test %! pus = us(:,[1:8,10,9]); -%!testif HAVE_UMFPACK +%!testif HAVE_UMFPACK, HAVE_CXSPARSE %! [c,r] = qr (pus, xf); %! r = matrix_type (r, "Singular"); ## Force Matrix Type %! assert (pus\xf, r\c, 100*eps); -%!testif HAVE_UMFPACK +%!testif HAVE_UMFPACK, HAVE_CXSPARSE %! [c,r] = qr (pus, xs); %! r = matrix_type (r, "Singular"); ## Force Matrix Type %! assert (pus\xs, r\c, 100*eps); @@ -1112,20 +1112,20 @@ %! ls = alpha*[speye(10,10), sparse(10,1);[1;1], sparse(2,9),[1;1]]; %! xf = beta * ones (12,2); %! xs = speye (12,12); -%!testif HAVE_UMFPACK +%!testif HAVE_UMFPACK, HAVE_CXSPARSE %! [c,r] = qr (ls, xf); %! assert (ls\xf, r\c, 100*eps); -%!testif HAVE_UMFPACK +%!testif HAVE_UMFPACK, HAVE_CXSPARSE %! [c,r] = qr (ls, xs); %! r = matrix_type (r, "Singular"); ## Force Matrix Type %! assert (ls\xs, r\c, 100*eps); -%!testif HAVE_CXSPARSE +%!test %! pls = ls(:,[1:8,10,9]); -%!testif HAVE_UMFPACK +%!testif HAVE_UMFPACK, HAVE_CXSPARSE %! [c,r] = qr (pls, xf); %! r = matrix_type (r, "Singular"); ## Force Matrix Type %! assert (pls\xf, r\c, 100*eps); -%!testif HAVE_UMFPACK +%!testif HAVE_UMFPACK, HAVE_CXSPARSE %! [c,r] = qr (pls, xs); %! r = matrix_type (r, "Singular"); ## Force Matrix Type %! assert (pls\xs, r\c, 100*eps);