Sparse module:

* enable complex support for the CHOLMOD LLT backend
   using CHOLMOD's triangular solver
 * quick fix for complex support in SparseLLT::solve
This commit is contained in:
Gael Guennebaud
2008-12-27 18:13:29 +00:00
parent 361225068d
commit ce3984844d
4 changed files with 126 additions and 58 deletions

View File

@@ -148,7 +148,7 @@ class SparseMatrix
*/
inline void startFill(int reserveSize = 1000)
{
std::cerr << this << " startFill\n";
// std::cerr << this << " startFill\n";
setZero();
m_data.reserve(reserveSize);
}
@@ -214,7 +214,7 @@ class SparseMatrix
m_data.index(id+1) = inner;
//return (m_data.value(id+1) = 0);
m_data.value(id+1) = 0;
std::cerr << m_outerIndex[outer] << " " << m_outerIndex[outer+1] << "\n";
// std::cerr << m_outerIndex[outer] << " " << m_outerIndex[outer+1] << "\n";
return m_data.value(id+1);
}
@@ -222,7 +222,7 @@ class SparseMatrix
inline void endFill()
{
std::cerr << this << " endFill\n";
// std::cerr << this << " endFill\n";
int size = m_data.size();
int i = m_outerSize;
// find the last filled column
@@ -238,7 +238,7 @@ class SparseMatrix
void resize(int rows, int cols)
{
std::cerr << this << " resize " << rows << "x" << cols << "\n";
// std::cerr << this << " resize " << rows << "x" << cols << "\n";
const int outerSize = RowMajor ? rows : cols;
m_innerSize = RowMajor ? cols : rows;
m_data.clear();
@@ -273,6 +273,12 @@ class SparseMatrix
*this = other.derived();
}
inline SparseMatrix(const SparseMatrix& other)
: m_outerSize(0), m_innerSize(0), m_outerIndex(0)
{
*this = other.derived();
}
inline void swap(SparseMatrix& other)
{
//EIGEN_DBG_SPARSE(std::cout << "SparseMatrix:: swap\n");