| 24 | * \ref TopicCustomizing_Plugins by defining the preprocessor symbol \c EIGEN_SPARSEMATRIXBASE_PLUGIN. |
| 25 | */ |
| 26 | template<typename Derived> class SparseMatrixBase |
| 27 | : public EigenBase<Derived> |
| 28 | { |
| 29 | public: |
| 30 | |
| 31 | typedef typename internal::traits<Derived>::Scalar Scalar; |
| 32 | |
| 33 | /** The numeric type of the expression' coefficients, e.g. float, double, int or std::complex<float>, etc. |
| 34 | * |
| 35 | * It is an alias for the Scalar type */ |
| 36 | typedef Scalar value_type; |
| 37 | |
| 38 | typedef typename internal::packet_traits<Scalar>::type PacketScalar; |
| 39 | typedef typename internal::traits<Derived>::StorageKind StorageKind; |
| 40 | |
| 41 | /** The integer type used to \b store indices within a SparseMatrix. |
| 42 | * For a \c SparseMatrix<Scalar,Options,IndexType> it an alias of the third template parameter \c IndexType. */ |
| 43 | typedef typename internal::traits<Derived>::StorageIndex StorageIndex; |
| 44 | |
| 45 | typedef typename internal::add_const_on_value_type_if_arithmetic< |
| 46 | typename internal::packet_traits<Scalar>::type |
| 47 | >::type PacketReturnType; |
| 48 | |
| 49 | typedef SparseMatrixBase StorageBaseType; |
| 50 | |
| 51 | typedef Matrix<StorageIndex,Dynamic,1> IndexVector; |
| 52 | typedef Matrix<Scalar,Dynamic,1> ScalarVector; |
| 53 | |
| 54 | template<typename OtherDerived> |
| 55 | Derived& operator=(const EigenBase<OtherDerived> &other); |
| 56 | |
| 57 | enum { |
| 58 | |
| 59 | RowsAtCompileTime = internal::traits<Derived>::RowsAtCompileTime, |
| 60 | /**< The number of rows at compile-time. This is just a copy of the value provided |
| 61 | * by the \a Derived type. If a value is not known at compile-time, |
| 62 | * it is set to the \a Dynamic constant. |
| 63 | * \sa MatrixBase::rows(), MatrixBase::cols(), ColsAtCompileTime, SizeAtCompileTime */ |
| 64 | |
| 65 | ColsAtCompileTime = internal::traits<Derived>::ColsAtCompileTime, |
| 66 | /**< The number of columns at compile-time. This is just a copy of the value provided |
| 67 | * by the \a Derived type. If a value is not known at compile-time, |
| 68 | * it is set to the \a Dynamic constant. |
| 69 | * \sa MatrixBase::rows(), MatrixBase::cols(), RowsAtCompileTime, SizeAtCompileTime */ |
| 70 | |
| 71 | |
| 72 | SizeAtCompileTime = (internal::size_at_compile_time<internal::traits<Derived>::RowsAtCompileTime, |
| 73 | internal::traits<Derived>::ColsAtCompileTime>::ret), |
| 74 | /**< This is equal to the number of coefficients, i.e. the number of |
| 75 | * rows times the number of columns, or to \a Dynamic if this is not |
| 76 | * known at compile-time. \sa RowsAtCompileTime, ColsAtCompileTime */ |
| 77 | |
| 78 | MaxRowsAtCompileTime = RowsAtCompileTime, |
| 79 | MaxColsAtCompileTime = ColsAtCompileTime, |
| 80 | |
| 81 | MaxSizeAtCompileTime = (internal::size_at_compile_time<MaxRowsAtCompileTime, |
| 82 | MaxColsAtCompileTime>::ret), |
| 83 | |