diff options
author | 2009-01-19 15:20:45 +0000 | |
---|---|---|
committer | 2009-01-19 15:20:45 +0000 | |
commit | 178858f1bd4f0661f355d17058d87f8c56a4c0c1 (patch) | |
tree | 2889df07300034e8567911e7cf4cad7786e2e762 /Eigen/src/Sparse/SparseUtil.h | |
parent | 385fd3d918024f0e954b40b1b729887b16f43788 (diff) |
add a flexible sparse matrix class designed for fast matrix assembly
Diffstat (limited to 'Eigen/src/Sparse/SparseUtil.h')
-rw-r--r-- | Eigen/src/Sparse/SparseUtil.h | 40 |
1 files changed, 23 insertions, 17 deletions
diff --git a/Eigen/src/Sparse/SparseUtil.h b/Eigen/src/Sparse/SparseUtil.h index 286954fd6..18d0ee238 100644 --- a/Eigen/src/Sparse/SparseUtil.h +++ b/Eigen/src/Sparse/SparseUtil.h @@ -102,30 +102,36 @@ enum { template<typename Derived> class SparseMatrixBase; template<typename _Scalar, int _Flags = 0> class SparseMatrix; +template<typename _Scalar, int _Flags = 0> class DynamicSparseMatrix; template<typename _Scalar, int _Flags = 0> class SparseVector; template<typename _Scalar, int _Flags = 0> class MappedSparseMatrix; -template<typename MatrixType> class SparseTranspose; -template<typename MatrixType> class SparseInnerVector; -template<typename Derived> class SparseCwise; -template<typename UnaryOp, typename MatrixType> class SparseCwiseUnaryOp; -template<typename BinaryOp, typename Lhs, typename Rhs> class SparseCwiseBinaryOp; -template<typename ExpressionType, unsigned int Added, unsigned int Removed> class SparseFlagged; +template<typename MatrixType> class SparseTranspose; +template<typename MatrixType> class SparseInnerVector; +template<typename Derived> class SparseCwise; +template<typename UnaryOp, typename MatrixType> class SparseCwiseUnaryOp; +template<typename BinaryOp, typename Lhs, typename Rhs> class SparseCwiseBinaryOp; +template<typename ExpressionType, + unsigned int Added, unsigned int Removed> class SparseFlagged; template<typename Lhs, typename Rhs> struct ei_sparse_product_mode; template<typename Lhs, typename Rhs, int ProductMode = ei_sparse_product_mode<Lhs,Rhs>::value> struct SparseProductReturnType; -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 - ? AccessPatternSupported - : AccessPatternNotSupported - }; -}; +const int CoherentAccessPattern = 0x1; +const int InnerRandomAccessPattern = 0x2 | CoherentAccessPattern; +const int OuterRandomAccessPattern = 0x4 | CoherentAccessPattern; +const int RandomAccessPattern = 0x8 | OuterRandomAccessPattern | InnerRandomAccessPattern; + +// 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 +// ? AccessPatternSupported +// : AccessPatternNotSupported +// }; +// }; template<typename T> class ei_eval<T,IsSparse> { |