diff options
Diffstat (limited to 'Eigen/src/Sparse')
-rw-r--r-- | Eigen/src/Sparse/DynamicSparseMatrix.h | 2 | ||||
-rw-r--r-- | Eigen/src/Sparse/SparseMatrix.h | 2 | ||||
-rw-r--r-- | Eigen/src/Sparse/SparseVector.h | 2 | ||||
-rw-r--r-- | Eigen/src/Sparse/SparseView.h | 9 |
4 files changed, 10 insertions, 5 deletions
diff --git a/Eigen/src/Sparse/DynamicSparseMatrix.h b/Eigen/src/Sparse/DynamicSparseMatrix.h index 69e1f55ba..620f09289 100644 --- a/Eigen/src/Sparse/DynamicSparseMatrix.h +++ b/Eigen/src/Sparse/DynamicSparseMatrix.h @@ -54,7 +54,7 @@ struct ei_traits<DynamicSparseMatrix<_Scalar, _Flags, _Index> > ColsAtCompileTime = Dynamic, MaxRowsAtCompileTime = Dynamic, MaxColsAtCompileTime = Dynamic, - Flags = _Flags | NestByRefBit, + Flags = _Flags | NestByRefBit | LvalueBit, CoeffReadCost = NumTraits<Scalar>::ReadCost, SupportedAccessPatterns = OuterRandomAccessPattern }; diff --git a/Eigen/src/Sparse/SparseMatrix.h b/Eigen/src/Sparse/SparseMatrix.h index ecf8efbe7..820cf2884 100644 --- a/Eigen/src/Sparse/SparseMatrix.h +++ b/Eigen/src/Sparse/SparseMatrix.h @@ -54,7 +54,7 @@ struct ei_traits<SparseMatrix<_Scalar, _Options, _Index> > ColsAtCompileTime = Dynamic, MaxRowsAtCompileTime = Dynamic, MaxColsAtCompileTime = Dynamic, - Flags = _Options | NestByRefBit, + Flags = _Options | NestByRefBit | LvalueBit, CoeffReadCost = NumTraits<Scalar>::ReadCost, SupportedAccessPatterns = InnerRandomAccessPattern }; diff --git a/Eigen/src/Sparse/SparseVector.h b/Eigen/src/Sparse/SparseVector.h index dfe79a3b2..c5d0a6981 100644 --- a/Eigen/src/Sparse/SparseVector.h +++ b/Eigen/src/Sparse/SparseVector.h @@ -48,7 +48,7 @@ struct ei_traits<SparseVector<_Scalar, _Options, _Index> > ColsAtCompileTime = IsColVector ? 1 : Dynamic, MaxRowsAtCompileTime = RowsAtCompileTime, MaxColsAtCompileTime = ColsAtCompileTime, - Flags = _Options | NestByRefBit, + Flags = _Options | NestByRefBit | LvalueBit, CoeffReadCost = NumTraits<Scalar>::ReadCost, SupportedAccessPatterns = InnerRandomAccessPattern }; diff --git a/Eigen/src/Sparse/SparseView.h b/Eigen/src/Sparse/SparseView.h index 3b656d5c8..5a152b255 100644 --- a/Eigen/src/Sparse/SparseView.h +++ b/Eigen/src/Sparse/SparseView.h @@ -31,18 +31,23 @@ struct ei_traits<SparseView<MatrixType> > : ei_traits<MatrixType> { typedef int Index; typedef Sparse StorageKind; + enum { + Flags = int(ei_traits<MatrixType>::Flags) & (RowMajorBit) + }; }; template<typename MatrixType> class SparseView : public SparseMatrixBase<SparseView<MatrixType> > { typedef typename MatrixType::Nested MatrixTypeNested; + typedef typename ei_cleantype<MatrixTypeNested>::type _MatrixTypeNested; public: EIGEN_SPARSE_PUBLIC_INTERFACE(SparseView) SparseView(const MatrixType& mat, const Scalar& m_reference = Scalar(0), typename NumTraits<Scalar>::Real m_epsilon = NumTraits<Scalar>::dummy_precision()) : m_matrix(mat), m_reference(m_reference), m_epsilon(m_epsilon) {} + class InnerIterator; inline Index rows() const { return m_matrix.rows(); } @@ -58,10 +63,10 @@ protected: }; template<typename MatrixType> -class SparseView<MatrixType>::InnerIterator : public MatrixTypeNested::InnerIterator +class SparseView<MatrixType>::InnerIterator : public _MatrixTypeNested::InnerIterator { public: - typedef typename MatrixTypeNested::InnerIterator IterBase; + typedef typename _MatrixTypeNested::InnerIterator IterBase; InnerIterator(const SparseView& view, Index outer) : IterBase(view.m_matrix, outer), m_view(view) { |