diff options
author | Gael Guennebaud <g.gael@free.fr> | 2012-09-27 09:22:10 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2012-09-27 09:22:10 +0200 |
commit | 1b004d579469e83d0af607e9083c680c55025694 (patch) | |
tree | c4bdb5fed4105decacb02e8e5c0584841488b1f4 /Eigen/src/SparseCore/SparseUtil.h | |
parent | b648484dbaa53c4651760e87657bf5113d19370b (diff) |
fix SparseMatrix option bit flag in eval<> helper
Diffstat (limited to 'Eigen/src/SparseCore/SparseUtil.h')
-rw-r--r-- | Eigen/src/SparseCore/SparseUtil.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Eigen/src/SparseCore/SparseUtil.h b/Eigen/src/SparseCore/SparseUtil.h index 6062a086f..a686e08da 100644 --- a/Eigen/src/SparseCore/SparseUtil.h +++ b/Eigen/src/SparseCore/SparseUtil.h @@ -113,9 +113,10 @@ template<typename T,int Rows> struct sparse_eval<T,Rows,1> { template<typename T,int Rows,int Cols> struct sparse_eval { typedef typename traits<T>::Scalar _Scalar; - enum { _Flags = traits<T>::Flags }; + typedef typename traits<T>::Index _Index; + enum { _Options = ((traits<T>::Flags&RowMajorBit)==RowMajorBit) ? RowMajor : ColMajor }; public: - typedef SparseMatrix<_Scalar, _Flags> type; + typedef SparseMatrix<_Scalar, _Options, _Index> type; }; template<typename T> struct sparse_eval<T,1,1> { |