Mercurial > octave
changeset 24863:009ed89dd0fa
test: make bicg and pcg tests conditional on CHOLMOD and UMFPACK
* bicg.m: Make %!test conditional on HAVE_UMFPACK for sparse lu.
* pcg.m: Make %!test conditional on HAVE_CHOLMOD for sparse chol.
author | Mike Miller <mtmiller@octave.org> |
---|---|
date | Sat, 10 Mar 2018 16:09:57 -0800 |
parents | 4186341e6041 |
children | 26d8b90c0cb2 |
files | scripts/sparse/bicg.m scripts/sparse/pcg.m |
diffstat | 2 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/sparse/bicg.m Sat Mar 10 15:13:15 2018 -0800 +++ b/scripts/sparse/bicg.m Sat Mar 10 16:09:57 2018 -0800 @@ -506,7 +506,8 @@ %! Afun = @(x, string, p) Ap (A, x, string, p); %! x = bicg (Afun, b, [], 2*n, [], [], [], 2); # solution of A^2 * x = b -%!test # preconditioned technique +## Preconditioned technique +%!testif HAVE_UMFPACK %! A = toeplitz (sparse ([2, 1, 0, 0, 0]), sparse ([2, -1, 0, 0, 0])); %! b = sum (A, 2); %! [M1, M2] = lu (A + eye (5));
--- a/scripts/sparse/pcg.m Sat Mar 10 15:13:15 2018 -0800 +++ b/scripts/sparse/pcg.m Sat Mar 10 16:09:57 2018 -0800 @@ -566,7 +566,7 @@ %! assert (flag, 0) %! assert (x, ones (N, 1), -1e-4) -%!test +%!testif HAVE_CHOLMOD %! ## pcg solves preconditioned linear system with A HPD %! N = 20; %! A = toeplitz (sparse ([4, 1, zeros(1, 18)])) + ...