Sparse module:

* several fixes (transpose, matrix product, etc...)
 * Added a basic cholesky factorization
 * Added a low level hybrid dense/sparse vector class
   to help writing code involving intensive read/write
   in a fixed vector. It is currently used to implement
   the matrix product itself as well as in the Cholesky
   factorization.
This commit is contained in:
Gael Guennebaud
2008-10-04 14:23:00 +00:00
parent 1fc503e3ce
commit 068ff3370d
8 changed files with 859 additions and 103 deletions

View File

@@ -133,10 +133,10 @@ class SparseMatrix
{
const int outer = RowMajor ? row : col;
const int inner = RowMajor ? col : row;
// std::cout << " fill " << outer << "," << inner << "\n";
if (m_outerIndex[outer+1]==0)
{
int i=col;
int i = outer;
while (i>=0 && m_outerIndex[i]==0)
{
m_outerIndex[i] = m_data.size();
@@ -204,6 +204,7 @@ class SparseMatrix
inline SparseMatrix& operator=(const SparseMatrix& other)
{
// std::cout << "SparseMatrix& operator=(const SparseMatrix& other)\n";
if (other.isRValue())
{
swap(other.const_cast_derived());
@@ -221,6 +222,7 @@ class SparseMatrix
template<typename OtherDerived>
inline SparseMatrix& operator=(const MatrixBase<OtherDerived>& other)
{
// std::cout << "SparseMatrix& operator=(const MatrixBase<OtherDerived>& other)\n";
return SparseMatrixBase<SparseMatrix>::operator=(other.derived());
}