comparison liboctave/array/fMatrix.cc @ 19631: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 a0c7001cf1a8
children 0b4915fcd2eb
comparison
equal deleted inserted replaced
19625:eee9f111c164 19631:aee5fea8a03e
1983 if (typ == MatrixType::Unknown) 1983 if (typ == MatrixType::Unknown)
1984 typ = mattype.type (*this); 1984 typ = mattype.type (*this);
1985 1985
1986 // Only calculate the condition number for LU/Cholesky 1986 // Only calculate the condition number for LU/Cholesky
1987 if (typ == MatrixType::Upper || typ == MatrixType::Permuted_Upper) 1987 if (typ == MatrixType::Upper || typ == MatrixType::Permuted_Upper)
1988 retval = utsolve (mattype, b, info, rcon, sing_handler, false, transt); 1988 retval = utsolve (mattype, b, info, rcon, sing_handler, true, transt);
1989 else if (typ == MatrixType::Lower || typ == MatrixType::Permuted_Lower) 1989 else if (typ == MatrixType::Lower || typ == MatrixType::Permuted_Lower)
1990 retval = ltsolve (mattype, b, info, rcon, sing_handler, false, transt); 1990 retval = ltsolve (mattype, b, info, rcon, sing_handler, true, transt);
1991 else if (transt == blas_trans || transt == blas_conj_trans) 1991 else if (transt == blas_trans || transt == blas_conj_trans)
1992 return transpose ().solve (mattype, b, info, rcon, sing_handler, 1992 return transpose ().solve (mattype, b, info, rcon, sing_handler,
1993 singular_fallback); 1993 singular_fallback);
1994 else if (typ == MatrixType::Full || typ == MatrixType::Hermitian) 1994 else if (typ == MatrixType::Full || typ == MatrixType::Hermitian)
1995 retval = fsolve (mattype, b, info, rcon, sing_handler, true); 1995 retval = fsolve (mattype, b, info, rcon, sing_handler, true);