File indexing completed on 2025-02-22 10:34:41
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef EIGEN_MAPPED_SPARSEMATRIX_H
0011 #define EIGEN_MAPPED_SPARSEMATRIX_H
0012
0013 namespace Eigen {
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025 namespace internal {
0026 template<typename _Scalar, int _Flags, typename _StorageIndex>
0027 struct traits<MappedSparseMatrix<_Scalar, _Flags, _StorageIndex> > : traits<SparseMatrix<_Scalar, _Flags, _StorageIndex> >
0028 {};
0029 }
0030
0031 template<typename _Scalar, int _Flags, typename _StorageIndex>
0032 class MappedSparseMatrix
0033 : public Map<SparseMatrix<_Scalar, _Flags, _StorageIndex> >
0034 {
0035 typedef Map<SparseMatrix<_Scalar, _Flags, _StorageIndex> > Base;
0036
0037 public:
0038
0039 typedef typename Base::StorageIndex StorageIndex;
0040 typedef typename Base::Scalar Scalar;
0041
0042 inline MappedSparseMatrix(Index rows, Index cols, Index nnz, StorageIndex* outerIndexPtr, StorageIndex* innerIndexPtr, Scalar* valuePtr, StorageIndex* innerNonZeroPtr = 0)
0043 : Base(rows, cols, nnz, outerIndexPtr, innerIndexPtr, valuePtr, innerNonZeroPtr)
0044 {}
0045
0046
0047 inline ~MappedSparseMatrix() {}
0048 };
0049
0050 namespace internal {
0051
0052 template<typename _Scalar, int _Options, typename _StorageIndex>
0053 struct evaluator<MappedSparseMatrix<_Scalar,_Options,_StorageIndex> >
0054 : evaluator<SparseCompressedBase<MappedSparseMatrix<_Scalar,_Options,_StorageIndex> > >
0055 {
0056 typedef MappedSparseMatrix<_Scalar,_Options,_StorageIndex> XprType;
0057 typedef evaluator<SparseCompressedBase<XprType> > Base;
0058
0059 evaluator() : Base() {}
0060 explicit evaluator(const XprType &mat) : Base(mat) {}
0061 };
0062
0063 }
0064
0065 }
0066
0067 #endif