| |
| |
| |
| |
| |
| |
| |
| |
|
|
| #ifndef EIGEN_MAPPED_SPARSEMATRIX_H |
| #define EIGEN_MAPPED_SPARSEMATRIX_H |
|
|
| namespace Eigen { |
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| namespace internal { |
| template<typename _Scalar, int _Flags, typename _StorageIndex> |
| struct traits<MappedSparseMatrix<_Scalar, _Flags, _StorageIndex> > : traits<SparseMatrix<_Scalar, _Flags, _StorageIndex> > |
| {}; |
| } |
|
|
| template<typename _Scalar, int _Flags, typename _StorageIndex> |
| class MappedSparseMatrix |
| : public Map<SparseMatrix<_Scalar, _Flags, _StorageIndex> > |
| { |
| typedef Map<SparseMatrix<_Scalar, _Flags, _StorageIndex> > Base; |
|
|
| public: |
| |
| typedef typename Base::StorageIndex StorageIndex; |
| typedef typename Base::Scalar Scalar; |
|
|
| inline MappedSparseMatrix(Index rows, Index cols, Index nnz, StorageIndex* outerIndexPtr, StorageIndex* innerIndexPtr, Scalar* valuePtr, StorageIndex* innerNonZeroPtr = 0) |
| : Base(rows, cols, nnz, outerIndexPtr, innerIndexPtr, valuePtr, innerNonZeroPtr) |
| {} |
|
|
| |
| inline ~MappedSparseMatrix() {} |
| }; |
|
|
| namespace internal { |
|
|
| template<typename _Scalar, int _Options, typename _StorageIndex> |
| struct evaluator<MappedSparseMatrix<_Scalar,_Options,_StorageIndex> > |
| : evaluator<SparseCompressedBase<MappedSparseMatrix<_Scalar,_Options,_StorageIndex> > > |
| { |
| typedef MappedSparseMatrix<_Scalar,_Options,_StorageIndex> XprType; |
| typedef evaluator<SparseCompressedBase<XprType> > Base; |
| |
| evaluator() : Base() {} |
| explicit evaluator(const XprType &mat) : Base(mat) {} |
| }; |
|
|
| } |
|
|
| } |
|
|
| #endif |
|
|