diff options
Diffstat (limited to 'Eigen/src')
-rw-r--r-- | Eigen/src/Core/util/Macros.h | 9 | ||||
-rw-r--r-- | Eigen/src/SparseCore/SparseBlock.h | 11 | ||||
-rw-r--r-- | Eigen/src/SparseCore/SparseCompressedBase.h | 2 | ||||
-rw-r--r-- | Eigen/src/SparseCore/SparseCwiseBinaryOp.h | 1 | ||||
-rw-r--r-- | Eigen/src/SparseCore/SparseMap.h | 4 | ||||
-rw-r--r-- | Eigen/src/SparseCore/SparseMatrix.h | 5 | ||||
-rw-r--r-- | Eigen/src/SparseCore/SparseRef.h | 6 | ||||
-rw-r--r-- | Eigen/src/SparseCore/SparseTriangularView.h | 3 | ||||
-rw-r--r-- | Eigen/src/SparseCore/SparseUtil.h | 21 | ||||
-rw-r--r-- | Eigen/src/SparseCore/SparseVector.h | 4 | ||||
-rw-r--r-- | Eigen/src/SparseCore/SparseView.h | 1 |
11 files changed, 31 insertions, 36 deletions
diff --git a/Eigen/src/Core/util/Macros.h b/Eigen/src/Core/util/Macros.h index abc69f866..f9741e5c6 100644 --- a/Eigen/src/Core/util/Macros.h +++ b/Eigen/src/Core/util/Macros.h @@ -761,16 +761,17 @@ namespace Eigen { Flags = Eigen::internal::traits<Derived>::Flags, \ SizeAtCompileTime = Base::SizeAtCompileTime, \ MaxSizeAtCompileTime = Base::MaxSizeAtCompileTime, \ - IsVectorAtCompileTime = Base::IsVectorAtCompileTime }; + IsVectorAtCompileTime = Base::IsVectorAtCompileTime }; \ + using Base::derived; \ + using Base::const_cast_derived; #define EIGEN_DENSE_PUBLIC_INTERFACE(Derived) \ EIGEN_GENERIC_PUBLIC_INTERFACE(Derived) \ typedef typename Base::PacketScalar PacketScalar; \ enum { MaxRowsAtCompileTime = Eigen::internal::traits<Derived>::MaxRowsAtCompileTime, \ - MaxColsAtCompileTime = Eigen::internal::traits<Derived>::MaxColsAtCompileTime}; \ - using Base::derived; \ - using Base::const_cast_derived; + MaxColsAtCompileTime = Eigen::internal::traits<Derived>::MaxColsAtCompileTime}; + #define EIGEN_PLAIN_ENUM_MIN(a,b) (((int)a <= (int)b) ? (int)a : (int)b) #define EIGEN_PLAIN_ENUM_MAX(a,b) (((int)a >= (int)b) ? (int)a : (int)b) diff --git a/Eigen/src/SparseCore/SparseBlock.h b/Eigen/src/SparseCore/SparseBlock.h index 202bf9a12..10be84856 100644 --- a/Eigen/src/SparseCore/SparseBlock.h +++ b/Eigen/src/SparseCore/SparseBlock.h @@ -23,6 +23,8 @@ public: enum { IsRowMajor = internal::traits<BlockType>::IsRowMajor };
protected:
enum { OuterSize = IsRowMajor ? BlockRows : BlockCols };
+ typedef SparseMatrixBase<BlockType> Base;
+ using Base::convert_index;
public:
EIGEN_SPARSE_PUBLIC_INTERFACE(BlockType)
@@ -88,10 +90,11 @@ class sparse_matrix_block_impl {
typedef typename internal::remove_all<typename SparseMatrixType::Nested>::type _MatrixTypeNested;
typedef Block<SparseMatrixType, BlockRows, BlockCols, true> BlockType;
+ typedef SparseCompressedBase<Block<SparseMatrixType,BlockRows,BlockCols,true> > Base;
+ using Base::convert_index;
public:
enum { IsRowMajor = internal::traits<BlockType>::IsRowMajor };
- typedef SparseCompressedBase<Block<SparseMatrixType,BlockRows,BlockCols,true> > Base;
- _EIGEN_SPARSE_PUBLIC_INTERFACE(BlockType)
+ EIGEN_SPARSE_PUBLIC_INTERFACE(BlockType)
protected:
typedef typename Base::IndexVector IndexVector;
enum { OuterSize = IsRowMajor ? BlockRows : BlockCols };
@@ -359,7 +362,9 @@ template<typename XprType, int BlockRows, int BlockCols, bool InnerPanel> class BlockImpl<XprType,BlockRows,BlockCols,InnerPanel,Sparse>
: public SparseMatrixBase<Block<XprType,BlockRows,BlockCols,InnerPanel> >, internal::no_assignment_operator
{
- typedef Block<XprType, BlockRows, BlockCols, InnerPanel> BlockType;
+ typedef Block<XprType, BlockRows, BlockCols, InnerPanel> BlockType;
+ typedef SparseMatrixBase<BlockType> Base;
+ using Base::convert_index;
public:
enum { IsRowMajor = internal::traits<BlockType>::IsRowMajor };
EIGEN_SPARSE_PUBLIC_INTERFACE(BlockType)
diff --git a/Eigen/src/SparseCore/SparseCompressedBase.h b/Eigen/src/SparseCore/SparseCompressedBase.h index ad3085a55..97ca44761 100644 --- a/Eigen/src/SparseCore/SparseCompressedBase.h +++ b/Eigen/src/SparseCore/SparseCompressedBase.h @@ -28,7 +28,7 @@ class SparseCompressedBase { public: typedef SparseMatrixBase<Derived> Base; - _EIGEN_SPARSE_PUBLIC_INTERFACE(SparseCompressedBase) + EIGEN_SPARSE_PUBLIC_INTERFACE(SparseCompressedBase) using Base::operator=; using Base::IsRowMajor; diff --git a/Eigen/src/SparseCore/SparseCwiseBinaryOp.h b/Eigen/src/SparseCore/SparseCwiseBinaryOp.h index 973b80095..b87b6b749 100644 --- a/Eigen/src/SparseCore/SparseCwiseBinaryOp.h +++ b/Eigen/src/SparseCore/SparseCwiseBinaryOp.h @@ -35,6 +35,7 @@ class CwiseBinaryOpImpl<BinaryOp, Lhs, Rhs, Sparse> { public: typedef CwiseBinaryOp<BinaryOp, Lhs, Rhs> Derived; + typedef SparseMatrixBase<Derived> Base; EIGEN_SPARSE_PUBLIC_INTERFACE(Derived) CwiseBinaryOpImpl() { diff --git a/Eigen/src/SparseCore/SparseMap.h b/Eigen/src/SparseCore/SparseMap.h index 349927905..36c09ab0c 100644 --- a/Eigen/src/SparseCore/SparseMap.h +++ b/Eigen/src/SparseCore/SparseMap.h @@ -191,7 +191,7 @@ class Map<SparseMatrix<MatScalar,MatOptions,MatIndex>, Options, StrideType> { public: typedef SparseMapBase<Map> Base; - _EIGEN_SPARSE_PUBLIC_INTERFACE(Map) + EIGEN_SPARSE_PUBLIC_INTERFACE(Map) enum { IsRowMajor = Base::IsRowMajor }; public: @@ -211,7 +211,7 @@ class Map<const SparseMatrix<MatScalar,MatOptions,MatIndex>, Options, StrideType { public: typedef SparseMapBase<Map> Base; - _EIGEN_SPARSE_PUBLIC_INTERFACE(Map) + EIGEN_SPARSE_PUBLIC_INTERFACE(Map) enum { IsRowMajor = Base::IsRowMajor }; public: diff --git a/Eigen/src/SparseCore/SparseMatrix.h b/Eigen/src/SparseCore/SparseMatrix.h index 14b196480..4cf3145fd 100644 --- a/Eigen/src/SparseCore/SparseMatrix.h +++ b/Eigen/src/SparseCore/SparseMatrix.h @@ -92,11 +92,12 @@ template<typename _Scalar, int _Options, typename _Index> class SparseMatrix : public SparseCompressedBase<SparseMatrix<_Scalar, _Options, _Index> > { - public: typedef SparseCompressedBase<SparseMatrix> Base; + using Base::convert_index; + public: using Base::isCompressed; using Base::nonZeros; - _EIGEN_SPARSE_PUBLIC_INTERFACE(SparseMatrix) + EIGEN_SPARSE_PUBLIC_INTERFACE(SparseMatrix) using Base::operator+=; using Base::operator-=; diff --git a/Eigen/src/SparseCore/SparseRef.h b/Eigen/src/SparseCore/SparseRef.h index 262fd9aef..e10bf6878 100644 --- a/Eigen/src/SparseCore/SparseRef.h +++ b/Eigen/src/SparseCore/SparseRef.h @@ -58,7 +58,7 @@ template<typename Derived> class SparseRefBase public: typedef SparseMapBase<Derived> Base; - _EIGEN_SPARSE_PUBLIC_INTERFACE(SparseRefBase) + EIGEN_SPARSE_PUBLIC_INTERFACE(SparseRefBase) SparseRefBase() : Base(RowsAtCompileTime==Dynamic?0:RowsAtCompileTime,ColsAtCompileTime==Dynamic?0:ColsAtCompileTime, 0, 0, 0, 0, 0) @@ -104,7 +104,7 @@ class Ref<SparseMatrix<MatScalar,MatOptions,MatIndex>, Options, StrideType > public: typedef internal::SparseRefBase<Ref> Base; - _EIGEN_SPARSE_PUBLIC_INTERFACE(Ref) + EIGEN_SPARSE_PUBLIC_INTERFACE(Ref) #ifndef EIGEN_PARSED_BY_DOXYGEN @@ -148,7 +148,7 @@ class Ref<const SparseMatrix<MatScalar,MatOptions,MatIndex>, Options, StrideType public: typedef internal::SparseRefBase<Ref> Base; - _EIGEN_SPARSE_PUBLIC_INTERFACE(Ref) + EIGEN_SPARSE_PUBLIC_INTERFACE(Ref) template<typename Derived> inline Ref(const SparseMatrixBase<Derived>& expr) diff --git a/Eigen/src/SparseCore/SparseTriangularView.h b/Eigen/src/SparseCore/SparseTriangularView.h index 3d9946149..57d88893e 100644 --- a/Eigen/src/SparseCore/SparseTriangularView.h +++ b/Eigen/src/SparseCore/SparseTriangularView.h @@ -34,10 +34,11 @@ template<typename MatrixType, unsigned int Mode> class TriangularViewImpl<Matrix typedef TriangularView<MatrixType,Mode> TriangularViewType; -protected: + protected: // dummy solve function to make TriangularView happy. void solve() const; + typedef SparseMatrixBase<TriangularViewType> Base; public: EIGEN_SPARSE_PUBLIC_INTERFACE(TriangularViewType) diff --git a/Eigen/src/SparseCore/SparseUtil.h b/Eigen/src/SparseCore/SparseUtil.h index d53a9cb17..75c604f79 100644 --- a/Eigen/src/SparseCore/SparseUtil.h +++ b/Eigen/src/SparseCore/SparseUtil.h @@ -39,26 +39,11 @@ EIGEN_STRONG_INLINE Derived& operator Op(const Other& scalar) \ #define EIGEN_SPARSE_INHERIT_ASSIGNMENT_OPERATORS(Derived) \ EIGEN_SPARSE_INHERIT_ASSIGNMENT_OPERATOR(Derived, =) -// TODO this is mostly the same as EIGEN_GENERIC_PUBLIC_INTERFACE -#define _EIGEN_SPARSE_PUBLIC_INTERFACE(Derived) \ - typedef typename Eigen::internal::traits<Derived >::Scalar Scalar; \ - typedef typename Eigen::NumTraits<Scalar>::Real RealScalar; \ - typedef typename Eigen::internal::ref_selector<Derived >::type Nested; \ - typedef typename Eigen::internal::traits<Derived >::StorageKind StorageKind; \ - typedef typename Eigen::internal::traits<Derived >::StorageIndex StorageIndex; \ - enum { RowsAtCompileTime = Eigen::internal::traits<Derived >::RowsAtCompileTime, \ - ColsAtCompileTime = Eigen::internal::traits<Derived >::ColsAtCompileTime, \ - Flags = Eigen::internal::traits<Derived>::Flags, \ - SizeAtCompileTime = Base::SizeAtCompileTime, \ - IsVectorAtCompileTime = Base::IsVectorAtCompileTime }; \ - using Base::derived; \ - using Base::const_cast_derived; \ - using Base::convert_index; - + #define EIGEN_SPARSE_PUBLIC_INTERFACE(Derived) \ - typedef Eigen::SparseMatrixBase<Derived > Base; \ - _EIGEN_SPARSE_PUBLIC_INTERFACE(Derived) + EIGEN_GENERIC_PUBLIC_INTERFACE(Derived) + const int CoherentAccessPattern = 0x1; const int InnerRandomAccessPattern = 0x2 | CoherentAccessPattern; const int OuterRandomAccessPattern = 0x4 | CoherentAccessPattern; diff --git a/Eigen/src/SparseCore/SparseVector.h b/Eigen/src/SparseCore/SparseVector.h index 38b5a53df..f941fa5e1 100644 --- a/Eigen/src/SparseCore/SparseVector.h +++ b/Eigen/src/SparseCore/SparseVector.h @@ -66,9 +66,9 @@ class SparseVector : public SparseCompressedBase<SparseVector<_Scalar, _Options, _StorageIndex> > { typedef SparseCompressedBase<SparseVector> Base; - + using Base::convert_index; public: - _EIGEN_SPARSE_PUBLIC_INTERFACE(SparseVector) + EIGEN_SPARSE_PUBLIC_INTERFACE(SparseVector) EIGEN_SPARSE_INHERIT_ASSIGNMENT_OPERATOR(SparseVector, +=) EIGEN_SPARSE_INHERIT_ASSIGNMENT_OPERATOR(SparseVector, -=) diff --git a/Eigen/src/SparseCore/SparseView.h b/Eigen/src/SparseCore/SparseView.h index 761e72038..c945c4dab 100644 --- a/Eigen/src/SparseCore/SparseView.h +++ b/Eigen/src/SparseCore/SparseView.h @@ -32,6 +32,7 @@ class SparseView : public SparseMatrixBase<SparseView<MatrixType> > { typedef typename MatrixType::Nested MatrixTypeNested; typedef typename internal::remove_all<MatrixTypeNested>::type _MatrixTypeNested; + typedef SparseMatrixBase<SparseView > Base; public: EIGEN_SPARSE_PUBLIC_INTERFACE(SparseView) typedef typename internal::remove_all<MatrixType>::type NestedExpression; |