diff options
author | Christoph Hertzberg <chtz@informatik.uni-bremen.de> | 2014-12-04 22:48:53 +0100 |
---|---|---|
committer | Christoph Hertzberg <chtz@informatik.uni-bremen.de> | 2014-12-04 22:48:53 +0100 |
commit | e8cdbedefb1913b5a0e2f2b7d38470f081cb8d29 (patch) | |
tree | b64cb33df57f4cfcd87bf42643279629dc0900d3 /Eigen/src/SparseCore/SparseTranspose.h | |
parent | 6ccf97f3e6ce39c210e225ba7aae66da15b71660 (diff) |
bug #877, bug #572: Introduce a global Index typedef. Rename Sparse*::Index to StorageIndex, make Dense*::StorageIndex an alias to DenseIndex. Overall this commit gets rid of all Index conversion warnings.
Diffstat (limited to 'Eigen/src/SparseCore/SparseTranspose.h')
-rw-r--r-- | Eigen/src/SparseCore/SparseTranspose.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Eigen/src/SparseCore/SparseTranspose.h b/Eigen/src/SparseCore/SparseTranspose.h index c3d2d1a16..c74af46b3 100644 --- a/Eigen/src/SparseCore/SparseTranspose.h +++ b/Eigen/src/SparseCore/SparseTranspose.h @@ -20,7 +20,7 @@ template<typename MatrixType> class TransposeImpl<MatrixType,Sparse> protected: typedef SparseMatrixBase<Transpose<MatrixType> > Base; public: - inline typename MatrixType::Index nonZeros() const { return Base::derived().nestedExpression().nonZeros(); } + inline typename MatrixType::StorageIndex nonZeros() const { return Base::derived().nestedExpression().nonZeros(); } }; namespace internal { @@ -33,28 +33,28 @@ struct unary_evaluator<Transpose<ArgType>, IteratorBased> typedef typename evaluator<ArgType>::ReverseInnerIterator EvalReverseIterator; public: typedef Transpose<ArgType> XprType; - typedef typename XprType::Index Index; + typedef typename XprType::StorageIndex StorageIndex; class InnerIterator : public EvalIterator { public: - EIGEN_STRONG_INLINE InnerIterator(const unary_evaluator& unaryOp, typename XprType::Index outer) + EIGEN_STRONG_INLINE InnerIterator(const unary_evaluator& unaryOp, Index outer) : EvalIterator(unaryOp.m_argImpl,outer) {} - Index row() const { return EvalIterator::col(); } - Index col() const { return EvalIterator::row(); } + StorageIndex row() const { return EvalIterator::col(); } + StorageIndex col() const { return EvalIterator::row(); } }; class ReverseInnerIterator : public EvalReverseIterator { public: - EIGEN_STRONG_INLINE ReverseInnerIterator(const unary_evaluator& unaryOp, typename XprType::Index outer) + EIGEN_STRONG_INLINE ReverseInnerIterator(const unary_evaluator& unaryOp, Index outer) : EvalReverseIterator(unaryOp.m_argImpl,outer) {} - Index row() const { return EvalReverseIterator::col(); } - Index col() const { return EvalReverseIterator::row(); } + StorageIndex row() const { return EvalReverseIterator::col(); } + StorageIndex col() const { return EvalReverseIterator::row(); } }; enum { |