changeset 23901:b590c674e27d

Add BIST test for ichol_t (bug #51736). * __ichol__.cc: Add BIST test. Remove empty BIST test used to mark file.
author Richard Zweig <richard.zweig@gmx.de>
date Sat, 12 Aug 2017 11:50:32 -0700
parents 5621aae74d1a
children 53dfc2329ba9 a08e277f985f
files libinterp/corefcn/__ichol__.cc
diffstat 1 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/__ichol__.cc	Sat Aug 12 11:29:36 2017 -0700
+++ b/libinterp/corefcn/__ichol__.cc	Sat Aug 12 11:50:32 2017 -0700
@@ -453,6 +453,14 @@
 }
 
 /*
-## No test needed for internal helper function.
-%!assert (1)
+%!test <51736>
+%! k = 4;
+%! n = 2^k;
+%! Afull = diag (ones (n,1)) / ...
+%!          2+triu ([zeros(n,2), [n.^-[1;1;2]*ones(1,n-2);zeros(n-3,n-2)]], 1);
+%! A = sparse (Afull + Afull.');
+%! opts.type = "ict";
+%! opts.droptol = 0;
+%! L = ichol (A, opts);
+%! assert (norm (A - L*L.'), 0, 2*eps);
 */