Mercurial > hg > octave-lyh
changeset 6185:da5a11b3d13e
[project @ 2006-11-22 18:57:26 by dbateman]
author | dbateman |
---|---|
date | Wed, 22 Nov 2006 18:57:27 +0000 |
parents | e96d66e0d634 |
children | 237a7f535bbc |
files | liboctave/CSparse.cc liboctave/ChangeLog liboctave/dSparse.cc |
diffstat | 3 files changed, 17 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/CSparse.cc +++ b/liboctave/CSparse.cc @@ -973,7 +973,10 @@ else if (typ == MatrixType::Upper || typ == MatrixType::Permuted_Upper) ret = tinverse (mattype, info, rcond, true, calc_cond).transpose(); else if (typ == MatrixType::Lower || typ == MatrixType::Permuted_Lower) - ret = transpose().tinverse (mattype, info, rcond, true, calc_cond); + { + MatrixType newtype = mattype.transpose(); + ret = transpose().tinverse (newtype, info, rcond, true, calc_cond); + } else if (typ != MatrixType::Rectangular) { if (mattype.is_hermitian())
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,12 @@ +2006-11-22 David Bateman <dbateman@free.fr> + + * dSparse.cc (SparseMatrix SparseMatrix::inverse(...)): Transpose + the matrix type as well when calling tinverse for lower + triangular + matrices + * CSparse.cc (SparseComplexMatrix SparseComplexMatrix::inverse(...)): + ditto. + 2006-11-21 John W. Eaton <jwe@octave.org> * oct-env.cc (do_absolute_pathname): Undo previous change.
--- a/liboctave/dSparse.cc +++ b/liboctave/dSparse.cc @@ -1049,7 +1049,10 @@ else if (typ == MatrixType::Upper || typ == MatrixType::Permuted_Upper) ret = tinverse (mattype, info, rcond, true, calc_cond).transpose(); else if (typ == MatrixType::Lower || typ == MatrixType::Permuted_Lower) - ret = transpose().tinverse (mattype, info, rcond, true, calc_cond); + { + MatrixType newtype = mattype.transpose(); + ret = transpose().tinverse (newtype, info, rcond, true, calc_cond); + } else if (typ != MatrixType::Rectangular) { if (mattype.is_hermitian())