comparison liboctave/SparsedbleLU.cc @ 12101:ae70ce64beb7 release-3-2-x

Fix test for valid threshold value in sparse LU factorization
author David Bateman <dbateman@free.fr>
date Tue, 24 Nov 2009 08:00:32 +0100
parents eb63fbe60fab
children 4c0cdbe0acca
comparison
equal deleted inserted replaced
12100:38f3c198ba63 12101:ae70ce64beb7
55 55
56 double tmp = octave_sparse_params::get_key ("spumoni"); 56 double tmp = octave_sparse_params::get_key ("spumoni");
57 if (!xisnan (tmp)) 57 if (!xisnan (tmp))
58 Control (UMFPACK_PRL) = tmp; 58 Control (UMFPACK_PRL) = tmp;
59 59
60 if (piv_thres.nelem() != 2) 60 if (piv_thres.nelem() == 2)
61 { 61 {
62 tmp = (piv_thres (0) > 1. ? 1. : piv_thres (0)); 62 tmp = (piv_thres (0) > 1. ? 1. : piv_thres (0));
63 if (!xisnan (tmp)) 63 if (!xisnan (tmp))
64 Control (UMFPACK_PIVOT_TOLERANCE) = tmp; 64 Control (UMFPACK_PIVOT_TOLERANCE) = tmp;
65 tmp = (piv_thres (1) > 1. ? 1. : piv_thres (1)); 65 tmp = (piv_thres (1) > 1. ? 1. : piv_thres (1));
251 251
252 double tmp = octave_sparse_params::get_key ("spumoni"); 252 double tmp = octave_sparse_params::get_key ("spumoni");
253 if (!xisnan (tmp)) 253 if (!xisnan (tmp))
254 Control (UMFPACK_PRL) = tmp; 254 Control (UMFPACK_PRL) = tmp;
255 255
256 if (piv_thres.nelem() != 2) 256 if (piv_thres.nelem() == 2)
257 { 257 {
258 tmp = (piv_thres (0) > 1. ? 1. : piv_thres (0)); 258 tmp = (piv_thres (0) > 1. ? 1. : piv_thres (0));
259 if (!xisnan (tmp)) 259 if (!xisnan (tmp))
260 Control (UMFPACK_PIVOT_TOLERANCE) = tmp; 260 Control (UMFPACK_PIVOT_TOLERANCE) = tmp;
261 tmp = (piv_thres (1) > 1. ? 1. : piv_thres (1)); 261 tmp = (piv_thres (1) > 1. ? 1. : piv_thres (1));