diff liboctave/SparseCmplxLU.cc @ 9759:97de6c916498

Fix test for valid threshold value in sparse LU factorization
author David Bateman <dbateman@free.fr>
date Tue, 27 Oct 2009 20:11:47 +0100
parents eb63fbe60fab
children 4c0cdbe0acca
line wrap: on
line diff
--- a/liboctave/SparseCmplxLU.cc
+++ b/liboctave/SparseCmplxLU.cc
@@ -57,7 +57,7 @@
   double tmp = octave_sparse_params::get_key ("spumoni");
   if (!xisnan (tmp))
     Control (UMFPACK_PRL) = tmp;
-  if (piv_thres.nelem() != 2)
+  if (piv_thres.nelem() == 2)
     {
       tmp = (piv_thres (0) > 1. ? 1. : piv_thres (0));
       if (!xisnan (tmp))
@@ -266,7 +266,7 @@
       double tmp = octave_sparse_params::get_key ("spumoni");
       if (!xisnan (tmp))
 	Control (UMFPACK_PRL) = tmp;
-      if (piv_thres.nelem() != 2)
+      if (piv_thres.nelem() == 2)
 	{
 	  tmp = (piv_thres (0) > 1. ? 1. : piv_thres (0));
 	  if (!xisnan (tmp))