changeset 19468:aee5fea8a03e

compute condition number when solving triangular systems (bug #43875) * dMatrix.cc (Matrix::solve): Pass true for calc_rcond in calls to utsolve and ltsolve. * CMatrix.cc (ComplexMatrix::solve): Likewise. * fCMatrix.cc (FloatComplexMatrix::solve): Likewise. * fMatrix.cc (FloatMatrix::solve): Likeiwse.
author John W. Eaton <jwe@octave.org>
date Fri, 26 Dec 2014 14:35:46 -0500
parents eee9f111c164
children 51a1d1164449
files liboctave/array/CMatrix.cc liboctave/array/dMatrix.cc liboctave/array/fCMatrix.cc liboctave/array/fMatrix.cc
diffstat 4 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/array/CMatrix.cc	Tue Dec 23 10:30:26 2014 -0500
+++ b/liboctave/array/CMatrix.cc	Fri Dec 26 14:35:46 2014 -0500
@@ -2367,9 +2367,9 @@
 
   // Only calculate the condition number for LU/Cholesky
   if (typ == MatrixType::Upper || typ == MatrixType::Permuted_Upper)
-    retval = utsolve (mattype, b, info, rcon, sing_handler, false, transt);
+    retval = utsolve (mattype, b, info, rcon, sing_handler, true, transt);
   else if (typ == MatrixType::Lower || typ == MatrixType::Permuted_Lower)
-    retval = ltsolve (mattype, b, info, rcon, sing_handler, false, transt);
+    retval = ltsolve (mattype, b, info, rcon, sing_handler, true, transt);
   else if (transt == blas_trans)
     return transpose ().solve (mattype, b, info, rcon, sing_handler,
                                singular_fallback);
--- a/liboctave/array/dMatrix.cc	Tue Dec 23 10:30:26 2014 -0500
+++ b/liboctave/array/dMatrix.cc	Fri Dec 26 14:35:46 2014 -0500
@@ -1969,9 +1969,9 @@
 
   // Only calculate the condition number for LU/Cholesky
   if (typ == MatrixType::Upper || typ == MatrixType::Permuted_Upper)
-    retval = utsolve (mattype, b, info, rcon, sing_handler, false, transt);
+    retval = utsolve (mattype, b, info, rcon, sing_handler, true, transt);
   else if (typ == MatrixType::Lower || typ == MatrixType::Permuted_Lower)
-    retval = ltsolve (mattype, b, info, rcon, sing_handler, false, transt);
+    retval = ltsolve (mattype, b, info, rcon, sing_handler, true, transt);
   else if (transt == blas_trans || transt == blas_conj_trans)
     return transpose ().solve (mattype, b, info, rcon, sing_handler,
                                singular_fallback);
--- a/liboctave/array/fCMatrix.cc	Tue Dec 23 10:30:26 2014 -0500
+++ b/liboctave/array/fCMatrix.cc	Fri Dec 26 14:35:46 2014 -0500
@@ -2373,9 +2373,9 @@
 
   // Only calculate the condition number for LU/Cholesky
   if (typ == MatrixType::Upper || typ == MatrixType::Permuted_Upper)
-    retval = utsolve (mattype, b, info, rcon, sing_handler, false, transt);
+    retval = utsolve (mattype, b, info, rcon, sing_handler, true, transt);
   else if (typ == MatrixType::Lower || typ == MatrixType::Permuted_Lower)
-    retval = ltsolve (mattype, b, info, rcon, sing_handler, false, transt);
+    retval = ltsolve (mattype, b, info, rcon, sing_handler, true, transt);
   else if (transt == blas_trans)
     return transpose ().solve (mattype, b, info, rcon, sing_handler,
                                singular_fallback);
--- a/liboctave/array/fMatrix.cc	Tue Dec 23 10:30:26 2014 -0500
+++ b/liboctave/array/fMatrix.cc	Fri Dec 26 14:35:46 2014 -0500
@@ -1985,9 +1985,9 @@
 
   // Only calculate the condition number for LU/Cholesky
   if (typ == MatrixType::Upper || typ == MatrixType::Permuted_Upper)
-    retval = utsolve (mattype, b, info, rcon, sing_handler, false, transt);
+    retval = utsolve (mattype, b, info, rcon, sing_handler, true, transt);
   else if (typ == MatrixType::Lower || typ == MatrixType::Permuted_Lower)
-    retval = ltsolve (mattype, b, info, rcon, sing_handler, false, transt);
+    retval = ltsolve (mattype, b, info, rcon, sing_handler, true, transt);
   else if (transt == blas_trans || transt == blas_conj_trans)
     return transpose ().solve (mattype, b, info, rcon, sing_handler,
                                singular_fallback);