Sparse module:

* add a MappedSparseMatrix class (like Eigen::Map but for sparse
  matrices)
* rename SparseArray to CompressedStorage
This commit is contained in:
Gael Guennebaud
2009-01-15 12:52:59 +00:00
parent 4f33fbfc07
commit 96e1e582ff
10 changed files with 285 additions and 90 deletions

View File

@@ -57,20 +57,17 @@ class SparseMatrix
{
public:
EIGEN_SPARSE_GENERIC_PUBLIC_INTERFACE(SparseMatrix)
typedef MappedSparseMatrix<Scalar,Flags> Map;
protected:
public:
typedef SparseMatrixBase<SparseMatrix> SparseBase;
enum {
RowMajor = SparseBase::IsRowMajor
};
enum { RowMajor = Base::IsRowMajor };
typedef SparseMatrix<Scalar,(Flags&~RowMajorBit)|(RowMajor?RowMajorBit:0)> TransposedSparseMatrix;
int m_outerSize;
int m_innerSize;
int* m_outerIndex;
SparseArray<Scalar> m_data;
CompressedStorage<Scalar> m_data;
public:
@@ -380,21 +377,6 @@ class SparseMatrix
return s;
}
#ifdef EIGEN_TAUCS_SUPPORT
static SparseMatrix Map(taucs_ccs_matrix& taucsMatrix);
taucs_ccs_matrix asTaucsMatrix();
#endif
#ifdef EIGEN_CHOLMOD_SUPPORT
static SparseMatrix Map(cholmod_sparse& cholmodMatrix);
cholmod_sparse asCholmodMatrix();
#endif
#ifdef EIGEN_SUPERLU_SUPPORT
static SparseMatrix Map(SluMatrix& sluMatrix);
SluMatrix asSluMatrix();
#endif
/** Destructor */
inline ~SparseMatrix()
{