diff src/DLD-FUNCTIONS/luinc.cc @ 5610:9761b7d24e9e

[project @ 2006-02-09 09:12:02 by dbateman]
author dbateman
date Thu, 09 Feb 2006 09:12:03 +0000
parents 22994a5730f9
children 2618a0750ae6
line wrap: on
line diff
--- a/src/DLD-FUNCTIONS/luinc.cc	Thu Feb 09 02:30:00 2006 +0000
+++ b/src/DLD-FUNCTIONS/luinc.cc	Thu Feb 09 09:12:03 2006 +0000
@@ -279,6 +279,28 @@
 }
 
 /*
+
+%!test
+%! a=sparse([1,2,0,0;0,1,2,0;1e-14,0,3,0;0,0,0,1]);
+%! [l,u]=luinc(a,1e-10);
+%! assert(l*u, sparse([1,2,0,0;0,1,2,0;0,0,3,0;0,0,0,1]),1e-10);
+%! opts.droptol=1e-10;
+%! [l,u]=luinc(a,opts);
+%! assert(l*u, sparse([1,2,0,0;0,1,2,0;0,0,3,0;0,0,0,1]),1e-10);
+
+%!test
+%! a=sparse([1i,2,0,0;0,1,2,0;1e-14,0,3,0;0,0,0,1]);
+%! [l,u]=luinc(a,1e-10);
+%! assert(l*u, sparse([1i,2,0,0;0,1,2,0;0,0,3,0;0,0,0,1]),1e-10);
+%! opts.droptol=1e-10;
+%! [l,u]=luinc(a,opts);
+%! assert(l*u, sparse([1i,2,0,0;0,1,2,0;0,0,3,0;0,0,0,1]),1e-10);
+
+%!error splu(sparse([1i,2,0,0;0,1,2,0;1e-14,0,3,0;0,0,0,1]));
+
+*/
+
+/*
 ;;; Local Variables: ***
 ;;; mode: C++ ***
 ;;; End: ***