comparison liboctave/dSparse.cc @ 6840:2f17d5556756

[project @ 2007-08-29 08:37:47 by dbateman]
author dbateman
date Wed, 29 Aug 2007 08:37:48 +0000
parents 9fddcc586065
children be176b7e110a
comparison
equal deleted inserted replaced
6839:40ad39648884 6840:2f17d5556756
1084 else if (typ == MatrixType::Lower || typ == MatrixType::Permuted_Lower) 1084 else if (typ == MatrixType::Lower || typ == MatrixType::Permuted_Lower)
1085 { 1085 {
1086 MatrixType newtype = mattype.transpose(); 1086 MatrixType newtype = mattype.transpose();
1087 ret = transpose().tinverse (newtype, info, rcond, true, calc_cond); 1087 ret = transpose().tinverse (newtype, info, rcond, true, calc_cond);
1088 } 1088 }
1089 else if (typ != MatrixType::Rectangular) 1089 else
1090 { 1090 {
1091 if (mattype.is_hermitian()) 1091 if (mattype.is_hermitian())
1092 { 1092 {
1093 MatrixType tmp_typ (MatrixType::Upper); 1093 MatrixType tmp_typ (MatrixType::Upper);
1094 SparseCHOL fact (*this, info, false); 1094 SparseCHOL fact (*this, info, false);
1125 SparseMatrix InvU = fact.U().tinverse(tmp_typ, info, rcond2, 1125 SparseMatrix InvU = fact.U().tinverse(tmp_typ, info, rcond2,
1126 true, false).transpose(); 1126 true, false).transpose();
1127 ret = fact.Pc().transpose() * InvU * InvL * fact.Pr(); 1127 ret = fact.Pc().transpose() * InvU * InvL * fact.Pr();
1128 } 1128 }
1129 } 1129 }
1130 else
1131 (*current_liboctave_error_handler) ("inverse requires square matrix");
1132 1130
1133 return ret; 1131 return ret;
1134 } 1132 }
1135 1133
1136 DET 1134 DET