diff options
author | 2009-11-16 18:19:08 +0100 | |
---|---|---|
committer | 2009-11-16 18:19:08 +0100 | |
commit | 2a3a6fe45e8207840c2b3295d823f941e51d392a (patch) | |
tree | b0654b244462e1e6e4cdb0386c573a71104c3b49 /Eigen/src/Sparse/SparseUtil.h | |
parent | a89b22f352ce3685e6aa93b1f1c0be9a1efa0d5b (diff) |
Experiment the ET refactoring on Transpose for Dense and Sparse storages.
All tests work fine.
Diffstat (limited to 'Eigen/src/Sparse/SparseUtil.h')
-rw-r--r-- | Eigen/src/Sparse/SparseUtil.h | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/Eigen/src/Sparse/SparseUtil.h b/Eigen/src/Sparse/SparseUtil.h index b5fc7c7b7..5ae3ebc7a 100644 --- a/Eigen/src/Sparse/SparseUtil.h +++ b/Eigen/src/Sparse/SparseUtil.h @@ -69,7 +69,23 @@ enum { RowsAtCompileTime = Eigen::ei_traits<Derived>::RowsAtCompileTime, \ IsVectorAtCompileTime = Base::IsVectorAtCompileTime }; #define EIGEN_SPARSE_GENERIC_PUBLIC_INTERFACE(Derived) \ -_EIGEN_SPARSE_GENERIC_PUBLIC_INTERFACE(Derived, Eigen::SparseMatrixBase<Derived>) + _EIGEN_SPARSE_GENERIC_PUBLIC_INTERFACE(Derived, Eigen::SparseMatrixBase<Derived>) + +#define _EIGEN_SPARSE_PUBLIC_INTERFACE(Derived, BaseClass) \ + typedef BaseClass Base; \ + typedef typename Eigen::ei_traits<Derived>::Scalar Scalar; \ + typedef typename Eigen::NumTraits<Scalar>::Real RealScalar; \ + typedef typename Eigen::ei_nested<Derived>::type Nested; \ + enum { RowsAtCompileTime = Eigen::ei_traits<Derived>::RowsAtCompileTime, \ + ColsAtCompileTime = Eigen::ei_traits<Derived>::ColsAtCompileTime, \ + Flags = Eigen::ei_traits<Derived>::Flags, \ + CoeffReadCost = Eigen::ei_traits<Derived>::CoeffReadCost, \ + SizeAtCompileTime = Base::SizeAtCompileTime, \ + IsVectorAtCompileTime = Base::IsVectorAtCompileTime }; \ + using Base::derived; + +#define EIGEN_SPARSE_PUBLIC_INTERFACE(Derived) \ + _EIGEN_SPARSE_PUBLIC_INTERFACE(Derived, Eigen::SparseMatrixBase<Derived>) enum SparseBackend { DefaultBackend, @@ -107,7 +123,7 @@ template<typename _Scalar, int _Flags = 0> class SparseVector; template<typename _Scalar, int _Flags = 0> class MappedSparseMatrix; template<typename MatrixType> class SparseNestByValue; -template<typename MatrixType> class SparseTranspose; +// template<typename MatrixType> class SparseTranspose; template<typename MatrixType, int Size> class SparseInnerVectorSet; template<typename Derived> class SparseCwise; template<typename UnaryOp, typename MatrixType> class SparseCwiseUnaryOp; @@ -127,7 +143,7 @@ const int RandomAccessPattern = 0x8 | OuterRandomAccessPattern | InnerRand // const int AccessPatternNotSupported = 0x0; // const int AccessPatternSupported = 0x1; -// +// // template<typename MatrixType, int AccessPattern> struct ei_support_access_pattern // { // enum { ret = (int(ei_traits<MatrixType>::SupportedAccessPatterns) & AccessPattern) == AccessPattern |