From 4ba872bd75ab54a59c0c30e9d9828f9cbfa2b7be Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 4 Aug 2021 22:41:52 +0000 Subject: [PATCH] Avoid leading underscore followed by cap in template identifiers --- Eigen/src/Cholesky/LDLT.h | 42 +++--- Eigen/src/Cholesky/LLT.h | 44 +++---- Eigen/src/CholmodSupport/CholmodSupport.h | 98 +++++++------- Eigen/src/Core/Array.h | 12 +- Eigen/src/Core/BandMatrix.h | 80 ++++++------ Eigen/src/Core/DenseStorage.h | 120 +++++++++--------- Eigen/src/Core/Diagonal.h | 6 +- Eigen/src/Core/DiagonalMatrix.h | 30 ++--- Eigen/src/Core/Matrix.h | 58 ++++----- Eigen/src/Core/NumTraits.h | 12 +- Eigen/src/Core/PermutationMatrix.h | 52 ++++---- Eigen/src/Core/PlainObjectBase.h | 10 +- Eigen/src/Core/Product.h | 18 +-- Eigen/src/Core/ProductEvaluators.h | 12 +- Eigen/src/Core/Redux.h | 8 +- Eigen/src/Core/Ref.h | 12 +- Eigen/src/Core/SelfAdjointView.h | 6 +- Eigen/src/Core/StlIterators.h | 18 +-- Eigen/src/Core/Stride.h | 10 +- Eigen/src/Core/Transpositions.h | 38 +++--- Eigen/src/Core/TriangularMatrix.h | 31 ++--- .../Core/products/GeneralBlockPanelKernel.h | 64 +++++----- Eigen/src/Core/products/GeneralMatrixMatrix.h | 32 ++--- Eigen/src/Core/products/GeneralMatrixVector.h | 8 +- Eigen/src/Core/util/BlasUtil.h | 10 +- Eigen/src/Core/util/Constants.h | 2 +- Eigen/src/Core/util/ForwardDeclarations.h | 46 +++---- Eigen/src/Core/util/XprHelper.h | 40 +++--- Eigen/src/Eigenvalues/ComplexEigenSolver.h | 8 +- Eigen/src/Eigenvalues/ComplexSchur.h | 12 +- Eigen/src/Eigenvalues/EigenSolver.h | 8 +- .../src/Eigenvalues/GeneralizedEigenSolver.h | 8 +- .../GeneralizedSelfAdjointEigenSolver.h | 12 +- .../src/Eigenvalues/HessenbergDecomposition.h | 8 +- Eigen/src/Eigenvalues/RealQZ.h | 6 +- Eigen/src/Eigenvalues/RealSchur.h | 6 +- .../src/Eigenvalues/SelfAdjointEigenSolver.h | 16 +-- Eigen/src/Eigenvalues/Tridiagonalization.h | 8 +- Eigen/src/Geometry/AlignedBox.h | 8 +- Eigen/src/Geometry/AngleAxis.h | 14 +- Eigen/src/Geometry/Homogeneous.h | 6 +- Eigen/src/Geometry/Hyperplane.h | 10 +- Eigen/src/Geometry/ParametrizedLine.h | 42 +++--- Eigen/src/Geometry/Quaternion.h | 70 +++++----- Eigen/src/Geometry/Rotation2D.h | 14 +- Eigen/src/Geometry/RotationBase.h | 16 +-- Eigen/src/Geometry/Scaling.h | 6 +- Eigen/src/Geometry/Transform.h | 30 ++--- Eigen/src/Geometry/Translation.h | 12 +- Eigen/src/Householder/HouseholderSequence.h | 2 +- .../BasicPreconditioners.h | 16 +-- Eigen/src/IterativeLinearSolvers/BiCGSTAB.h | 24 ++-- .../ConjugateGradient.h | 32 ++--- .../IncompleteCholesky.h | 28 ++-- .../IterativeLinearSolvers/IncompleteLUT.h | 16 +-- .../LeastSquareConjugateGradient.h | 24 ++-- Eigen/src/KLUSupport/KLUSupport.h | 10 +- Eigen/src/LU/FullPivLU.h | 36 +++--- Eigen/src/LU/PartialPivLU.h | 14 +- Eigen/src/PaStiXSupport/PaStiXSupport.h | 74 +++++------ Eigen/src/PardisoSupport/PardisoSupport.h | 54 ++++---- Eigen/src/QR/ColPivHouseholderQR.h | 20 +-- .../src/QR/CompleteOrthogonalDecomposition.h | 20 +-- Eigen/src/QR/FullPivHouseholderQR.h | 20 +-- Eigen/src/QR/HouseholderQR.h | 20 +-- Eigen/src/SPQRSupport/SuiteSparseQRSupport.h | 16 +-- Eigen/src/SVD/BDCSVD.h | 18 +-- Eigen/src/SVD/JacobiSVD.h | 20 +-- Eigen/src/SVD/UpperBidiagonalization.h | 12 +- Eigen/src/SparseCholesky/SimplicialCholesky.h | 66 +++++----- Eigen/src/SparseCore/AmbiVector.h | 40 +++--- Eigen/src/SparseCore/CompressedStorage.h | 6 +- Eigen/src/SparseCore/MappedSparseMatrix.h | 20 +-- Eigen/src/SparseCore/SparseBlock.h | 36 +++--- Eigen/src/SparseCore/SparseDenseProduct.h | 4 +- Eigen/src/SparseCore/SparseMatrix.h | 82 ++++++------ Eigen/src/SparseCore/SparseProduct.h | 4 +- Eigen/src/SparseCore/SparseRedux.h | 12 +- Eigen/src/SparseCore/SparseRef.h | 24 ++-- Eigen/src/SparseCore/SparseSelfAdjointView.h | 12 +- Eigen/src/SparseCore/SparseUtil.h | 40 +++--- Eigen/src/SparseCore/SparseVector.h | 32 ++--- Eigen/src/SparseLU/SparseLU.h | 24 ++-- .../src/SparseLU/SparseLU_SupernodalMatrix.h | 6 +- Eigen/src/SparseQR/SparseQR.h | 14 +- Eigen/src/SuperLUSupport/SuperLUSupport.h | 24 ++-- Eigen/src/UmfPackSupport/UmfPackSupport.h | 10 +- Eigen/src/misc/Image.h | 6 +- Eigen/src/misc/Kernel.h | 6 +- demos/opengl/gpuhelper.h | 56 ++++---- demos/opengl/quaternion_demo.cpp | 4 +- doc/InsideEigenExample.dox | 4 +- test/swap.cpp | 6 +- unsupported/Eigen/AlignedVector3 | 20 +-- .../Eigen/CXX11/src/Tensor/TensorTraits.h | 12 +- .../TensorSymmetry/util/TemplateGroupTheory.h | 8 +- unsupported/Eigen/FFT | 12 +- unsupported/Eigen/src/BVH/KdBVH.h | 12 +- .../Eigen/src/EulerAngles/EulerAngles.h | 16 +-- .../Eigen/src/EulerAngles/EulerSystem.h | 4 +- unsupported/Eigen/src/FFT/ei_fftw_impl.h | 4 +- unsupported/Eigen/src/FFT/ei_kissfft_impl.h | 12 +- .../Eigen/src/IterativeSolvers/DGMRES.h | 52 ++++---- .../Eigen/src/IterativeSolvers/GMRES.h | 24 ++-- unsupported/Eigen/src/IterativeSolvers/IDRS.h | 22 ++-- .../Eigen/src/IterativeSolvers/IncompleteLU.h | 8 +- .../Eigen/src/IterativeSolvers/MINRES.h | 28 ++-- .../Eigen/src/IterativeSolvers/Scaling.h | 6 +- .../KroneckerProduct/KroneckerTensorProduct.h | 16 +-- .../Eigen/src/LevenbergMarquardt/LMqrsolv.h | 4 +- .../LevenbergMarquardt/LevenbergMarquardt.h | 14 +- .../Eigen/src/NumericalDiff/NumericalDiff.h | 6 +- unsupported/Eigen/src/Polynomials/Companion.h | 22 ++-- .../Eigen/src/Polynomials/PolynomialSolver.h | 32 ++--- .../Eigen/src/Skyline/SkylineInplaceLU.h | 2 +- unsupported/Eigen/src/Skyline/SkylineMatrix.h | 32 ++--- .../Eigen/src/Skyline/SkylineProduct.h | 38 +++--- unsupported/Eigen/src/Skyline/SkylineUtil.h | 12 +- .../SparseExtra/BlockOfDynamicSparseMatrix.h | 10 +- .../Eigen/src/SparseExtra/BlockSparseMatrix.h | 38 +++--- .../src/SparseExtra/DynamicSparseMatrix.h | 42 +++--- unsupported/Eigen/src/Splines/Spline.h | 98 +++++++------- unsupported/Eigen/src/Splines/SplineFwd.h | 18 +-- unsupported/test/NonLinearOptimization.cpp | 4 +- unsupported/test/NumericalDiff.cpp | 4 +- unsupported/test/autodiff.cpp | 4 +- unsupported/test/forward_adolc.cpp | 4 +- unsupported/test/polynomialsolver.cpp | 10 +- unsupported/test/polynomialutils.cpp | 58 ++++----- 129 files changed, 1481 insertions(+), 1480 deletions(-) diff --git a/Eigen/src/Cholesky/LDLT.h b/Eigen/src/Cholesky/LDLT.h index 1013ca045..1dffbb6f6 100644 --- a/Eigen/src/Cholesky/LDLT.h +++ b/Eigen/src/Cholesky/LDLT.h @@ -16,8 +16,8 @@ namespace Eigen { namespace internal { - template struct traits > - : traits<_MatrixType> + template struct traits > + : traits { typedef MatrixXpr XprKind; typedef SolverStorage StorageKind; @@ -37,8 +37,8 @@ namespace internal { * * \brief Robust Cholesky decomposition of a matrix with pivoting * - * \tparam _MatrixType the type of the matrix of which to compute the LDL^T Cholesky decomposition - * \tparam _UpLo the triangular part that will be used for the decompositon: Lower (default) or Upper. + * \tparam MatrixType_ the type of the matrix of which to compute the LDL^T Cholesky decomposition + * \tparam UpLo_ the triangular part that will be used for the decomposition: Lower (default) or Upper. * The other triangular part won't be read. * * Perform a robust Cholesky decomposition of a positive semidefinite or negative semidefinite @@ -56,11 +56,11 @@ namespace internal { * * \sa MatrixBase::ldlt(), SelfAdjointView::ldlt(), class LLT */ -template class LDLT - : public SolverBase > +template class LDLT + : public SolverBase > { public: - typedef _MatrixType MatrixType; + typedef MatrixType_ MatrixType; typedef SolverBase Base; friend class SolverBase; @@ -68,7 +68,7 @@ template class LDLT enum { MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime, MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime, - UpLo = _UpLo + UpLo = UpLo_ }; typedef Matrix TmpMatrixType; @@ -494,9 +494,9 @@ template struct LDLT_Traits /** Compute / recompute the LDLT decomposition A = L D L^* = U^* D U of \a matrix */ -template +template template -LDLT& LDLT::compute(const EigenBase& a) +LDLT& LDLT::compute(const EigenBase& a) { check_template_parameters(); @@ -510,7 +510,7 @@ LDLT& LDLT::compute(const EigenBase() + m_matrix.row(col).head(col).template lpNorm<1>(); else abs_col_sum = m_matrix.col(col).head(col).template lpNorm<1>() + m_matrix.row(col).tail(size - col).template lpNorm<1>(); @@ -534,9 +534,9 @@ LDLT& LDLT::compute(const EigenBase +template template -LDLT& LDLT::rankUpdate(const MatrixBase& w, const typename LDLT::RealScalar& sigma) +LDLT& LDLT::rankUpdate(const MatrixBase& w, const typename LDLT::RealScalar& sigma) { typedef typename TranspositionType::StorageIndex IndexType; const Index size = w.rows(); @@ -562,16 +562,16 @@ LDLT& LDLT::rankUpdate(const MatrixBase +template template -void LDLT<_MatrixType,_UpLo>::_solve_impl(const RhsType &rhs, DstType &dst) const +void LDLT::_solve_impl(const RhsType &rhs, DstType &dst) const { _solve_impl_transposed(rhs, dst); } -template +template template -void LDLT<_MatrixType,_UpLo>::_solve_impl_transposed(const RhsType &rhs, DstType &dst) const +void LDLT::_solve_impl_transposed(const RhsType &rhs, DstType &dst) const { // dst = P b dst = m_transpositions * rhs; @@ -624,9 +624,9 @@ void LDLT<_MatrixType,_UpLo>::_solve_impl_transposed(const RhsType &rhs, DstType * * \sa LDLT::solve(), MatrixBase::ldlt() */ -template +template template -bool LDLT::solveInPlace(MatrixBase &bAndX) const +bool LDLT::solveInPlace(MatrixBase &bAndX) const { eigen_assert(m_isInitialized && "LDLT is not initialized."); eigen_assert(m_matrix.rows() == bAndX.rows()); @@ -639,8 +639,8 @@ bool LDLT::solveInPlace(MatrixBase &bAndX) const /** \returns the matrix represented by the decomposition, * i.e., it returns the product: P^T L D L^* P. * This function is provided for debug purpose. */ -template -MatrixType LDLT::reconstructedMatrix() const +template +MatrixType LDLT::reconstructedMatrix() const { eigen_assert(m_isInitialized && "LDLT is not initialized."); const Index size = m_matrix.rows(); diff --git a/Eigen/src/Cholesky/LLT.h b/Eigen/src/Cholesky/LLT.h index 8c9b2b398..3b7aa4d3f 100644 --- a/Eigen/src/Cholesky/LLT.h +++ b/Eigen/src/Cholesky/LLT.h @@ -14,8 +14,8 @@ namespace Eigen { namespace internal{ -template struct traits > - : traits<_MatrixType> +template struct traits > + : traits { typedef MatrixXpr XprKind; typedef SolverStorage StorageKind; @@ -32,8 +32,8 @@ template struct LLT_Traits; * * \brief Standard Cholesky decomposition (LL^T) of a matrix and associated features * - * \tparam _MatrixType the type of the matrix of which we are computing the LL^T Cholesky decomposition - * \tparam _UpLo the triangular part that will be used for the decompositon: Lower (default) or Upper. + * \tparam MatrixType_ the type of the matrix of which we are computing the LL^T Cholesky decomposition + * \tparam UpLo_ the triangular part that will be used for the decomposition: Lower (default) or Upper. * The other triangular part won't be read. * * This class performs a LL^T Cholesky decomposition of a symmetric, positive definite @@ -58,16 +58,16 @@ template struct LLT_Traits; * * This class supports the \link InplaceDecomposition inplace decomposition \endlink mechanism. * - * Note that during the decomposition, only the lower (or upper, as defined by _UpLo) triangular part of A is considered. + * Note that during the decomposition, only the lower (or upper, as defined by UpLo_) triangular part of A is considered. * Therefore, the strict lower part does not have to store correct values. * * \sa MatrixBase::llt(), SelfAdjointView::llt(), class LDLT */ -template class LLT - : public SolverBase > +template class LLT + : public SolverBase > { public: - typedef _MatrixType MatrixType; + typedef MatrixType_ MatrixType; typedef SolverBase Base; friend class SolverBase; @@ -79,7 +79,7 @@ template class LLT enum { PacketSize = internal::packet_traits::size, AlignmentMask = int(PacketSize)-1, - UpLo = _UpLo + UpLo = UpLo_ }; typedef internal::LLT_Traits Traits; @@ -427,9 +427,9 @@ template struct LLT_Traits * Example: \include TutorialLinAlgComputeTwice.cpp * Output: \verbinclude TutorialLinAlgComputeTwice.out */ -template +template template -LLT& LLT::compute(const EigenBase& a) +LLT& LLT::compute(const EigenBase& a) { check_template_parameters(); @@ -444,7 +444,7 @@ LLT& LLT::compute(const EigenBase // TODO move this code to SelfAdjointView for (Index col = 0; col < size; ++col) { RealScalar abs_col_sum; - if (_UpLo == Lower) + if (UpLo_ == Lower) abs_col_sum = m_matrix.col(col).tail(size - col).template lpNorm<1>() + m_matrix.row(col).head(col).template lpNorm<1>(); else abs_col_sum = m_matrix.col(col).head(col).template lpNorm<1>() + m_matrix.row(col).tail(size - col).template lpNorm<1>(); @@ -464,9 +464,9 @@ LLT& LLT::compute(const EigenBase * then after it we have LL^* = A + sigma * v v^* where \a v must be a vector * of same dimension. */ -template +template template -LLT<_MatrixType,_UpLo> & LLT<_MatrixType,_UpLo>::rankUpdate(const VectorType& v, const RealScalar& sigma) +LLT & LLT::rankUpdate(const VectorType& v, const RealScalar& sigma) { EIGEN_STATIC_ASSERT_VECTOR_ONLY(VectorType); eigen_assert(v.size()==m_matrix.cols()); @@ -480,16 +480,16 @@ LLT<_MatrixType,_UpLo> & LLT<_MatrixType,_UpLo>::rankUpdate(const VectorType& v, } #ifndef EIGEN_PARSED_BY_DOXYGEN -template +template template -void LLT<_MatrixType,_UpLo>::_solve_impl(const RhsType &rhs, DstType &dst) const +void LLT::_solve_impl(const RhsType &rhs, DstType &dst) const { _solve_impl_transposed(rhs, dst); } -template +template template -void LLT<_MatrixType,_UpLo>::_solve_impl_transposed(const RhsType &rhs, DstType &dst) const +void LLT::_solve_impl_transposed(const RhsType &rhs, DstType &dst) const { dst = rhs; @@ -511,9 +511,9 @@ void LLT<_MatrixType,_UpLo>::_solve_impl_transposed(const RhsType &rhs, DstType * * \sa LLT::solve(), MatrixBase::llt() */ -template +template template -void LLT::solveInPlace(const MatrixBase &bAndX) const +void LLT::solveInPlace(const MatrixBase &bAndX) const { eigen_assert(m_isInitialized && "LLT is not initialized."); eigen_assert(m_matrix.rows()==bAndX.rows()); @@ -524,8 +524,8 @@ void LLT::solveInPlace(const MatrixBase &bAndX) const /** \returns the matrix represented by the decomposition, * i.e., it returns the product: L L^*. * This function is provided for debug purpose. */ -template -MatrixType LLT::reconstructedMatrix() const +template +MatrixType LLT::reconstructedMatrix() const { eigen_assert(m_isInitialized && "LLT is not initialized."); return matrixL() * matrixL().adjoint().toDenseMatrix(); diff --git a/Eigen/src/CholmodSupport/CholmodSupport.h b/Eigen/src/CholmodSupport/CholmodSupport.h index adaf52858..817e76944 100644 --- a/Eigen/src/CholmodSupport/CholmodSupport.h +++ b/Eigen/src/CholmodSupport/CholmodSupport.h @@ -54,8 +54,8 @@ template<> struct cholmod_configure_matrix > { /** Wraps the Eigen sparse matrix \a mat into a Cholmod sparse matrix object. * Note that the data are shared. */ -template -cholmod_sparse viewAsCholmod(Ref > mat) +template +cholmod_sparse viewAsCholmod(Ref > mat) { cholmod_sparse res; res.nzmax = mat.nonZeros(); @@ -80,11 +80,11 @@ cholmod_sparse viewAsCholmod(Ref > res.dtype = 0; res.stype = -1; - if (internal::is_same<_StorageIndex,int>::value) + if (internal::is_same::value) { res.itype = CHOLMOD_INT; } - else if (internal::is_same<_StorageIndex,SuiteSparse_long>::value) + else if (internal::is_same::value) { res.itype = CHOLMOD_LONG; } @@ -94,39 +94,39 @@ cholmod_sparse viewAsCholmod(Ref > } // setup res.xtype - internal::cholmod_configure_matrix<_Scalar>::run(res); + internal::cholmod_configure_matrix::run(res); res.stype = 0; return res; } -template -const cholmod_sparse viewAsCholmod(const SparseMatrix<_Scalar,_Options,_Index>& mat) +template +const cholmod_sparse viewAsCholmod(const SparseMatrix& mat) { - cholmod_sparse res = viewAsCholmod(Ref >(mat.const_cast_derived())); + cholmod_sparse res = viewAsCholmod(Ref >(mat.const_cast_derived())); return res; } -template -const cholmod_sparse viewAsCholmod(const SparseVector<_Scalar,_Options,_Index>& mat) +template +const cholmod_sparse viewAsCholmod(const SparseVector& mat) { - cholmod_sparse res = viewAsCholmod(Ref >(mat.const_cast_derived())); + cholmod_sparse res = viewAsCholmod(Ref >(mat.const_cast_derived())); return res; } /** Returns a view of the Eigen sparse matrix \a mat as Cholmod sparse matrix. * The data are not copied but shared. */ -template -cholmod_sparse viewAsCholmod(const SparseSelfAdjointView, UpLo>& mat) +template +cholmod_sparse viewAsCholmod(const SparseSelfAdjointView, UpLo>& mat) { - cholmod_sparse res = viewAsCholmod(Ref >(mat.matrix().const_cast_derived())); + cholmod_sparse res = viewAsCholmod(Ref >(mat.matrix().const_cast_derived())); if(UpLo==Upper) res.stype = 1; if(UpLo==Lower) res.stype = -1; // swap stype for rowmajor matrices (only works for real matrices) - EIGEN_STATIC_ASSERT((_Options & RowMajorBit) == 0 || NumTraits<_Scalar>::IsComplex == 0, THIS_METHOD_IS_ONLY_FOR_COLUMN_MAJOR_MATRICES); - if(_Options & RowMajorBit) res.stype *=-1; + EIGEN_STATIC_ASSERT((Options_ & RowMajorBit) == 0 || NumTraits::IsComplex == 0, THIS_METHOD_IS_ONLY_FOR_COLUMN_MAJOR_MATRICES); + if(Options_ & RowMajorBit) res.stype *=-1; return res; } @@ -167,11 +167,11 @@ namespace internal { // template specializations for int and long that call the correct cholmod method #define EIGEN_CHOLMOD_SPECIALIZE0(ret, name) \ - template inline ret cm_ ## name (cholmod_common &Common) { return cholmod_ ## name (&Common); } \ + template inline ret cm_ ## name (cholmod_common &Common) { return cholmod_ ## name (&Common); } \ template<> inline ret cm_ ## name (cholmod_common &Common) { return cholmod_l_ ## name (&Common); } #define EIGEN_CHOLMOD_SPECIALIZE1(ret, name, t1, a1) \ - template inline ret cm_ ## name (t1& a1, cholmod_common &Common) { return cholmod_ ## name (&a1, &Common); } \ + template inline ret cm_ ## name (t1& a1, cholmod_common &Common) { return cholmod_ ## name (&a1, &Common); } \ template<> inline ret cm_ ## name (t1& a1, cholmod_common &Common) { return cholmod_l_ ## name (&a1, &Common); } EIGEN_CHOLMOD_SPECIALIZE0(int, start) @@ -183,14 +183,14 @@ EIGEN_CHOLMOD_SPECIALIZE1(int, free_sparse, cholmod_sparse*, A) EIGEN_CHOLMOD_SPECIALIZE1(cholmod_factor*, analyze, cholmod_sparse, A) -template inline cholmod_dense* cm_solve (int sys, cholmod_factor& L, cholmod_dense& B, cholmod_common &Common) { return cholmod_solve (sys, &L, &B, &Common); } +template inline cholmod_dense* cm_solve (int sys, cholmod_factor& L, cholmod_dense& B, cholmod_common &Common) { return cholmod_solve (sys, &L, &B, &Common); } template<> inline cholmod_dense* cm_solve (int sys, cholmod_factor& L, cholmod_dense& B, cholmod_common &Common) { return cholmod_l_solve (sys, &L, &B, &Common); } -template inline cholmod_sparse* cm_spsolve (int sys, cholmod_factor& L, cholmod_sparse& B, cholmod_common &Common) { return cholmod_spsolve (sys, &L, &B, &Common); } +template inline cholmod_sparse* cm_spsolve (int sys, cholmod_factor& L, cholmod_sparse& B, cholmod_common &Common) { return cholmod_spsolve (sys, &L, &B, &Common); } template<> inline cholmod_sparse* cm_spsolve (int sys, cholmod_factor& L, cholmod_sparse& B, cholmod_common &Common) { return cholmod_l_spsolve (sys, &L, &B, &Common); } -template -inline int cm_factorize_p (cholmod_sparse* A, double beta[2], _StorageIndex* fset, std::size_t fsize, cholmod_factor* L, cholmod_common &Common) { return cholmod_factorize_p (A, beta, fset, fsize, L, &Common); } +template +inline int cm_factorize_p (cholmod_sparse* A, double beta[2], StorageIndex_* fset, std::size_t fsize, cholmod_factor* L, cholmod_common &Common) { return cholmod_factorize_p (A, beta, fset, fsize, L, &Common); } template<> inline int cm_factorize_p (cholmod_sparse* A, double beta[2], SuiteSparse_long* fset, std::size_t fsize, cholmod_factor* L, cholmod_common &Common) { return cholmod_l_factorize_p (A, beta, fset, fsize, L, &Common); } @@ -210,7 +210,7 @@ enum CholmodMode { * \brief The base class for the direct Cholesky factorization of Cholmod * \sa class CholmodSupernodalLLT, class CholmodSimplicialLDLT, class CholmodSimplicialLLT */ -template +template class CholmodBase : public SparseSolverBase { protected: @@ -218,8 +218,8 @@ class CholmodBase : public SparseSolverBase using Base::derived; using Base::m_isInitialized; public: - typedef _MatrixType MatrixType; - enum { UpLo = _UpLo }; + typedef MatrixType_ MatrixType; + enum { UpLo = UpLo_ }; typedef typename MatrixType::Scalar Scalar; typedef typename MatrixType::RealScalar RealScalar; typedef MatrixType CholMatrixType; @@ -461,8 +461,8 @@ class CholmodBase : public SparseSolverBase * The sparse matrix A must be selfadjoint and positive definite. The vectors or matrices * X and B can be either dense or sparse. * - * \tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<> - * \tparam _UpLo the triangular part that will be used for the computations. It can be Lower + * \tparam MatrixType_ the type of the sparse matrix A, it must be a SparseMatrix<> + * \tparam UpLo_ the triangular part that will be used for the computations. It can be Lower * or Upper. Default is Lower. * * \implsparsesolverconcept @@ -473,15 +473,15 @@ class CholmodBase : public SparseSolverBase * * \sa \ref TutorialSparseSolverConcept, class CholmodSupernodalLLT, class SimplicialLLT */ -template -class CholmodSimplicialLLT : public CholmodBase<_MatrixType, _UpLo, CholmodSimplicialLLT<_MatrixType, _UpLo> > +template +class CholmodSimplicialLLT : public CholmodBase > { - typedef CholmodBase<_MatrixType, _UpLo, CholmodSimplicialLLT> Base; + typedef CholmodBase Base; using Base::m_cholmod; public: - typedef _MatrixType MatrixType; + typedef MatrixType_ MatrixType; CholmodSimplicialLLT() : Base() { init(); } @@ -512,8 +512,8 @@ class CholmodSimplicialLLT : public CholmodBase<_MatrixType, _UpLo, CholmodSimpl * The sparse matrix A must be selfadjoint and positive definite. The vectors or matrices * X and B can be either dense or sparse. * - * \tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<> - * \tparam _UpLo the triangular part that will be used for the computations. It can be Lower + * \tparam MatrixType_ the type of the sparse matrix A, it must be a SparseMatrix<> + * \tparam UpLo_ the triangular part that will be used for the computations. It can be Lower * or Upper. Default is Lower. * * \implsparsesolverconcept @@ -524,15 +524,15 @@ class CholmodSimplicialLLT : public CholmodBase<_MatrixType, _UpLo, CholmodSimpl * * \sa \ref TutorialSparseSolverConcept, class CholmodSupernodalLLT, class SimplicialLDLT */ -template -class CholmodSimplicialLDLT : public CholmodBase<_MatrixType, _UpLo, CholmodSimplicialLDLT<_MatrixType, _UpLo> > +template +class CholmodSimplicialLDLT : public CholmodBase > { - typedef CholmodBase<_MatrixType, _UpLo, CholmodSimplicialLDLT> Base; + typedef CholmodBase Base; using Base::m_cholmod; public: - typedef _MatrixType MatrixType; + typedef MatrixType_ MatrixType; CholmodSimplicialLDLT() : Base() { init(); } @@ -561,8 +561,8 @@ class CholmodSimplicialLDLT : public CholmodBase<_MatrixType, _UpLo, CholmodSimp * The sparse matrix A must be selfadjoint and positive definite. The vectors or matrices * X and B can be either dense or sparse. * - * \tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<> - * \tparam _UpLo the triangular part that will be used for the computations. It can be Lower + * \tparam MatrixType_ the type of the sparse matrix A, it must be a SparseMatrix<> + * \tparam UpLo_ the triangular part that will be used for the computations. It can be Lower * or Upper. Default is Lower. * * \implsparsesolverconcept @@ -573,15 +573,15 @@ class CholmodSimplicialLDLT : public CholmodBase<_MatrixType, _UpLo, CholmodSimp * * \sa \ref TutorialSparseSolverConcept */ -template -class CholmodSupernodalLLT : public CholmodBase<_MatrixType, _UpLo, CholmodSupernodalLLT<_MatrixType, _UpLo> > +template +class CholmodSupernodalLLT : public CholmodBase > { - typedef CholmodBase<_MatrixType, _UpLo, CholmodSupernodalLLT> Base; + typedef CholmodBase Base; using Base::m_cholmod; public: - typedef _MatrixType MatrixType; + typedef MatrixType_ MatrixType; CholmodSupernodalLLT() : Base() { init(); } @@ -612,8 +612,8 @@ class CholmodSupernodalLLT : public CholmodBase<_MatrixType, _UpLo, CholmodSuper * On the other hand, it does not provide access to the result of the factorization. * The default is to let Cholmod automatically choose between a simplicial and supernodal factorization. * - * \tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<> - * \tparam _UpLo the triangular part that will be used for the computations. It can be Lower + * \tparam MatrixType_ the type of the sparse matrix A, it must be a SparseMatrix<> + * \tparam UpLo_ the triangular part that will be used for the computations. It can be Lower * or Upper. Default is Lower. * * \implsparsesolverconcept @@ -624,15 +624,15 @@ class CholmodSupernodalLLT : public CholmodBase<_MatrixType, _UpLo, CholmodSuper * * \sa \ref TutorialSparseSolverConcept */ -template -class CholmodDecomposition : public CholmodBase<_MatrixType, _UpLo, CholmodDecomposition<_MatrixType, _UpLo> > +template +class CholmodDecomposition : public CholmodBase > { - typedef CholmodBase<_MatrixType, _UpLo, CholmodDecomposition> Base; + typedef CholmodBase Base; using Base::m_cholmod; public: - typedef _MatrixType MatrixType; + typedef MatrixType_ MatrixType; CholmodDecomposition() : Base() { init(); } diff --git a/Eigen/src/Core/Array.h b/Eigen/src/Core/Array.h index 20c789b10..85676ae92 100644 --- a/Eigen/src/Core/Array.h +++ b/Eigen/src/Core/Array.h @@ -13,11 +13,11 @@ namespace Eigen { namespace internal { -template -struct traits > : traits > +template +struct traits > : traits > { typedef ArrayXpr XprKind; - typedef ArrayBase > XprBase; + typedef ArrayBase > XprBase; }; } @@ -41,16 +41,16 @@ struct traits > : tra * * \sa \blank \ref TutorialArrayClass, \ref TopicClassHierarchy */ -template +template class Array - : public PlainObjectBase > + : public PlainObjectBase > { public: typedef PlainObjectBase Base; EIGEN_DENSE_PUBLIC_INTERFACE(Array) - enum { Options = _Options }; + enum { Options = Options_ }; typedef typename Base::PlainObject PlainObject; protected: diff --git a/Eigen/src/Core/BandMatrix.h b/Eigen/src/Core/BandMatrix.h index 878c0240a..590573bb8 100644 --- a/Eigen/src/Core/BandMatrix.h +++ b/Eigen/src/Core/BandMatrix.h @@ -161,12 +161,12 @@ class BandMatrixBase : public EigenBase * * \brief Represents a rectangular matrix with a banded storage * - * \tparam _Scalar Numeric type, i.e. float, double, int - * \tparam _Rows Number of rows, or \b Dynamic - * \tparam _Cols Number of columns, or \b Dynamic - * \tparam _Supers Number of super diagonal - * \tparam _Subs Number of sub diagonal - * \tparam _Options A combination of either \b #RowMajor or \b #ColMajor, and of \b #SelfAdjoint + * \tparam Scalar_ Numeric type, i.e. float, double, int + * \tparam Rows_ Number of rows, or \b Dynamic + * \tparam Cols_ Number of columns, or \b Dynamic + * \tparam Supers_ Number of super diagonal + * \tparam Subs_ Number of sub diagonal + * \tparam Options_ A combination of either \b #RowMajor or \b #ColMajor, and of \b #SelfAdjoint * The former controls \ref TopicStorageOrders "storage order", and defaults to * column-major. The latter controls whether the matrix represents a selfadjoint * matrix in which case either Supers of Subs have to be null. @@ -174,29 +174,29 @@ class BandMatrixBase : public EigenBase * \sa class TridiagonalMatrix */ -template -struct traits > +template +struct traits > { - typedef _Scalar Scalar; + typedef Scalar_ Scalar; typedef Dense StorageKind; typedef Eigen::Index StorageIndex; enum { CoeffReadCost = NumTraits::ReadCost, - RowsAtCompileTime = _Rows, - ColsAtCompileTime = _Cols, - MaxRowsAtCompileTime = _Rows, - MaxColsAtCompileTime = _Cols, + RowsAtCompileTime = Rows_, + ColsAtCompileTime = Cols_, + MaxRowsAtCompileTime = Rows_, + MaxColsAtCompileTime = Cols_, Flags = LvalueBit, - Supers = _Supers, - Subs = _Subs, - Options = _Options, + Supers = Supers_, + Subs = Subs_, + Options = Options_, DataRowsAtCompileTime = ((Supers!=Dynamic) && (Subs!=Dynamic)) ? 1 + Supers + Subs : Dynamic }; typedef Matrix CoefficientsType; }; -template -class BandMatrix : public BandMatrixBase > +template +class BandMatrix : public BandMatrixBase > { public: @@ -233,32 +233,32 @@ class BandMatrix : public BandMatrixBase m_subs; }; -template +template class BandMatrixWrapper; -template -struct traits > +template +struct traits > { typedef typename _CoefficientsType::Scalar Scalar; typedef typename _CoefficientsType::StorageKind StorageKind; typedef typename _CoefficientsType::StorageIndex StorageIndex; enum { CoeffReadCost = internal::traits<_CoefficientsType>::CoeffReadCost, - RowsAtCompileTime = _Rows, - ColsAtCompileTime = _Cols, - MaxRowsAtCompileTime = _Rows, - MaxColsAtCompileTime = _Cols, + RowsAtCompileTime = Rows_, + ColsAtCompileTime = Cols_, + MaxRowsAtCompileTime = Rows_, + MaxColsAtCompileTime = Cols_, Flags = LvalueBit, - Supers = _Supers, - Subs = _Subs, - Options = _Options, + Supers = Supers_, + Subs = Subs_, + Options = Options_, DataRowsAtCompileTime = ((Supers!=Dynamic) && (Subs!=Dynamic)) ? 1 + Supers + Subs : Dynamic }; typedef _CoefficientsType CoefficientsType; }; -template -class BandMatrixWrapper : public BandMatrixBase > +template +class BandMatrixWrapper : public BandMatrixBase > { public: @@ -266,7 +266,7 @@ class BandMatrixWrapper : public BandMatrixBase::CoefficientsType CoefficientsType; typedef typename internal::traits::StorageIndex StorageIndex; - explicit inline BandMatrixWrapper(const CoefficientsType& coeffs, Index rows=_Rows, Index cols=_Cols, Index supers=_Supers, Index subs=_Subs) + explicit inline BandMatrixWrapper(const CoefficientsType& coeffs, Index rows=Rows_, Index cols=Cols_, Index supers=Supers_, Index subs=Subs_) : m_coeffs(coeffs), m_rows(rows), m_supers(supers), m_subs(subs) { @@ -291,9 +291,9 @@ class BandMatrixWrapper : public BandMatrixBase m_rows; - internal::variable_if_dynamic m_supers; - internal::variable_if_dynamic m_subs; + internal::variable_if_dynamic m_rows; + internal::variable_if_dynamic m_supers; + internal::variable_if_dynamic m_subs; }; /** @@ -330,16 +330,16 @@ class TridiagonalMatrix : public BandMatrix -struct evaluator_traits > - : public evaluator_traits_base > +template +struct evaluator_traits > + : public evaluator_traits_base > { typedef BandShape Shape; }; -template -struct evaluator_traits > - : public evaluator_traits_base > +template +struct evaluator_traits > + : public evaluator_traits_base > { typedef BandShape Shape; }; diff --git a/Eigen/src/Core/DenseStorage.h b/Eigen/src/Core/DenseStorage.h index 08ef6c530..380508457 100644 --- a/Eigen/src/Core/DenseStorage.h +++ b/Eigen/src/Core/DenseStorage.h @@ -201,12 +201,12 @@ struct plain_array_helper { * * \sa Matrix */ -template class DenseStorage; +template class DenseStorage; // purely fixed-size matrix -template class DenseStorage +template class DenseStorage { - internal::plain_array m_data; + internal::plain_array m_data; public: EIGEN_DEVICE_FUNC DenseStorage() { EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN(Index size = Size) @@ -251,7 +251,7 @@ template class DenseSt #endif EIGEN_DEVICE_FUNC DenseStorage(Index size, Index rows, Index cols) { EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN({}) - eigen_internal_assert(size==rows*cols && rows==_Rows && cols==_Cols); + eigen_internal_assert(size==rows*cols && rows==Rows_ && cols==Cols_); EIGEN_UNUSED_VARIABLE(size); EIGEN_UNUSED_VARIABLE(rows); EIGEN_UNUSED_VARIABLE(cols); @@ -259,8 +259,8 @@ template class DenseSt EIGEN_DEVICE_FUNC void swap(DenseStorage& other) { numext::swap(m_data, other.m_data); } - EIGEN_DEVICE_FUNC static EIGEN_CONSTEXPR Index rows(void) EIGEN_NOEXCEPT {return _Rows;} - EIGEN_DEVICE_FUNC static EIGEN_CONSTEXPR Index cols(void) EIGEN_NOEXCEPT {return _Cols;} + EIGEN_DEVICE_FUNC static EIGEN_CONSTEXPR Index rows(void) EIGEN_NOEXCEPT {return Rows_;} + EIGEN_DEVICE_FUNC static EIGEN_CONSTEXPR Index cols(void) EIGEN_NOEXCEPT {return Cols_;} EIGEN_DEVICE_FUNC void conservativeResize(Index,Index,Index) {} EIGEN_DEVICE_FUNC void resize(Index,Index,Index) {} EIGEN_DEVICE_FUNC const T *data() const { return m_data.array; } @@ -268,7 +268,7 @@ template class DenseSt }; // null matrix -template class DenseStorage +template class DenseStorage { public: EIGEN_DEVICE_FUNC DenseStorage() {} @@ -277,8 +277,8 @@ template class DenseStorage class DenseStorage class DenseStorage -: public DenseStorage { }; +template class DenseStorage +: public DenseStorage { }; -template class DenseStorage -: public DenseStorage { }; +template class DenseStorage +: public DenseStorage { }; -template class DenseStorage -: public DenseStorage { }; +template class DenseStorage +: public DenseStorage { }; // dynamic-size matrix with fixed-size storage -template class DenseStorage +template class DenseStorage { - internal::plain_array m_data; + internal::plain_array m_data; Index m_rows; Index m_cols; public: @@ -336,9 +336,9 @@ template class DenseStorage class DenseStorage +template class DenseStorage { - internal::plain_array m_data; + internal::plain_array m_data; Index m_rows; public: EIGEN_DEVICE_FUNC DenseStorage() : m_rows(0) {} @@ -347,7 +347,7 @@ template class DenseStorage class DenseStorage class DenseStorage class DenseStorage +template class DenseStorage { - internal::plain_array m_data; + internal::plain_array m_data; Index m_cols; public: EIGEN_DEVICE_FUNC DenseStorage() : m_cols(0) {} @@ -385,23 +385,23 @@ template class DenseStorage class DenseStorage class DenseStorage +template class DenseStorage { T *m_data; Index m_rows; @@ -420,13 +420,13 @@ template class DenseStorage(size)), m_rows(rows), m_cols(cols) + : m_data(internal::conditional_aligned_new_auto(size)), m_rows(rows), m_cols(cols) { EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN({}) eigen_internal_assert(size==rows*cols && rows>=0 && cols >=0); } EIGEN_DEVICE_FUNC DenseStorage(const DenseStorage& other) - : m_data(internal::conditional_aligned_new_auto(other.m_rows*other.m_cols)) + : m_data(internal::conditional_aligned_new_auto(other.m_rows*other.m_cols)) , m_rows(other.m_rows) , m_cols(other.m_cols) { @@ -462,7 +462,7 @@ template class DenseStorage(m_data, m_rows*m_cols); } + EIGEN_DEVICE_FUNC ~DenseStorage() { internal::conditional_aligned_delete_auto(m_data, m_rows*m_cols); } EIGEN_DEVICE_FUNC void swap(DenseStorage& other) { numext::swap(m_data,other.m_data); @@ -473,7 +473,7 @@ template class DenseStorage(m_data, size, m_rows*m_cols); + m_data = internal::conditional_aligned_realloc_new_auto(m_data, size, m_rows*m_cols); m_rows = rows; m_cols = cols; } @@ -481,9 +481,9 @@ template class DenseStorage(m_data, m_rows*m_cols); + internal::conditional_aligned_delete_auto(m_data, m_rows*m_cols); if (size>0) // >0 and not simply !=0 to let the compiler knows that size cannot be negative - m_data = internal::conditional_aligned_new_auto(size); + m_data = internal::conditional_aligned_new_auto(size); else m_data = 0; EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN({}) @@ -496,25 +496,25 @@ template class DenseStorage class DenseStorage +template class DenseStorage { T *m_data; Index m_cols; public: EIGEN_DEVICE_FUNC DenseStorage() : m_data(0), m_cols(0) {} explicit DenseStorage(internal::constructor_without_unaligned_array_assert) : m_data(0), m_cols(0) {} - EIGEN_DEVICE_FUNC DenseStorage(Index size, Index rows, Index cols) : m_data(internal::conditional_aligned_new_auto(size)), m_cols(cols) + EIGEN_DEVICE_FUNC DenseStorage(Index size, Index rows, Index cols) : m_data(internal::conditional_aligned_new_auto(size)), m_cols(cols) { EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN({}) - eigen_internal_assert(size==rows*cols && rows==_Rows && cols >=0); + eigen_internal_assert(size==rows*cols && rows==Rows_ && cols >=0); EIGEN_UNUSED_VARIABLE(rows); } EIGEN_DEVICE_FUNC DenseStorage(const DenseStorage& other) - : m_data(internal::conditional_aligned_new_auto(_Rows*other.m_cols)) + : m_data(internal::conditional_aligned_new_auto(Rows_*other.m_cols)) , m_cols(other.m_cols) { - EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN(Index size = m_cols*_Rows) - internal::smart_copy(other.m_data, other.m_data+_Rows*m_cols, m_data); + EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN(Index size = m_cols*Rows_) + internal::smart_copy(other.m_data, other.m_data+Rows_*m_cols, m_data); } EIGEN_DEVICE_FUNC DenseStorage& operator=(const DenseStorage& other) { @@ -542,25 +542,25 @@ template class DenseStorage(m_data, _Rows*m_cols); } + EIGEN_DEVICE_FUNC ~DenseStorage() { internal::conditional_aligned_delete_auto(m_data, Rows_*m_cols); } EIGEN_DEVICE_FUNC void swap(DenseStorage& other) { numext::swap(m_data,other.m_data); numext::swap(m_cols,other.m_cols); } - EIGEN_DEVICE_FUNC static EIGEN_CONSTEXPR Index rows(void) EIGEN_NOEXCEPT {return _Rows;} + EIGEN_DEVICE_FUNC static EIGEN_CONSTEXPR Index rows(void) EIGEN_NOEXCEPT {return Rows_;} EIGEN_DEVICE_FUNC Index cols(void) const EIGEN_NOEXCEPT {return m_cols;} EIGEN_DEVICE_FUNC void conservativeResize(Index size, Index, Index cols) { - m_data = internal::conditional_aligned_realloc_new_auto(m_data, size, _Rows*m_cols); + m_data = internal::conditional_aligned_realloc_new_auto(m_data, size, Rows_*m_cols); m_cols = cols; } EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void resize(Index size, Index, Index cols) { - if(size != _Rows*m_cols) + if(size != Rows_*m_cols) { - internal::conditional_aligned_delete_auto(m_data, _Rows*m_cols); + internal::conditional_aligned_delete_auto(m_data, Rows_*m_cols); if (size>0) // >0 and not simply !=0 to let the compiler knows that size cannot be negative - m_data = internal::conditional_aligned_new_auto(size); + m_data = internal::conditional_aligned_new_auto(size); else m_data = 0; EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN({}) @@ -572,25 +572,25 @@ template class DenseStorage class DenseStorage +template class DenseStorage { T *m_data; Index m_rows; public: EIGEN_DEVICE_FUNC DenseStorage() : m_data(0), m_rows(0) {} explicit DenseStorage(internal::constructor_without_unaligned_array_assert) : m_data(0), m_rows(0) {} - EIGEN_DEVICE_FUNC DenseStorage(Index size, Index rows, Index cols) : m_data(internal::conditional_aligned_new_auto(size)), m_rows(rows) + EIGEN_DEVICE_FUNC DenseStorage(Index size, Index rows, Index cols) : m_data(internal::conditional_aligned_new_auto(size)), m_rows(rows) { EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN({}) - eigen_internal_assert(size==rows*cols && rows>=0 && cols == _Cols); + eigen_internal_assert(size==rows*cols && rows>=0 && cols == Cols_); EIGEN_UNUSED_VARIABLE(cols); } EIGEN_DEVICE_FUNC DenseStorage(const DenseStorage& other) - : m_data(internal::conditional_aligned_new_auto(other.m_rows*_Cols)) + : m_data(internal::conditional_aligned_new_auto(other.m_rows*Cols_)) , m_rows(other.m_rows) { - EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN(Index size = m_rows*_Cols) - internal::smart_copy(other.m_data, other.m_data+other.m_rows*_Cols, m_data); + EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN(Index size = m_rows*Cols_) + internal::smart_copy(other.m_data, other.m_data+other.m_rows*Cols_, m_data); } EIGEN_DEVICE_FUNC DenseStorage& operator=(const DenseStorage& other) { @@ -618,25 +618,25 @@ template class DenseStorage(m_data, _Cols*m_rows); } + EIGEN_DEVICE_FUNC ~DenseStorage() { internal::conditional_aligned_delete_auto(m_data, Cols_*m_rows); } EIGEN_DEVICE_FUNC void swap(DenseStorage& other) { numext::swap(m_data,other.m_data); numext::swap(m_rows,other.m_rows); } EIGEN_DEVICE_FUNC Index rows(void) const EIGEN_NOEXCEPT {return m_rows;} - EIGEN_DEVICE_FUNC static EIGEN_CONSTEXPR Index cols(void) {return _Cols;} + EIGEN_DEVICE_FUNC static EIGEN_CONSTEXPR Index cols(void) {return Cols_;} void conservativeResize(Index size, Index rows, Index) { - m_data = internal::conditional_aligned_realloc_new_auto(m_data, size, m_rows*_Cols); + m_data = internal::conditional_aligned_realloc_new_auto(m_data, size, m_rows*Cols_); m_rows = rows; } EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void resize(Index size, Index rows, Index) { - if(size != m_rows*_Cols) + if(size != m_rows*Cols_) { - internal::conditional_aligned_delete_auto(m_data, _Cols*m_rows); + internal::conditional_aligned_delete_auto(m_data, Cols_*m_rows); if (size>0) // >0 and not simply !=0 to let the compiler knows that size cannot be negative - m_data = internal::conditional_aligned_new_auto(size); + m_data = internal::conditional_aligned_new_auto(size); else m_data = 0; EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN({}) diff --git a/Eigen/src/Core/Diagonal.h b/Eigen/src/Core/Diagonal.h index 3112d2c16..d15f0af8e 100644 --- a/Eigen/src/Core/Diagonal.h +++ b/Eigen/src/Core/Diagonal.h @@ -60,12 +60,12 @@ struct traits > }; } -template class Diagonal - : public internal::dense_xpr_base< Diagonal >::type +template class Diagonal + : public internal::dense_xpr_base< Diagonal >::type { public: - enum { DiagIndex = _DiagIndex }; + enum { DiagIndex = DiagIndex_ }; typedef typename internal::dense_xpr_base::type Base; EIGEN_DENSE_PUBLIC_INTERFACE(Diagonal) diff --git a/Eigen/src/Core/DiagonalMatrix.h b/Eigen/src/Core/DiagonalMatrix.h index 542685c65..474dcfae2 100644 --- a/Eigen/src/Core/DiagonalMatrix.h +++ b/Eigen/src/Core/DiagonalMatrix.h @@ -116,7 +116,7 @@ class DiagonalBase : public EigenBase * * \brief Represents a diagonal matrix with its storage * - * \param _Scalar the type of coefficients + * \param Scalar_ the type of coefficients * \param SizeAtCompileTime the dimension of the matrix, or Dynamic * \param MaxSizeAtCompileTime the dimension of the matrix, or Dynamic. This parameter is optional and defaults * to SizeAtCompileTime. Most of the time, you do not need to specify it. @@ -125,26 +125,26 @@ class DiagonalBase : public EigenBase */ namespace internal { -template -struct traits > - : traits > +template +struct traits > + : traits > { - typedef Matrix<_Scalar,SizeAtCompileTime,1,0,MaxSizeAtCompileTime,1> DiagonalVectorType; + typedef Matrix DiagonalVectorType; typedef DiagonalShape StorageKind; enum { Flags = LvalueBit | NoPreferredStorageOrderBit }; }; } -template +template class DiagonalMatrix - : public DiagonalBase > + : public DiagonalBase > { public: #ifndef EIGEN_PARSED_BY_DOXYGEN typedef typename internal::traits::DiagonalVectorType DiagonalVectorType; typedef const DiagonalMatrix& Nested; - typedef _Scalar Scalar; + typedef Scalar_ Scalar; typedef typename internal::traits::StorageKind StorageKind; typedef typename internal::traits::StorageIndex StorageIndex; #endif @@ -261,7 +261,7 @@ class DiagonalMatrix * * \brief Expression of a diagonal matrix * - * \param _DiagonalVectorType the type of the vector of diagonal coefficients + * \param DiagonalVectorType_ the type of the vector of diagonal coefficients * * This class is an expression of a diagonal matrix, but not storing its own vector of diagonal coefficients, * instead wrapping an existing vector expression. It is the return type of MatrixBase::asDiagonal() @@ -271,10 +271,10 @@ class DiagonalMatrix */ namespace internal { -template -struct traits > +template +struct traits > { - typedef _DiagonalVectorType DiagonalVectorType; + typedef DiagonalVectorType_ DiagonalVectorType; typedef typename DiagonalVectorType::Scalar Scalar; typedef typename DiagonalVectorType::StorageIndex StorageIndex; typedef DiagonalShape StorageKind; @@ -289,13 +289,13 @@ struct traits > }; } -template +template class DiagonalWrapper - : public DiagonalBase >, internal::no_assignment_operator + : public DiagonalBase >, internal::no_assignment_operator { public: #ifndef EIGEN_PARSED_BY_DOXYGEN - typedef _DiagonalVectorType DiagonalVectorType; + typedef DiagonalVectorType_ DiagonalVectorType; typedef DiagonalWrapper Nested; #endif diff --git a/Eigen/src/Core/Matrix.h b/Eigen/src/Core/Matrix.h index f0e59a911..de54824ce 100644 --- a/Eigen/src/Core/Matrix.h +++ b/Eigen/src/Core/Matrix.h @@ -14,34 +14,34 @@ namespace Eigen { namespace internal { -template -struct traits > +template +struct traits > { private: - enum { size = internal::size_at_compile_time<_Rows,_Cols>::ret }; - typedef typename find_best_packet<_Scalar,size>::type PacketScalar; + enum { size = internal::size_at_compile_time::ret }; + typedef typename find_best_packet::type PacketScalar; enum { - row_major_bit = _Options&RowMajor ? RowMajorBit : 0, - is_dynamic_size_storage = _MaxRows==Dynamic || _MaxCols==Dynamic, - max_size = is_dynamic_size_storage ? Dynamic : _MaxRows*_MaxCols, - default_alignment = compute_default_alignment<_Scalar,max_size>::value, - actual_alignment = ((_Options&DontAlign)==0) ? default_alignment : 0, + row_major_bit = Options_&RowMajor ? RowMajorBit : 0, + is_dynamic_size_storage = MaxRows_==Dynamic || MaxCols_==Dynamic, + max_size = is_dynamic_size_storage ? Dynamic : MaxRows_*MaxCols_, + default_alignment = compute_default_alignment::value, + actual_alignment = ((Options_&DontAlign)==0) ? default_alignment : 0, required_alignment = unpacket_traits::alignment, - packet_access_bit = (packet_traits<_Scalar>::Vectorizable && (EIGEN_UNALIGNED_VECTORIZE || (actual_alignment>=required_alignment))) ? PacketAccessBit : 0 + packet_access_bit = (packet_traits::Vectorizable && (EIGEN_UNALIGNED_VECTORIZE || (actual_alignment>=required_alignment))) ? PacketAccessBit : 0 }; public: - typedef _Scalar Scalar; + typedef Scalar_ Scalar; typedef Dense StorageKind; typedef Eigen::Index StorageIndex; typedef MatrixXpr XprKind; enum { - RowsAtCompileTime = _Rows, - ColsAtCompileTime = _Cols, - MaxRowsAtCompileTime = _MaxRows, - MaxColsAtCompileTime = _MaxCols, - Flags = compute_matrix_flags<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::ret, - Options = _Options, + RowsAtCompileTime = Rows_, + ColsAtCompileTime = Cols_, + MaxRowsAtCompileTime = MaxRows_, + MaxColsAtCompileTime = MaxCols_, + Flags = compute_matrix_flags::ret, + Options = Options_, InnerStrideAtCompileTime = 1, OuterStrideAtCompileTime = (Options&RowMajor) ? ColsAtCompileTime : RowsAtCompileTime, @@ -63,18 +63,18 @@ public: * The %Matrix class encompasses \em both fixed-size and dynamic-size objects (\ref fixedsize "note"). * * The first three template parameters are required: - * \tparam _Scalar Numeric type, e.g. float, double, int or std::complex. + * \tparam Scalar_ Numeric type, e.g. float, double, int or std::complex. * User defined scalar types are supported as well (see \ref user_defined_scalars "here"). - * \tparam _Rows Number of rows, or \b Dynamic - * \tparam _Cols Number of columns, or \b Dynamic + * \tparam Rows_ Number of rows, or \b Dynamic + * \tparam Cols_ Number of columns, or \b Dynamic * * The remaining template parameters are optional -- in most cases you don't have to worry about them. - * \tparam _Options A combination of either \b #RowMajor or \b #ColMajor, and of either + * \tparam Options_ A combination of either \b #RowMajor or \b #ColMajor, and of either * \b #AutoAlign or \b #DontAlign. * The former controls \ref TopicStorageOrders "storage order", and defaults to column-major. The latter controls alignment, which is required * for vectorization. It defaults to aligning matrices except for fixed sizes that aren't a multiple of the packet size. - * \tparam _MaxRows Maximum number of rows. Defaults to \a _Rows (\ref maxrows "note"). - * \tparam _MaxCols Maximum number of columns. Defaults to \a _Cols (\ref maxrows "note"). + * \tparam MaxRows_ Maximum number of rows. Defaults to \a Rows_ (\ref maxrows "note"). + * \tparam MaxCols_ Maximum number of columns. Defaults to \a Cols_ (\ref maxrows "note"). * * Eigen provides a number of typedefs covering the usual cases. Here are some examples: * @@ -128,12 +128,12 @@ public: * Note that \em dense matrices, be they Fixed-size or Dynamic-size, do not expand dynamically in the sense of a std::map. * If you want this behavior, see the Sparse module. * - *
\anchor maxrows _MaxRows and _MaxCols:
+ *
\anchor maxrows MaxRows_ and MaxCols_:
*
In most cases, one just leaves these parameters to the default values. * These parameters mean the maximum size of rows and columns that the matrix may have. They are useful in cases * when the exact numbers of rows and columns are not known are compile-time, but it is known at compile-time that they cannot - * exceed a certain value. This happens when taking dynamic-size blocks inside fixed-size matrices: in this case _MaxRows and _MaxCols - * are the dimensions of the original matrix, while _Rows and _Cols are Dynamic.
+ * exceed a certain value. This happens when taking dynamic-size blocks inside fixed-size matrices: in this case MaxRows_ and MaxCols_ + * are the dimensions of the original matrix, while Rows_ and Cols_ are Dynamic. * * * ABI and storage layout @@ -174,9 +174,9 @@ public: * \ref TopicStorageOrders */ -template +template class Matrix - : public PlainObjectBase > + : public PlainObjectBase > { public: @@ -185,7 +185,7 @@ class Matrix */ typedef PlainObjectBase Base; - enum { Options = _Options }; + enum { Options = Options_ }; EIGEN_DENSE_PUBLIC_INTERFACE(Matrix) diff --git a/Eigen/src/Core/NumTraits.h b/Eigen/src/Core/NumTraits.h index 72eac5a93..608a4e747 100644 --- a/Eigen/src/Core/NumTraits.h +++ b/Eigen/src/Core/NumTraits.h @@ -252,15 +252,15 @@ template<> struct NumTraits static inline long double dummy_precision() { return 1e-15l; } }; -template struct NumTraits > - : GenericNumTraits > +template struct NumTraits > + : GenericNumTraits > { - typedef _Real Real; - typedef typename NumTraits<_Real>::Literal Literal; + typedef Real_ Real; + typedef typename NumTraits::Literal Literal; enum { IsComplex = 1, - RequireInitialization = NumTraits<_Real>::RequireInitialization, - ReadCost = 2 * NumTraits<_Real>::ReadCost, + RequireInitialization = NumTraits::RequireInitialization, + ReadCost = 2 * NumTraits::ReadCost, AddCost = 2 * NumTraits::AddCost, MulCost = 4 * NumTraits::MulCost + 2 * NumTraits::AddCost }; diff --git a/Eigen/src/Core/PermutationMatrix.h b/Eigen/src/Core/PermutationMatrix.h index 69401bf41..24fe660be 100644 --- a/Eigen/src/Core/PermutationMatrix.h +++ b/Eigen/src/Core/PermutationMatrix.h @@ -269,13 +269,13 @@ class PermutationBase : public EigenBase }; namespace internal { -template -struct traits > - : traits > +template +struct traits > + : traits > { typedef PermutationStorage StorageKind; - typedef Matrix<_StorageIndex, SizeAtCompileTime, 1, 0, MaxSizeAtCompileTime, 1> IndicesType; - typedef _StorageIndex StorageIndex; + typedef Matrix IndicesType; + typedef StorageIndex_ StorageIndex; typedef void Scalar; }; } @@ -287,14 +287,14 @@ struct traits -class PermutationMatrix : public PermutationBase > +template +class PermutationMatrix : public PermutationBase > { typedef PermutationBase Base; typedef internal::traits Traits; @@ -389,20 +389,20 @@ class PermutationMatrix : public PermutationBase -struct traits,_PacketAccess> > - : traits > +template +struct traits,_PacketAccess> > + : traits > { typedef PermutationStorage StorageKind; - typedef Map, _PacketAccess> IndicesType; - typedef _StorageIndex StorageIndex; + typedef Map, _PacketAccess> IndicesType; + typedef StorageIndex_ StorageIndex; typedef void Scalar; }; } -template -class Map,_PacketAccess> - : public PermutationBase,_PacketAccess> > +template +class Map,_PacketAccess> + : public PermutationBase,_PacketAccess> > { typedef PermutationBase Base; typedef internal::traits Traits; @@ -452,18 +452,18 @@ class Map class TranspositionsWrapper; +template class TranspositionsWrapper; namespace internal { -template -struct traits > +template +struct traits > { typedef PermutationStorage StorageKind; typedef void Scalar; - typedef typename _IndicesType::Scalar StorageIndex; - typedef _IndicesType IndicesType; + typedef typename IndicesType_::Scalar StorageIndex; + typedef IndicesType_ IndicesType; enum { - RowsAtCompileTime = _IndicesType::SizeAtCompileTime, - ColsAtCompileTime = _IndicesType::SizeAtCompileTime, + RowsAtCompileTime = IndicesType_::SizeAtCompileTime, + ColsAtCompileTime = IndicesType_::SizeAtCompileTime, MaxRowsAtCompileTime = IndicesType::MaxSizeAtCompileTime, MaxColsAtCompileTime = IndicesType::MaxSizeAtCompileTime, Flags = 0 @@ -476,14 +476,14 @@ struct traits > * * \brief Class to view a vector of integers as a permutation matrix * - * \tparam _IndicesType the type of the vector of integer (can be any compatible expression) + * \tparam IndicesType_ the type of the vector of integer (can be any compatible expression) * * This class allows to view any vector expression of integers as a permutation matrix. * * \sa class PermutationBase, class PermutationMatrix */ -template -class PermutationWrapper : public PermutationBase > +template +class PermutationWrapper : public PermutationBase > { typedef PermutationBase Base; typedef internal::traits Traits; diff --git a/Eigen/src/Core/PlainObjectBase.h b/Eigen/src/Core/PlainObjectBase.h index e2ddbd1d5..00cdc55f2 100644 --- a/Eigen/src/Core/PlainObjectBase.h +++ b/Eigen/src/Core/PlainObjectBase.h @@ -64,18 +64,18 @@ namespace doxygen { // This is a workaround to doxygen not being able to understand the inheritance logic // when it is hidden by the dense_xpr_base helper struct. // Moreover, doxygen fails to include members that are not documented in the declaration body of -// MatrixBase if we inherits MatrixBase >, +// MatrixBase if we inherits MatrixBase >, // this is why we simply inherits MatrixBase, though this does not make sense. /** This class is just a workaround for Doxygen and it does not not actually exist. */ template struct dense_xpr_base_dispatcher; /** This class is just a workaround for Doxygen and it does not not actually exist. */ -template -struct dense_xpr_base_dispatcher > +template +struct dense_xpr_base_dispatcher > : public MatrixBase {}; /** This class is just a workaround for Doxygen and it does not not actually exist. */ -template -struct dense_xpr_base_dispatcher > +template +struct dense_xpr_base_dispatcher > : public ArrayBase {}; } // namespace doxygen diff --git a/Eigen/src/Core/Product.h b/Eigen/src/Core/Product.h index 70a6c1063..19417493e 100644 --- a/Eigen/src/Core/Product.h +++ b/Eigen/src/Core/Product.h @@ -58,8 +58,8 @@ struct traits > * * \brief Expression of the product of two arbitrary matrices or vectors * - * \tparam _Lhs the type of the left-hand side expression - * \tparam _Rhs the type of the right-hand side expression + * \tparam Lhs_ the type of the left-hand side expression + * \tparam Rhs_ the type of the right-hand side expression * * This class represents an expression of the product of two arbitrary matrices. * @@ -67,16 +67,16 @@ struct traits > * \tparam Option can be DefaultProduct, AliasFreeProduct, or LazyProduct * */ -template -class Product : public ProductImpl<_Lhs,_Rhs,Option, - typename internal::product_promote_storage_type::StorageKind, - typename internal::traits<_Rhs>::StorageKind, - internal::product_type<_Lhs,_Rhs>::ret>::ret> +template +class Product : public ProductImpl::StorageKind, + typename internal::traits::StorageKind, + internal::product_type::ret>::ret> { public: - typedef _Lhs Lhs; - typedef _Rhs Rhs; + typedef Lhs_ Lhs; + typedef Rhs_ Rhs; typedef typename ProductImpl< Lhs, Rhs, Option, diff --git a/Eigen/src/Core/ProductEvaluators.h b/Eigen/src/Core/ProductEvaluators.h index 8cf294b28..b9eab97f9 100644 --- a/Eigen/src/Core/ProductEvaluators.h +++ b/Eigen/src/Core/ProductEvaluators.h @@ -836,13 +836,13 @@ public: MatrixFlags = evaluator::Flags, DiagFlags = evaluator::Flags, - _StorageOrder = (Derived::MaxRowsAtCompileTime==1 && Derived::MaxColsAtCompileTime!=1) ? RowMajor + StorageOrder_ = (Derived::MaxRowsAtCompileTime==1 && Derived::MaxColsAtCompileTime!=1) ? RowMajor : (Derived::MaxColsAtCompileTime==1 && Derived::MaxRowsAtCompileTime!=1) ? ColMajor : MatrixFlags & RowMajorBit ? RowMajor : ColMajor, - _SameStorageOrder = _StorageOrder == (MatrixFlags & RowMajorBit ? RowMajor : ColMajor), + _SameStorageOrder = StorageOrder_ == (MatrixFlags & RowMajorBit ? RowMajor : ColMajor), - _ScalarAccessOnDiag = !((int(_StorageOrder) == ColMajor && int(ProductOrder) == OnTheLeft) - ||(int(_StorageOrder) == RowMajor && int(ProductOrder) == OnTheRight)), + _ScalarAccessOnDiag = !((int(StorageOrder_) == ColMajor && int(ProductOrder) == OnTheLeft) + ||(int(StorageOrder_) == RowMajor && int(ProductOrder) == OnTheRight)), _SameTypes = is_same::value, // FIXME currently we need same types, but in the future the next rule should be the one //_Vectorizable = bool(int(MatrixFlags)&PacketAccessBit) && ((!_PacketOnDiag) || (_SameTypes && bool(int(DiagFlags)&PacketAccessBit))), @@ -913,7 +913,7 @@ struct product_evaluator, ProductTag, DiagonalSha typedef typename Lhs::DiagonalVectorType DiagonalType; - enum { StorageOrder = Base::_StorageOrder }; + enum { StorageOrder = Base::StorageOrder_ }; EIGEN_DEVICE_FUNC explicit product_evaluator(const XprType& xpr) : Base(xpr.rhs(), xpr.lhs().diagonal()) @@ -957,7 +957,7 @@ struct product_evaluator, ProductTag, DenseShape, typedef Product XprType; typedef typename XprType::PlainObject PlainObject; - enum { StorageOrder = Base::_StorageOrder }; + enum { StorageOrder = Base::StorageOrder_ }; EIGEN_DEVICE_FUNC explicit product_evaluator(const XprType& xpr) : Base(xpr.lhs(), xpr.rhs().diagonal()) diff --git a/Eigen/src/Core/Redux.h b/Eigen/src/Core/Redux.h index b6790d110..5732ba8c6 100644 --- a/Eigen/src/Core/Redux.h +++ b/Eigen/src/Core/Redux.h @@ -353,12 +353,12 @@ struct redux_impl }; // evaluator adaptor -template -class redux_evaluator : public internal::evaluator<_XprType> +template +class redux_evaluator : public internal::evaluator { - typedef internal::evaluator<_XprType> Base; + typedef internal::evaluator Base; public: - typedef _XprType XprType; + typedef XprType_ XprType; EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit redux_evaluator(const XprType &xpr) : Base(xpr) {} diff --git a/Eigen/src/Core/Ref.h b/Eigen/src/Core/Ref.h index c2a37eadb..716552a70 100644 --- a/Eigen/src/Core/Ref.h +++ b/Eigen/src/Core/Ref.h @@ -14,16 +14,16 @@ namespace Eigen { namespace internal { -template -struct traits > - : public traits > +template +struct traits > + : public traits > { typedef _PlainObjectType PlainObjectType; typedef _StrideType StrideType; enum { - Options = _Options, - Flags = traits >::Flags | NestByRefBit, - Alignment = traits >::Alignment + Options = Options_, + Flags = traits >::Flags | NestByRefBit, + Alignment = traits >::Alignment }; template struct match { diff --git a/Eigen/src/Core/SelfAdjointView.h b/Eigen/src/Core/SelfAdjointView.h index 8ce3b372a..28f3a70c7 100644 --- a/Eigen/src/Core/SelfAdjointView.h +++ b/Eigen/src/Core/SelfAdjointView.h @@ -46,12 +46,12 @@ struct traits > : traits } -template class SelfAdjointView - : public TriangularBase > +template class SelfAdjointView + : public TriangularBase > { public: - typedef _MatrixType MatrixType; + typedef MatrixType_ MatrixType; typedef TriangularBase Base; typedef typename internal::traits::MatrixTypeNested MatrixTypeNested; typedef typename internal::traits::MatrixTypeNestedCleaned MatrixTypeNestedCleaned; diff --git a/Eigen/src/Core/StlIterators.h b/Eigen/src/Core/StlIterators.h index 09041db1d..b412b39fa 100644 --- a/Eigen/src/Core/StlIterators.h +++ b/Eigen/src/Core/StlIterators.h @@ -256,10 +256,10 @@ protected: internal::variable_if_dynamic m_incr; }; -template -struct indexed_based_stl_iterator_traits > +template +struct indexed_based_stl_iterator_traits > { - typedef _XprType XprType; + typedef XprType_ XprType; typedef generic_randaccess_stl_iterator::type> non_const_iterator; typedef generic_randaccess_stl_iterator::type> const_iterator; }; @@ -301,10 +301,10 @@ public: pointer operator->() const { return &((*mp_xpr)(m_index)); } }; -template -struct indexed_based_stl_iterator_traits > +template +struct indexed_based_stl_iterator_traits > { - typedef _XprType XprType; + typedef XprType_ XprType; typedef subvector_stl_iterator::type, Direction> non_const_iterator; typedef subvector_stl_iterator::type, Direction> const_iterator; }; @@ -349,10 +349,10 @@ public: pointer operator->() const { return (*mp_xpr).template subVector(m_index); } }; -template -struct indexed_based_stl_iterator_traits > +template +struct indexed_based_stl_iterator_traits > { - typedef _XprType XprType; + typedef XprType_ XprType; typedef subvector_stl_reverse_iterator::type, Direction> non_const_iterator; typedef subvector_stl_reverse_iterator::type, Direction> const_iterator; }; diff --git a/Eigen/src/Core/Stride.h b/Eigen/src/Core/Stride.h index 6494d5142..6ad48f882 100644 --- a/Eigen/src/Core/Stride.h +++ b/Eigen/src/Core/Stride.h @@ -31,8 +31,8 @@ namespace Eigen { * arguments to the constructor. * * Indeed, this class takes two template parameters: - * \tparam _OuterStrideAtCompileTime the outer stride, or Dynamic if you want to specify it at runtime. - * \tparam _InnerStrideAtCompileTime the inner stride, or Dynamic if you want to specify it at runtime. + * \tparam OuterStrideAtCompileTime_ the outer stride, or Dynamic if you want to specify it at runtime. + * \tparam InnerStrideAtCompileTime_ the inner stride, or Dynamic if you want to specify it at runtime. * * Here is an example: * \include Map_general_stride.cpp @@ -44,14 +44,14 @@ namespace Eigen { * * \sa class InnerStride, class OuterStride, \ref TopicStorageOrders */ -template +template class Stride { public: typedef Eigen::Index Index; ///< \deprecated since Eigen 3.3 enum { - InnerStrideAtCompileTime = _InnerStrideAtCompileTime, - OuterStrideAtCompileTime = _OuterStrideAtCompileTime + InnerStrideAtCompileTime = InnerStrideAtCompileTime_, + OuterStrideAtCompileTime = OuterStrideAtCompileTime_ }; /** Default constructor, for use when strides are fixed at compile time */ diff --git a/Eigen/src/Core/Transpositions.h b/Eigen/src/Core/Transpositions.h index 38a7b01cb..4119621bf 100644 --- a/Eigen/src/Core/Transpositions.h +++ b/Eigen/src/Core/Transpositions.h @@ -113,11 +113,11 @@ class TranspositionsBase }; namespace internal { -template -struct traits > - : traits > +template +struct traits > + : traits > { - typedef Matrix<_StorageIndex, SizeAtCompileTime, 1, 0, MaxSizeAtCompileTime, 1> IndicesType; + typedef Matrix IndicesType; typedef TranspositionsStorage StorageKind; }; } @@ -151,8 +151,8 @@ struct traits -class Transpositions : public TranspositionsBase > +template +class Transpositions : public TranspositionsBase > { typedef internal::traits Traits; public: @@ -199,19 +199,19 @@ class Transpositions : public TranspositionsBase -struct traits,_PacketAccess> > - : traits > +template +struct traits,_PacketAccess> > + : traits > { - typedef Map, _PacketAccess> IndicesType; - typedef _StorageIndex StorageIndex; + typedef Map, _PacketAccess> IndicesType; + typedef StorageIndex_ StorageIndex; typedef TranspositionsStorage StorageKind; }; } -template -class Map,PacketAccess> - : public TranspositionsBase,PacketAccess> > +template +class Map,PacketAccess> + : public TranspositionsBase,PacketAccess> > { typedef internal::traits Traits; public: @@ -260,17 +260,17 @@ class Map,P }; namespace internal { -template -struct traits > - : traits > +template +struct traits > + : traits > { typedef TranspositionsStorage StorageKind; }; } -template +template class TranspositionsWrapper - : public TranspositionsBase > + : public TranspositionsBase > { typedef internal::traits Traits; public: diff --git a/Eigen/src/Core/TriangularMatrix.h b/Eigen/src/Core/TriangularMatrix.h index fdb8bc15a..de95ff185 100644 --- a/Eigen/src/Core/TriangularMatrix.h +++ b/Eigen/src/Core/TriangularMatrix.h @@ -166,8 +166,8 @@ template class TriangularBase : public EigenBase * \sa MatrixBase::triangularView() */ namespace internal { -template -struct traits > : traits +template +struct traits > : traits { typedef typename ref_selector::non_const_type MatrixTypeNested; typedef typename remove_reference::type MatrixTypeNestedNonRef; @@ -175,30 +175,30 @@ struct traits > : traits typedef typename MatrixType::PlainObject FullMatrixType; typedef MatrixType ExpressionType; enum { - Mode = _Mode, + Mode = Mode_, FlagsLvalueBit = is_lvalue::value ? LvalueBit : 0, Flags = (MatrixTypeNestedCleaned::Flags & (HereditaryBits | FlagsLvalueBit) & (~(PacketAccessBit | DirectAccessBit | LinearAccessBit))) }; }; } -template class TriangularViewImpl; +template class TriangularViewImpl; -template class TriangularView - : public TriangularViewImpl<_MatrixType, _Mode, typename internal::traits<_MatrixType>::StorageKind > +template class TriangularView + : public TriangularViewImpl::StorageKind > { public: - typedef TriangularViewImpl<_MatrixType, _Mode, typename internal::traits<_MatrixType>::StorageKind > Base; + typedef TriangularViewImpl::StorageKind > Base; typedef typename internal::traits::Scalar Scalar; - typedef _MatrixType MatrixType; + typedef MatrixType_ MatrixType; protected: typedef typename internal::traits::MatrixTypeNested MatrixTypeNested; typedef typename internal::traits::MatrixTypeNestedNonRef MatrixTypeNestedNonRef; typedef typename internal::remove_all::type MatrixConjugateReturnType; - typedef TriangularView::type, _Mode> ConstTriangularView; + typedef TriangularView::type, Mode_> ConstTriangularView; public: @@ -206,7 +206,7 @@ template class TriangularView typedef typename internal::traits::MatrixTypeNestedCleaned NestedExpression; enum { - Mode = _Mode, + Mode = Mode_, Flags = internal::traits::Flags, TransposeMode = (Mode & Upper ? Lower : 0) | (Mode & Lower ? Upper : 0) @@ -342,16 +342,17 @@ template class TriangularView * * \sa class TriangularView, MatrixBase::triangularView() */ -template class TriangularViewImpl<_MatrixType,_Mode,Dense> - : public TriangularBase > +template class TriangularViewImpl + : public TriangularBase > { public: - typedef TriangularView<_MatrixType, _Mode> TriangularViewType; + typedef TriangularView TriangularViewType; + typedef TriangularBase Base; typedef typename internal::traits::Scalar Scalar; - typedef _MatrixType MatrixType; + typedef MatrixType_ MatrixType; typedef typename MatrixType::PlainObject DenseMatrixType; typedef DenseMatrixType PlainObject; @@ -362,7 +363,7 @@ template class TriangularViewImpl<_Mat typedef typename internal::traits::StorageKind StorageKind; enum { - Mode = _Mode, + Mode = Mode_, Flags = internal::traits::Flags }; diff --git a/Eigen/src/Core/products/GeneralBlockPanelKernel.h b/Eigen/src/Core/products/GeneralBlockPanelKernel.h index f35b760c1..ed26b9a61 100644 --- a/Eigen/src/Core/products/GeneralBlockPanelKernel.h +++ b/Eigen/src/Core/products/GeneralBlockPanelKernel.h @@ -21,7 +21,7 @@ enum GEBPPacketSizeType { GEBPPacketQuarter }; -template +template class gebp_traits; @@ -414,21 +414,21 @@ struct packet_conditional { typedef T2 type; }; * cplx*real : unpack rhs to constant packets, ... * real*cplx : load lhs as (a0,a0,a1,a1), and mul as usual */ -template +template class gebp_traits { public: - typedef _LhsScalar LhsScalar; - typedef _RhsScalar RhsScalar; + typedef LhsScalar_ LhsScalar; + typedef RhsScalar_ RhsScalar; typedef typename ScalarBinaryOpTraits::ReturnType ResScalar; - PACKET_DECL_COND_PREFIX(_, Lhs, _PacketSize); - PACKET_DECL_COND_PREFIX(_, Rhs, _PacketSize); - PACKET_DECL_COND_PREFIX(_, Res, _PacketSize); + PACKET_DECL_COND_PREFIX(_, Lhs, PacketSize_); + PACKET_DECL_COND_PREFIX(_, Rhs, PacketSize_); + PACKET_DECL_COND_PREFIX(_, Res, PacketSize_); enum { - ConjLhs = _ConjLhs, - ConjRhs = _ConjRhs, + ConjLhs = ConjLhs_, + ConjRhs = ConjRhs_, Vectorizable = unpacket_traits<_LhsPacket>::vectorizable && unpacket_traits<_RhsPacket>::vectorizable, LhsPacketSize = Vectorizable ? unpacket_traits<_LhsPacket>::size : 1, RhsPacketSize = Vectorizable ? unpacket_traits<_RhsPacket>::size : 1, @@ -543,20 +543,20 @@ public: }; -template -class gebp_traits, RealScalar, _ConjLhs, false, Arch, _PacketSize> +template +class gebp_traits, RealScalar, ConjLhs_, false, Arch, PacketSize_> { public: typedef std::complex LhsScalar; typedef RealScalar RhsScalar; typedef typename ScalarBinaryOpTraits::ReturnType ResScalar; - PACKET_DECL_COND_PREFIX(_, Lhs, _PacketSize); - PACKET_DECL_COND_PREFIX(_, Rhs, _PacketSize); - PACKET_DECL_COND_PREFIX(_, Res, _PacketSize); + PACKET_DECL_COND_PREFIX(_, Lhs, PacketSize_); + PACKET_DECL_COND_PREFIX(_, Rhs, PacketSize_); + PACKET_DECL_COND_PREFIX(_, Res, PacketSize_); enum { - ConjLhs = _ConjLhs, + ConjLhs = ConjLhs_, ConjRhs = false, Vectorizable = unpacket_traits<_LhsPacket>::vectorizable && unpacket_traits<_RhsPacket>::vectorizable, LhsPacketSize = Vectorizable ? unpacket_traits<_LhsPacket>::size : 1, @@ -754,8 +754,8 @@ template struct unpacket_traits > { // return res; // } -template -class gebp_traits, std::complex, _ConjLhs, _ConjRhs, Arch, _PacketSize > +template +class gebp_traits, std::complex, ConjLhs_, ConjRhs_, Arch, PacketSize_ > { public: typedef std::complex Scalar; @@ -763,15 +763,15 @@ public: typedef std::complex RhsScalar; typedef std::complex ResScalar; - PACKET_DECL_COND_PREFIX(_, Lhs, _PacketSize); - PACKET_DECL_COND_PREFIX(_, Rhs, _PacketSize); - PACKET_DECL_COND_PREFIX(_, Res, _PacketSize); - PACKET_DECL_COND(Real, _PacketSize); - PACKET_DECL_COND_SCALAR(_PacketSize); + PACKET_DECL_COND_PREFIX(_, Lhs, PacketSize_); + PACKET_DECL_COND_PREFIX(_, Rhs, PacketSize_); + PACKET_DECL_COND_PREFIX(_, Res, PacketSize_); + PACKET_DECL_COND(Real, PacketSize_); + PACKET_DECL_COND_SCALAR(PacketSize_); enum { - ConjLhs = _ConjLhs, - ConjRhs = _ConjRhs, + ConjLhs = ConjLhs_, + ConjRhs = ConjRhs_, Vectorizable = unpacket_traits::vectorizable && unpacket_traits::vectorizable, ResPacketSize = Vectorizable ? unpacket_traits<_ResPacket>::size : 1, @@ -920,8 +920,8 @@ protected: conj_helper cj; }; -template -class gebp_traits, false, _ConjRhs, Arch, _PacketSize > +template +class gebp_traits, false, ConjRhs_, Arch, PacketSize_ > { public: typedef std::complex Scalar; @@ -929,11 +929,11 @@ public: typedef Scalar RhsScalar; typedef Scalar ResScalar; - PACKET_DECL_COND_PREFIX(_, Lhs, _PacketSize); - PACKET_DECL_COND_PREFIX(_, Rhs, _PacketSize); - PACKET_DECL_COND_PREFIX(_, Res, _PacketSize); - PACKET_DECL_COND_PREFIX(_, Real, _PacketSize); - PACKET_DECL_COND_SCALAR_PREFIX(_, _PacketSize); + PACKET_DECL_COND_PREFIX(_, Lhs, PacketSize_); + PACKET_DECL_COND_PREFIX(_, Rhs, PacketSize_); + PACKET_DECL_COND_PREFIX(_, Res, PacketSize_); + PACKET_DECL_COND_PREFIX(_, Real, PacketSize_); + PACKET_DECL_COND_SCALAR_PREFIX(_, PacketSize_); #undef PACKET_DECL_COND_SCALAR_PREFIX #undef PACKET_DECL_COND_PREFIX @@ -942,7 +942,7 @@ public: enum { ConjLhs = false, - ConjRhs = _ConjRhs, + ConjRhs = ConjRhs_, Vectorizable = unpacket_traits<_RealPacket>::vectorizable && unpacket_traits<_ScalarPacket>::vectorizable, LhsPacketSize = Vectorizable ? unpacket_traits<_LhsPacket>::size : 1, diff --git a/Eigen/src/Core/products/GeneralMatrixMatrix.h b/Eigen/src/Core/products/GeneralMatrixMatrix.h index caa65fccc..62a6aaa4a 100644 --- a/Eigen/src/Core/products/GeneralMatrixMatrix.h +++ b/Eigen/src/Core/products/GeneralMatrixMatrix.h @@ -14,7 +14,7 @@ namespace Eigen { namespace internal { -template class level3_blocking; +template class level3_blocking; /* Specialization for a row-major destination matrix => simple transposition of the product */ template< @@ -247,11 +247,11 @@ struct gemm_functor template class gemm_blocking_space; -template +template class level3_blocking { - typedef _LhsScalar LhsScalar; - typedef _RhsScalar RhsScalar; + typedef LhsScalar_ LhsScalar; + typedef RhsScalar_ RhsScalar; protected: LhsScalar* m_blockA; @@ -275,19 +275,19 @@ class level3_blocking inline RhsScalar* blockB() { return m_blockB; } }; -template -class gemm_blocking_space +template +class gemm_blocking_space : public level3_blocking< - typename conditional::type, - typename conditional::type> + typename conditional::type, + typename conditional::type> { enum { Transpose = StorageOrder==RowMajor, ActualRows = Transpose ? MaxCols : MaxRows, ActualCols = Transpose ? MaxRows : MaxCols }; - typedef typename conditional::type LhsScalar; - typedef typename conditional::type RhsScalar; + typedef typename conditional::type LhsScalar; + typedef typename conditional::type RhsScalar; typedef gebp_traits Traits; enum { SizeA = ActualRows * MaxDepth, @@ -326,17 +326,17 @@ class gemm_blocking_space -class gemm_blocking_space +template +class gemm_blocking_space : public level3_blocking< - typename conditional::type, - typename conditional::type> + typename conditional::type, + typename conditional::type> { enum { Transpose = StorageOrder==RowMajor }; - typedef typename conditional::type LhsScalar; - typedef typename conditional::type RhsScalar; + typedef typename conditional::type LhsScalar; + typedef typename conditional::type RhsScalar; typedef gebp_traits Traits; Index m_sizeA; diff --git a/Eigen/src/Core/products/GeneralMatrixVector.h b/Eigen/src/Core/products/GeneralMatrixVector.h index dfb6aebce..0fa5736c9 100644 --- a/Eigen/src/Core/products/GeneralMatrixVector.h +++ b/Eigen/src/Core/products/GeneralMatrixVector.h @@ -29,7 +29,7 @@ struct gemv_packet_cond { typedef T1 type; }; template struct gemv_packet_cond { typedef T2 type; }; -template +template class gemv_traits { typedef typename ScalarBinaryOpTraits::ReturnType ResScalar; @@ -41,9 +41,9 @@ class gemv_traits typename unpacket_traits::half>::half>::type \ prefix ## name ## Packet - PACKET_DECL_COND_PREFIX(_, Lhs, _PacketSize); - PACKET_DECL_COND_PREFIX(_, Rhs, _PacketSize); - PACKET_DECL_COND_PREFIX(_, Res, _PacketSize); + PACKET_DECL_COND_PREFIX(_, Lhs, PacketSize_); + PACKET_DECL_COND_PREFIX(_, Rhs, PacketSize_); + PACKET_DECL_COND_PREFIX(_, Res, PacketSize_); #undef PACKET_DECL_COND_PREFIX public: diff --git a/Eigen/src/Core/util/BlasUtil.h b/Eigen/src/Core/util/BlasUtil.h index e16a56498..5bb86e592 100755 --- a/Eigen/src/Core/util/BlasUtil.h +++ b/Eigen/src/Core/util/BlasUtil.h @@ -308,15 +308,15 @@ public: } // storePacketBlock_helper defines a way to access values inside the PacketBlock, this is essentially required by the Complex types. - template + template struct storePacketBlock_helper { - storePacketBlock_helper spbh; + storePacketBlock_helper spbh; EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE void store(const blas_data_mapper* sup, Index i, Index j, const PacketBlock& block) const { spbh.store(sup, i,j,block); for(int l = 0; l < unpacket_traits::size; l++) { - ScalarT *v = &sup->operator()(i+l, j+idx); + Scalar_ *v = &sup->operator()(i+l, j+idx); *v = block.packet[idx][l]; } } @@ -352,8 +352,8 @@ public: } }; - template - struct storePacketBlock_helper + template + struct storePacketBlock_helper { EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE void store(const blas_data_mapper*, Index, Index, const PacketBlock& ) const { } diff --git a/Eigen/src/Core/util/Constants.h b/Eigen/src/Core/util/Constants.h index 35dcaa7b3..b93f68923 100644 --- a/Eigen/src/Core/util/Constants.h +++ b/Eigen/src/Core/util/Constants.h @@ -312,7 +312,7 @@ enum SpecializedType { }; /** \ingroup enums - * Enum containing possible values for the \p _Options template parameter of + * Enum containing possible values for the \p Options_ template parameter of * Matrix, Array and BandMatrix. */ enum StorageOptions { /** Storage order is column major (see \ref TopicStorageOrders). */ diff --git a/Eigen/src/Core/util/ForwardDeclarations.h b/Eigen/src/Core/util/ForwardDeclarations.h index 2f9cc4491..90db26c84 100644 --- a/Eigen/src/Core/util/ForwardDeclarations.h +++ b/Eigen/src/Core/util/ForwardDeclarations.h @@ -49,24 +49,24 @@ template class DenseBase; template class PlainObjectBase; template class DenseCoeffsBase; -template class Matrix; template class MatrixBase; @@ -97,15 +97,15 @@ template class Product; template class DiagonalBase; template class DiagonalWrapper; -template class DiagonalMatrix; +template class DiagonalMatrix; template class DiagonalProduct; template class Diagonal; template class PermutationMatrix; template class Transpositions; template class PermutationBase; template class TranspositionsBase; -template class PermutationWrapper; -template class TranspositionsWrapper; +template class PermutationWrapper; +template class TranspositionsWrapper; template::has_write_access ? WriteAccessors : ReadOnlyAccessors @@ -142,7 +142,7 @@ template struct image_retval; } // end namespace internal namespace internal { -template class BandMatrix; +template class BandMatrix; } namespace internal { @@ -242,23 +242,23 @@ template struct scalar_bessel_k1e_op; struct IOFormat; // Array module -template class Array; + int MaxRows_ = Rows_, int MaxCols_ = Cols_> class Array; template class Select; template class PartialReduxExpr; template class VectorwiseOp; @@ -283,7 +283,7 @@ template class Ho template class JacobiRotation; // Geometry module: -template class RotationBase; +template class RotationBase; template class Cross; template class QuaternionBase; template class Rotation2D; @@ -291,9 +291,9 @@ template class AngleAxis; template class Translation; template class AlignedBox; template class Quaternion; -template class Transform; -template class ParametrizedLine; -template class Hyperplane; +template class Transform; +template class ParametrizedLine; +template class Hyperplane; template class UniformScaling; template class Homogeneous; diff --git a/Eigen/src/Core/util/XprHelper.h b/Eigen/src/Core/util/XprHelper.h index 71c32b8a1..63885bcfa 100644 --- a/Eigen/src/Core/util/XprHelper.h +++ b/Eigen/src/Core/util/XprHelper.h @@ -247,24 +247,24 @@ template struct compute_default_alignment { enum { value = EIGEN_MAX_ALIGN_BYTES }; }; -template class make_proper_matrix_type { enum { - IsColVector = _Cols==1 && _Rows!=1, - IsRowVector = _Rows==1 && _Cols!=1, - Options = IsColVector ? (_Options | ColMajor) & ~RowMajor - : IsRowVector ? (_Options | RowMajor) & ~ColMajor - : _Options + IsColVector = Cols_==1 && Rows_!=1, + IsRowVector = Rows_==1 && Cols_!=1, + Options = IsColVector ? (Options_ | ColMajor) & ~RowMajor + : IsRowVector ? (Options_ | RowMajor) & ~ColMajor + : Options_ }; public: - typedef Matrix<_Scalar, _Rows, _Cols, Options, _MaxRows, _MaxCols> type; + typedef Matrix type; }; template @@ -278,9 +278,9 @@ class compute_matrix_flags enum { ret = DirectAccessBit | LvalueBit | NestByRefBit | row_major_bit }; }; -template struct size_at_compile_time +template struct size_at_compile_time { - enum { ret = (_Rows==Dynamic || _Cols==Dynamic) ? Dynamic : _Rows * _Cols }; + enum { ret = (Rows_==Dynamic || Cols_==Dynamic) ? Dynamic : Rows_ * Cols_ }; }; template struct size_of_xpr_at_compile_time @@ -350,16 +350,16 @@ template struct eval }; // for matrices, no need to evaluate, just use a const reference to avoid a useless copy -template -struct eval, Dense> +template +struct eval, Dense> { - typedef const Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>& type; + typedef const Matrix& type; }; -template -struct eval, Dense> +template +struct eval, Dense> { - typedef const Array<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>& type; + typedef const Array& type; }; diff --git a/Eigen/src/Eigenvalues/ComplexEigenSolver.h b/Eigen/src/Eigenvalues/ComplexEigenSolver.h index 081e918f1..f658e4eef 100644 --- a/Eigen/src/Eigenvalues/ComplexEigenSolver.h +++ b/Eigen/src/Eigenvalues/ComplexEigenSolver.h @@ -23,7 +23,7 @@ namespace Eigen { * * \brief Computes eigenvalues and eigenvectors of general complex matrices * - * \tparam _MatrixType the type of the matrix of which we are + * \tparam MatrixType_ the type of the matrix of which we are * computing the eigendecomposition; this is expected to be an * instantiation of the Matrix class template. * @@ -42,12 +42,12 @@ namespace Eigen { * * \sa class EigenSolver, class SelfAdjointEigenSolver */ -template class ComplexEigenSolver +template class ComplexEigenSolver { public: - /** \brief Synonym for the template parameter \p _MatrixType. */ - typedef _MatrixType MatrixType; + /** \brief Synonym for the template parameter \p MatrixType_. */ + typedef MatrixType_ MatrixType; enum { RowsAtCompileTime = MatrixType::RowsAtCompileTime, diff --git a/Eigen/src/Eigenvalues/ComplexSchur.h b/Eigen/src/Eigenvalues/ComplexSchur.h index fc71468f8..5beaa3695 100644 --- a/Eigen/src/Eigenvalues/ComplexSchur.h +++ b/Eigen/src/Eigenvalues/ComplexSchur.h @@ -27,7 +27,7 @@ template struct complex_schur_reduce_to_hes * * \brief Performs a complex Schur decomposition of a real or complex square matrix * - * \tparam _MatrixType the type of the matrix of which we are + * \tparam MatrixType_ the type of the matrix of which we are * computing the Schur decomposition; this is expected to be an * instantiation of the Matrix class template. * @@ -48,10 +48,10 @@ template struct complex_schur_reduce_to_hes * * \sa class RealSchur, class EigenSolver, class ComplexEigenSolver */ -template class ComplexSchur +template class ComplexSchur { public: - typedef _MatrixType MatrixType; + typedef MatrixType_ MatrixType; enum { RowsAtCompileTime = MatrixType::RowsAtCompileTime, ColsAtCompileTime = MatrixType::ColsAtCompileTime, @@ -60,12 +60,12 @@ template class ComplexSchur MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime }; - /** \brief Scalar type for matrices of type \p _MatrixType. */ + /** \brief Scalar type for matrices of type \p MatrixType_. */ typedef typename MatrixType::Scalar Scalar; typedef typename NumTraits::Real RealScalar; typedef Eigen::Index Index; ///< \deprecated since Eigen 3.3 - /** \brief Complex scalar type for \p _MatrixType. + /** \brief Complex scalar type for \p MatrixType_. * * This is \c std::complex if #Scalar is real (e.g., * \c float or \c double) and just \c Scalar if #Scalar is @@ -76,7 +76,7 @@ template class ComplexSchur /** \brief Type for the matrices in the Schur decomposition. * * This is a square matrix with entries of type #ComplexScalar. - * The size is the same as the size of \p _MatrixType. + * The size is the same as the size of \p MatrixType_. */ typedef Matrix ComplexMatrixType; diff --git a/Eigen/src/Eigenvalues/EigenSolver.h b/Eigen/src/Eigenvalues/EigenSolver.h index 572b29e4e..d4126010e 100644 --- a/Eigen/src/Eigenvalues/EigenSolver.h +++ b/Eigen/src/Eigenvalues/EigenSolver.h @@ -22,7 +22,7 @@ namespace Eigen { * * \brief Computes eigenvalues and eigenvectors of general matrices * - * \tparam _MatrixType the type of the matrix of which we are computing the + * \tparam MatrixType_ the type of the matrix of which we are computing the * eigendecomposition; this is expected to be an instantiation of the Matrix * class template. Currently, only real matrices are supported. * @@ -61,12 +61,12 @@ namespace Eigen { * * \sa MatrixBase::eigenvalues(), class ComplexEigenSolver, class SelfAdjointEigenSolver */ -template class EigenSolver +template class EigenSolver { public: - /** \brief Synonym for the template parameter \p _MatrixType. */ - typedef _MatrixType MatrixType; + /** \brief Synonym for the template parameter \p MatrixType_. */ + typedef MatrixType_ MatrixType; enum { RowsAtCompileTime = MatrixType::RowsAtCompileTime, diff --git a/Eigen/src/Eigenvalues/GeneralizedEigenSolver.h b/Eigen/src/Eigenvalues/GeneralizedEigenSolver.h index 87d789b3f..fbc767973 100644 --- a/Eigen/src/Eigenvalues/GeneralizedEigenSolver.h +++ b/Eigen/src/Eigenvalues/GeneralizedEigenSolver.h @@ -23,7 +23,7 @@ namespace Eigen { * * \brief Computes the generalized eigenvalues and eigenvectors of a pair of general matrices * - * \tparam _MatrixType the type of the matrices of which we are computing the + * \tparam MatrixType_ the type of the matrices of which we are computing the * eigen-decomposition; this is expected to be an instantiation of the Matrix * class template. Currently, only real matrices are supported. * @@ -55,12 +55,12 @@ namespace Eigen { * * \sa MatrixBase::eigenvalues(), class ComplexEigenSolver, class SelfAdjointEigenSolver */ -template class GeneralizedEigenSolver +template class GeneralizedEigenSolver { public: - /** \brief Synonym for the template parameter \p _MatrixType. */ - typedef _MatrixType MatrixType; + /** \brief Synonym for the template parameter \p MatrixType_. */ + typedef MatrixType_ MatrixType; enum { RowsAtCompileTime = MatrixType::RowsAtCompileTime, diff --git a/Eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h b/Eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h index d0f9091be..fd1105b19 100644 --- a/Eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h +++ b/Eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h @@ -22,7 +22,7 @@ namespace Eigen { * * \brief Computes eigenvalues and eigenvectors of the generalized selfadjoint eigen problem * - * \tparam _MatrixType the type of the matrix of which we are computing the + * \tparam MatrixType_ the type of the matrix of which we are computing the * eigendecomposition; this is expected to be an instantiation of the Matrix * class template. * @@ -44,19 +44,19 @@ namespace Eigen { * * \sa class SelfAdjointEigenSolver, class EigenSolver, class ComplexEigenSolver */ -template -class GeneralizedSelfAdjointEigenSolver : public SelfAdjointEigenSolver<_MatrixType> +template +class GeneralizedSelfAdjointEigenSolver : public SelfAdjointEigenSolver { - typedef SelfAdjointEigenSolver<_MatrixType> Base; + typedef SelfAdjointEigenSolver Base; public: - typedef _MatrixType MatrixType; + typedef MatrixType_ MatrixType; /** \brief Default constructor for fixed-size matrices. * * The default constructor is useful in cases in which the user intends to * perform decompositions via compute(). This constructor - * can only be used if \p _MatrixType is a fixed-size matrix; use + * can only be used if \p MatrixType_ is a fixed-size matrix; use * GeneralizedSelfAdjointEigenSolver(Index) for dynamic-size matrices. */ GeneralizedSelfAdjointEigenSolver() : Base() {} diff --git a/Eigen/src/Eigenvalues/HessenbergDecomposition.h b/Eigen/src/Eigenvalues/HessenbergDecomposition.h index 1f2113934..ae855b906 100644 --- a/Eigen/src/Eigenvalues/HessenbergDecomposition.h +++ b/Eigen/src/Eigenvalues/HessenbergDecomposition.h @@ -31,7 +31,7 @@ struct traits > * * \brief Reduces a square matrix to Hessenberg form by an orthogonal similarity transformation * - * \tparam _MatrixType the type of the matrix of which we are computing the Hessenberg decomposition + * \tparam MatrixType_ the type of the matrix of which we are computing the Hessenberg decomposition * * This class performs an Hessenberg decomposition of a matrix \f$ A \f$. In * the real case, the Hessenberg decomposition consists of an orthogonal @@ -54,12 +54,12 @@ struct traits > * * \sa class ComplexSchur, class Tridiagonalization, \ref QR_Module "QR Module" */ -template class HessenbergDecomposition +template class HessenbergDecomposition { public: - /** \brief Synonym for the template parameter \p _MatrixType. */ - typedef _MatrixType MatrixType; + /** \brief Synonym for the template parameter \p MatrixType_. */ + typedef MatrixType_ MatrixType; enum { Size = MatrixType::RowsAtCompileTime, diff --git a/Eigen/src/Eigenvalues/RealQZ.h b/Eigen/src/Eigenvalues/RealQZ.h index 509130184..0fe8543cb 100644 --- a/Eigen/src/Eigenvalues/RealQZ.h +++ b/Eigen/src/Eigenvalues/RealQZ.h @@ -19,7 +19,7 @@ namespace Eigen { * * \brief Performs a real QZ decomposition of a pair of square matrices * - * \tparam _MatrixType the type of the matrix of which we are computing the + * \tparam MatrixType_ the type of the matrix of which we are computing the * real QZ decomposition; this is expected to be an instantiation of the * Matrix class template. * @@ -54,10 +54,10 @@ namespace Eigen { * \sa class RealSchur, class ComplexSchur, class EigenSolver, class ComplexEigenSolver */ - template class RealQZ + template class RealQZ { public: - typedef _MatrixType MatrixType; + typedef MatrixType_ MatrixType; enum { RowsAtCompileTime = MatrixType::RowsAtCompileTime, ColsAtCompileTime = MatrixType::ColsAtCompileTime, diff --git a/Eigen/src/Eigenvalues/RealSchur.h b/Eigen/src/Eigenvalues/RealSchur.h index 7304ef344..5b7d38c69 100644 --- a/Eigen/src/Eigenvalues/RealSchur.h +++ b/Eigen/src/Eigenvalues/RealSchur.h @@ -22,7 +22,7 @@ namespace Eigen { * * \brief Performs a real Schur decomposition of a square matrix * - * \tparam _MatrixType the type of the matrix of which we are computing the + * \tparam MatrixType_ the type of the matrix of which we are computing the * real Schur decomposition; this is expected to be an instantiation of the * Matrix class template. * @@ -51,10 +51,10 @@ namespace Eigen { * * \sa class ComplexSchur, class EigenSolver, class ComplexEigenSolver */ -template class RealSchur +template class RealSchur { public: - typedef _MatrixType MatrixType; + typedef MatrixType_ MatrixType; enum { RowsAtCompileTime = MatrixType::RowsAtCompileTime, ColsAtCompileTime = MatrixType::ColsAtCompileTime, diff --git a/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h b/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h index 59e59644e..8cc7b4d2f 100644 --- a/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h +++ b/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h @@ -15,7 +15,7 @@ namespace Eigen { -template +template class GeneralizedSelfAdjointEigenSolver; namespace internal { @@ -33,7 +33,7 @@ ComputationInfo computeFromTridiagonal_impl(DiagType& diag, SubDiagType& subdiag * * \brief Computes eigenvalues and eigenvectors of selfadjoint matrices * - * \tparam _MatrixType the type of the matrix of which we are computing the + * \tparam MatrixType_ the type of the matrix of which we are computing the * eigendecomposition; this is expected to be an instantiation of the Matrix * class template. * @@ -73,11 +73,11 @@ ComputationInfo computeFromTridiagonal_impl(DiagType& diag, SubDiagType& subdiag * * \sa MatrixBase::eigenvalues(), class EigenSolver, class ComplexEigenSolver */ -template class SelfAdjointEigenSolver +template class SelfAdjointEigenSolver { public: - typedef _MatrixType MatrixType; + typedef MatrixType_ MatrixType; enum { Size = MatrixType::RowsAtCompileTime, ColsAtCompileTime = MatrixType::ColsAtCompileTime, @@ -85,13 +85,13 @@ template class SelfAdjointEigenSolver MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime }; - /** \brief Scalar type for matrices of type \p _MatrixType. */ + /** \brief Scalar type for matrices of type \p MatrixType_. */ typedef typename MatrixType::Scalar Scalar; typedef Eigen::Index Index; ///< \deprecated since Eigen 3.3 typedef Matrix EigenvectorsType; - /** \brief Real scalar type for \p _MatrixType. + /** \brief Real scalar type for \p MatrixType_. * * This is just \c Scalar if #Scalar is real (e.g., \c float or * \c double), and the type of the real part of \c Scalar if #Scalar is @@ -104,7 +104,7 @@ template class SelfAdjointEigenSolver /** \brief Type for vector of eigenvalues as returned by eigenvalues(). * * This is a column vector with entries of type #RealScalar. - * The length of the vector is the size of \p _MatrixType. + * The length of the vector is the size of \p MatrixType_. */ typedef typename internal::plain_col_type::type RealVectorType; typedef Tridiagonalization TridiagonalizationType; @@ -114,7 +114,7 @@ template class SelfAdjointEigenSolver * * The default constructor is useful in cases in which the user intends to * perform decompositions via compute(). This constructor - * can only be used if \p _MatrixType is a fixed-size matrix; use + * can only be used if \p MatrixType_ is a fixed-size matrix; use * SelfAdjointEigenSolver(Index) for dynamic-size matrices. * * Example: \include SelfAdjointEigenSolver_SelfAdjointEigenSolver.cpp diff --git a/Eigen/src/Eigenvalues/Tridiagonalization.h b/Eigen/src/Eigenvalues/Tridiagonalization.h index 6c8084f76..2fd009623 100644 --- a/Eigen/src/Eigenvalues/Tridiagonalization.h +++ b/Eigen/src/Eigenvalues/Tridiagonalization.h @@ -36,7 +36,7 @@ void tridiagonalization_inplace(MatrixType& matA, CoeffVectorType& hCoeffs); * * \brief Tridiagonal decomposition of a selfadjoint matrix * - * \tparam _MatrixType the type of the matrix of which we are computing the + * \tparam MatrixType_ the type of the matrix of which we are computing the * tridiagonal decomposition; this is expected to be an instantiation of the * Matrix class template. * @@ -61,12 +61,12 @@ void tridiagonalization_inplace(MatrixType& matA, CoeffVectorType& hCoeffs); * * \sa class HessenbergDecomposition, class SelfAdjointEigenSolver */ -template class Tridiagonalization +template class Tridiagonalization { public: - /** \brief Synonym for the template parameter \p _MatrixType. */ - typedef _MatrixType MatrixType; + /** \brief Synonym for the template parameter \p MatrixType_. */ + typedef MatrixType_ MatrixType; typedef typename MatrixType::Scalar Scalar; typedef typename NumTraits::Real RealScalar; diff --git a/Eigen/src/Geometry/AlignedBox.h b/Eigen/src/Geometry/AlignedBox.h index 55a9d0ae1..7481ea3da 100644 --- a/Eigen/src/Geometry/AlignedBox.h +++ b/Eigen/src/Geometry/AlignedBox.h @@ -55,20 +55,20 @@ namespace Eigen { * * \brief An axis aligned box * - * \tparam _Scalar the type of the scalar coefficients + * \tparam Scalar_ the type of the scalar coefficients * \tparam _AmbientDim the dimension of the ambient space, can be a compile time value or Dynamic. * * This class represents an axis aligned box as a pair of the minimal and maximal corners. * \warning The result of most methods is undefined when applied to an empty box. You can check for empty boxes using isEmpty(). * \sa alignedboxtypedefs */ -template +template class AlignedBox { public: -EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(_Scalar,_AmbientDim) +EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(Scalar_,_AmbientDim) enum { AmbientDimAtCompileTime = _AmbientDim }; - typedef _Scalar Scalar; + typedef Scalar_ Scalar; typedef NumTraits ScalarTraits; typedef Eigen::Index Index; ///< \deprecated since Eigen 3.3 typedef typename ScalarTraits::Real RealScalar; diff --git a/Eigen/src/Geometry/AngleAxis.h b/Eigen/src/Geometry/AngleAxis.h index 78328b6b5..d23fd59e5 100644 --- a/Eigen/src/Geometry/AngleAxis.h +++ b/Eigen/src/Geometry/AngleAxis.h @@ -18,7 +18,7 @@ namespace Eigen { * * \brief Represents a 3D rotation as a rotation angle around an arbitrary 3D axis * - * \param _Scalar the scalar type, i.e., the type of the coefficients. + * \param Scalar_ the scalar type, i.e., the type of the coefficients. * * \warning When setting up an AngleAxis object, the axis vector \b must \b be \b normalized. * @@ -39,16 +39,16 @@ namespace Eigen { */ namespace internal { -template struct traits > +template struct traits > { - typedef _Scalar Scalar; + typedef Scalar_ Scalar; }; } -template -class AngleAxis : public RotationBase,3> +template +class AngleAxis : public RotationBase,3> { - typedef RotationBase,3> Base; + typedef RotationBase,3> Base; public: @@ -56,7 +56,7 @@ public: enum { Dim = 3 }; /** the scalar type of the coefficients */ - typedef _Scalar Scalar; + typedef Scalar_ Scalar; typedef Matrix Matrix3; typedef Matrix Vector3; typedef Quaternion QuaternionType; diff --git a/Eigen/src/Geometry/Homogeneous.h b/Eigen/src/Geometry/Homogeneous.h index 94083ac54..e909984a2 100644 --- a/Eigen/src/Geometry/Homogeneous.h +++ b/Eigen/src/Geometry/Homogeneous.h @@ -57,13 +57,13 @@ template struct homogeneous_right_product_impl } // end namespace internal -template class Homogeneous - : public MatrixBase >, internal::no_assignment_operator +template class Homogeneous + : public MatrixBase >, internal::no_assignment_operator { public: typedef MatrixType NestedExpression; - enum { Direction = _Direction }; + enum { Direction = Direction_ }; typedef MatrixBase Base; EIGEN_DENSE_PUBLIC_INTERFACE(Homogeneous) diff --git a/Eigen/src/Geometry/Hyperplane.h b/Eigen/src/Geometry/Hyperplane.h index cebe03557..268c9ddc0 100644 --- a/Eigen/src/Geometry/Hyperplane.h +++ b/Eigen/src/Geometry/Hyperplane.h @@ -22,7 +22,7 @@ namespace Eigen { * A hyperplane is an affine subspace of dimension n-1 in a space of dimension n. * For example, a hyperplane in a plane is a line; a hyperplane in 3-space is a plane. * - * \tparam _Scalar the scalar type, i.e., the type of the coefficients + * \tparam Scalar_ the scalar type, i.e., the type of the coefficients * \tparam _AmbientDim the dimension of the ambient space, can be a compile time value or Dynamic. * Notice that the dimension of the hyperplane is _AmbientDim-1. * @@ -30,16 +30,16 @@ namespace Eigen { * \f$ n \cdot x + d = 0 \f$ where \f$ n \f$ is a unit normal vector of the plane (linear part) * and \f$ d \f$ is the distance (offset) to the origin. */ -template +template class Hyperplane { public: - EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(_Scalar,_AmbientDim==Dynamic ? Dynamic : _AmbientDim+1) + EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(Scalar_,_AmbientDim==Dynamic ? Dynamic : _AmbientDim+1) enum { AmbientDimAtCompileTime = _AmbientDim, - Options = _Options + Options = Options_ }; - typedef _Scalar Scalar; + typedef Scalar_ Scalar; typedef typename NumTraits::Real RealScalar; typedef Eigen::Index Index; ///< \deprecated since Eigen 3.3 typedef Matrix VectorType; diff --git a/Eigen/src/Geometry/ParametrizedLine.h b/Eigen/src/Geometry/ParametrizedLine.h index 584f50087..9ade8dcf4 100644 --- a/Eigen/src/Geometry/ParametrizedLine.h +++ b/Eigen/src/Geometry/ParametrizedLine.h @@ -23,19 +23,19 @@ namespace Eigen { * direction vector \f$ \mathbf{d} \f$ such that the line corresponds to * the set \f$ l(t) = \mathbf{o} + t \mathbf{d} \f$, \f$ t \in \mathbf{R} \f$. * - * \tparam _Scalar the scalar type, i.e., the type of the coefficients + * \tparam Scalar_ the scalar type, i.e., the type of the coefficients * \tparam _AmbientDim the dimension of the ambient space, can be a compile time value or Dynamic. */ -template +template class ParametrizedLine { public: - EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(_Scalar,_AmbientDim) + EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(Scalar_,_AmbientDim) enum { AmbientDimAtCompileTime = _AmbientDim, - Options = _Options + Options = Options_ }; - typedef _Scalar Scalar; + typedef Scalar_ Scalar; typedef typename NumTraits::Real RealScalar; typedef Eigen::Index Index; ///< \deprecated since Eigen 3.3 typedef Matrix VectorType; @@ -59,7 +59,7 @@ public: : m_origin(origin), m_direction(direction) {} template - EIGEN_DEVICE_FUNC explicit ParametrizedLine(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane); + EIGEN_DEVICE_FUNC explicit ParametrizedLine(const Hyperplane& hyperplane); /** Constructs a parametrized line going from \a p0 to \a p1. */ EIGEN_DEVICE_FUNC static inline ParametrizedLine Through(const VectorType& p0, const VectorType& p1) @@ -96,13 +96,13 @@ public: EIGEN_DEVICE_FUNC VectorType pointAt(const Scalar& t) const; template - EIGEN_DEVICE_FUNC Scalar intersectionParameter(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane) const; + EIGEN_DEVICE_FUNC Scalar intersectionParameter(const Hyperplane& hyperplane) const; template - EIGEN_DEVICE_FUNC Scalar intersection(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane) const; + EIGEN_DEVICE_FUNC Scalar intersection(const Hyperplane& hyperplane) const; template - EIGEN_DEVICE_FUNC VectorType intersectionPoint(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane) const; + EIGEN_DEVICE_FUNC VectorType intersectionPoint(const Hyperplane& hyperplane) const; /** Applies the transformation matrix \a mat to \c *this and returns a reference to \c *this. * @@ -178,9 +178,9 @@ protected: * * \warning the ambient space must have dimension 2 such that the hyperplane actually describes a line */ -template +template template -EIGEN_DEVICE_FUNC inline ParametrizedLine<_Scalar, _AmbientDim,_Options>::ParametrizedLine(const Hyperplane<_Scalar, _AmbientDim,OtherOptions>& hyperplane) +EIGEN_DEVICE_FUNC inline ParametrizedLine::ParametrizedLine(const Hyperplane& hyperplane) { EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(VectorType, 2) direction() = hyperplane.normal().unitOrthogonal(); @@ -189,18 +189,18 @@ EIGEN_DEVICE_FUNC inline ParametrizedLine<_Scalar, _AmbientDim,_Options>::Parame /** \returns the point at \a t along this line */ -template -EIGEN_DEVICE_FUNC inline typename ParametrizedLine<_Scalar, _AmbientDim,_Options>::VectorType -ParametrizedLine<_Scalar, _AmbientDim,_Options>::pointAt(const _Scalar& t) const +template +EIGEN_DEVICE_FUNC inline typename ParametrizedLine::VectorType +ParametrizedLine::pointAt(const Scalar_& t) const { return origin() + (direction()*t); } /** \returns the parameter value of the intersection between \c *this and the given \a hyperplane */ -template +template template -EIGEN_DEVICE_FUNC inline _Scalar ParametrizedLine<_Scalar, _AmbientDim,_Options>::intersectionParameter(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane) const +EIGEN_DEVICE_FUNC inline Scalar_ ParametrizedLine::intersectionParameter(const Hyperplane& hyperplane) const { return -(hyperplane.offset()+hyperplane.normal().dot(origin())) / hyperplane.normal().dot(direction()); @@ -210,19 +210,19 @@ EIGEN_DEVICE_FUNC inline _Scalar ParametrizedLine<_Scalar, _AmbientDim,_Options> /** \deprecated use intersectionParameter() * \returns the parameter value of the intersection between \c *this and the given \a hyperplane */ -template +template template -EIGEN_DEVICE_FUNC inline _Scalar ParametrizedLine<_Scalar, _AmbientDim,_Options>::intersection(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane) const +EIGEN_DEVICE_FUNC inline Scalar_ ParametrizedLine::intersection(const Hyperplane& hyperplane) const { return intersectionParameter(hyperplane); } /** \returns the point of the intersection between \c *this and the given hyperplane */ -template +template template -EIGEN_DEVICE_FUNC inline typename ParametrizedLine<_Scalar, _AmbientDim,_Options>::VectorType -ParametrizedLine<_Scalar, _AmbientDim,_Options>::intersectionPoint(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane) const +EIGEN_DEVICE_FUNC inline typename ParametrizedLine::VectorType +ParametrizedLine::intersectionPoint(const Hyperplane& hyperplane) const { return pointAt(intersectionParameter(hyperplane)); } diff --git a/Eigen/src/Geometry/Quaternion.h b/Eigen/src/Geometry/Quaternion.h index 3259e592d..4c929c56a 100644 --- a/Eigen/src/Geometry/Quaternion.h +++ b/Eigen/src/Geometry/Quaternion.h @@ -236,8 +236,8 @@ protected: * * \brief The quaternion class used to represent 3D orientations and rotations * - * \tparam _Scalar the scalar type, i.e., the type of the coefficients - * \tparam _Options controls the memory alignment of the coefficients. Can be \# AutoAlign or \# DontAlign. Default is AutoAlign. + * \tparam Scalar_ the scalar type, i.e., the type of the coefficients + * \tparam Options_ controls the memory alignment of the coefficients. Can be \# AutoAlign or \# DontAlign. Default is AutoAlign. * * This class represents a quaternion \f$ w+xi+yj+zk \f$ that is a convenient representation of * orientations and rotations of objects in three dimensions. Compared to other representations @@ -256,12 +256,12 @@ protected: */ namespace internal { -template -struct traits > +template +struct traits > { - typedef Quaternion<_Scalar,_Options> PlainObject; - typedef _Scalar Scalar; - typedef Matrix<_Scalar,4,1,_Options> Coefficients; + typedef Quaternion PlainObject; + typedef Scalar_ Scalar; + typedef Matrix Coefficients; enum{ Alignment = internal::traits::Alignment, Flags = LvalueBit @@ -269,14 +269,14 @@ struct traits > }; } -template -class Quaternion : public QuaternionBase > +template +class Quaternion : public QuaternionBase > { public: - typedef QuaternionBase > Base; + typedef QuaternionBase > Base; enum { NeedsAlignment = internal::traits::Alignment>0 }; - typedef _Scalar Scalar; + typedef Scalar_ Scalar; EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Quaternion) using Base::operator*=; @@ -352,7 +352,7 @@ protected: #ifndef EIGEN_PARSED_BY_DOXYGEN static EIGEN_STRONG_INLINE void _check_template_params() { - EIGEN_STATIC_ASSERT( (_Options & DontAlign) == _Options, + EIGEN_STATIC_ASSERT( (Options_ & DontAlign) == Options_, INVALID_MATRIX_TEMPLATE_PARAMETERS) } #endif @@ -370,19 +370,19 @@ typedef Quaternion Quaterniond; ***************************************************************************/ namespace internal { - template - struct traits, _Options> > : traits > + template + struct traits, Options_> > : traits > { - typedef Map, _Options> Coefficients; + typedef Map, Options_> Coefficients; }; } namespace internal { - template - struct traits, _Options> > : traits > + template + struct traits, Options_> > : traits > { - typedef Map, _Options> Coefficients; - typedef traits > TraitsBase; + typedef Map, Options_> Coefficients; + typedef traits > TraitsBase; enum { Flags = TraitsBase::Flags & ~LvalueBit }; @@ -392,22 +392,22 @@ namespace internal { /** \ingroup Geometry_Module * \brief Quaternion expression mapping a constant memory buffer * - * \tparam _Scalar the type of the Quaternion coefficients - * \tparam _Options see class Map + * \tparam Scalar_ the type of the Quaternion coefficients + * \tparam Options_ see class Map * * This is a specialization of class Map for Quaternion. This class allows to view * a 4 scalar memory buffer as an Eigen's Quaternion object. * * \sa class Map, class Quaternion, class QuaternionBase */ -template -class Map, _Options > - : public QuaternionBase, _Options> > +template +class Map, Options_ > + : public QuaternionBase, Options_> > { public: - typedef QuaternionBase, _Options> > Base; + typedef QuaternionBase, Options_> > Base; - typedef _Scalar Scalar; + typedef Scalar_ Scalar; typedef typename internal::traits::Coefficients Coefficients; EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Map) using Base::operator*=; @@ -417,7 +417,7 @@ class Map, _Options > * The pointer \a coeffs must reference the four coefficients of Quaternion in the following order: * \code *coeffs == {x, y, z, w} \endcode * - * If the template parameter _Options is set to #Aligned, then the pointer coeffs must be aligned. */ + * If the template parameter Options_ is set to #Aligned, then the pointer coeffs must be aligned. */ EIGEN_DEVICE_FUNC explicit EIGEN_STRONG_INLINE Map(const Scalar* coeffs) : m_coeffs(coeffs) {} EIGEN_DEVICE_FUNC inline const Coefficients& coeffs() const { return m_coeffs;} @@ -429,22 +429,22 @@ class Map, _Options > /** \ingroup Geometry_Module * \brief Expression of a quaternion from a memory buffer * - * \tparam _Scalar the type of the Quaternion coefficients - * \tparam _Options see class Map + * \tparam Scalar_ the type of the Quaternion coefficients + * \tparam Options_ see class Map * * This is a specialization of class Map for Quaternion. This class allows to view * a 4 scalar memory buffer as an Eigen's Quaternion object. * * \sa class Map, class Quaternion, class QuaternionBase */ -template -class Map, _Options > - : public QuaternionBase, _Options> > +template +class Map, Options_ > + : public QuaternionBase, Options_> > { public: - typedef QuaternionBase, _Options> > Base; + typedef QuaternionBase, Options_> > Base; - typedef _Scalar Scalar; + typedef Scalar_ Scalar; typedef typename internal::traits::Coefficients Coefficients; EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Map) using Base::operator*=; @@ -454,7 +454,7 @@ class Map, _Options > * The pointer \a coeffs must reference the four coefficients of Quaternion in the following order: * \code *coeffs == {x, y, z, w} \endcode * - * If the template parameter _Options is set to #Aligned, then the pointer coeffs must be aligned. */ + * If the template parameter Options_ is set to #Aligned, then the pointer coeffs must be aligned. */ EIGEN_DEVICE_FUNC explicit EIGEN_STRONG_INLINE Map(Scalar* coeffs) : m_coeffs(coeffs) {} EIGEN_DEVICE_FUNC inline Coefficients& coeffs() { return m_coeffs; } diff --git a/Eigen/src/Geometry/Rotation2D.h b/Eigen/src/Geometry/Rotation2D.h index d0bd57569..74d9f879f 100644 --- a/Eigen/src/Geometry/Rotation2D.h +++ b/Eigen/src/Geometry/Rotation2D.h @@ -18,7 +18,7 @@ namespace Eigen { * * \brief Represents a rotation/orientation in a 2 dimensional space. * - * \tparam _Scalar the scalar type, i.e., the type of the coefficients + * \tparam Scalar_ the scalar type, i.e., the type of the coefficients * * This class is equivalent to a single scalar representing a counter clock wise rotation * as a single angle in radian. It provides some additional features such as the automatic @@ -31,16 +31,16 @@ namespace Eigen { namespace internal { -template struct traits > +template struct traits > { - typedef _Scalar Scalar; + typedef Scalar_ Scalar; }; } // end namespace internal -template -class Rotation2D : public RotationBase,2> +template +class Rotation2D : public RotationBase,2> { - typedef RotationBase,2> Base; + typedef RotationBase,2> Base; public: @@ -48,7 +48,7 @@ public: enum { Dim = 2 }; /** the scalar type of the coefficients */ - typedef _Scalar Scalar; + typedef Scalar_ Scalar; typedef Matrix Vector2; typedef Matrix Matrix2; diff --git a/Eigen/src/Geometry/RotationBase.h b/Eigen/src/Geometry/RotationBase.h index f0ee0bd03..bdbec1e15 100644 --- a/Eigen/src/Geometry/RotationBase.h +++ b/Eigen/src/Geometry/RotationBase.h @@ -23,13 +23,13 @@ struct rotation_base_generic_product_selector; * \brief Common base class for compact rotation representations * * \tparam Derived is the derived type, i.e., a rotation type - * \tparam _Dim the dimension of the space + * \tparam Dim_ the dimension of the space */ -template +template class RotationBase { public: - enum { Dim = _Dim }; + enum { Dim = Dim_ }; /** the scalar type of the coefficients */ typedef typename internal::traits::Scalar Scalar; @@ -135,9 +135,9 @@ struct rotation_base_generic_product_selector +template template -EIGEN_DEVICE_FUNC Matrix<_Scalar, _Rows, _Cols, _Storage, _MaxRows, _MaxCols> +EIGEN_DEVICE_FUNC Matrix ::Matrix(const RotationBase& r) { EIGEN_STATIC_ASSERT_MATRIX_SPECIFIC_SIZE(Matrix,int(OtherDerived::Dim),int(OtherDerived::Dim)) @@ -148,10 +148,10 @@ EIGEN_DEVICE_FUNC Matrix<_Scalar, _Rows, _Cols, _Storage, _MaxRows, _MaxCols> * * \brief Set a Dim x Dim rotation matrix from the rotation \a r */ -template +template template -EIGEN_DEVICE_FUNC Matrix<_Scalar, _Rows, _Cols, _Storage, _MaxRows, _MaxCols>& -Matrix<_Scalar, _Rows, _Cols, _Storage, _MaxRows, _MaxCols> +EIGEN_DEVICE_FUNC Matrix& +Matrix ::operator=(const RotationBase& r) { EIGEN_STATIC_ASSERT_MATRIX_SPECIFIC_SIZE(Matrix,int(OtherDerived::Dim),int(OtherDerived::Dim)) diff --git a/Eigen/src/Geometry/Scaling.h b/Eigen/src/Geometry/Scaling.h index d352f1f2b..4e757534f 100644 --- a/Eigen/src/Geometry/Scaling.h +++ b/Eigen/src/Geometry/Scaling.h @@ -18,7 +18,7 @@ namespace Eigen { * * \brief Represents a generic uniform scaling transformation * - * \tparam _Scalar the scalar type, i.e., the type of the coefficients. + * \tparam Scalar_ the scalar type, i.e., the type of the coefficients. * * This class represent a uniform scaling transformation. It is the return * type of Scaling(Scalar), and most of the time this is the only way it @@ -45,12 +45,12 @@ namespace internal }; } -template +template class UniformScaling { public: /** the scalar type of the coefficients */ - typedef _Scalar Scalar; + typedef Scalar_ Scalar; protected: diff --git a/Eigen/src/Geometry/Transform.h b/Eigen/src/Geometry/Transform.h index 52b8c2a4e..56b10e620 100644 --- a/Eigen/src/Geometry/Transform.h +++ b/Eigen/src/Geometry/Transform.h @@ -63,15 +63,15 @@ struct transform_construct_from_matrix; template struct transform_take_affine_part; -template -struct traits > +template +struct traits > { - typedef _Scalar Scalar; + typedef Scalar_ Scalar; typedef Eigen::Index StorageIndex; typedef Dense StorageKind; enum { - Dim1 = _Dim==Dynamic ? _Dim : _Dim + 1, - RowsAtCompileTime = _Mode==Projective ? Dim1 : _Dim, + Dim1 = Dim_==Dynamic ? Dim_ : Dim_ + 1, + RowsAtCompileTime = _Mode==Projective ? Dim1 : Dim_, ColsAtCompileTime = Dim1, MaxRowsAtCompileTime = RowsAtCompileTime, MaxColsAtCompileTime = ColsAtCompileTime, @@ -89,8 +89,8 @@ template struct transform_make_affine; * * \brief Represents an homogeneous transformation in a N dimensional space * - * \tparam _Scalar the scalar type, i.e., the type of the coefficients - * \tparam _Dim the dimension of the space + * \tparam Scalar_ the scalar type, i.e., the type of the coefficients + * \tparam Dim_ the dimension of the space * \tparam _Mode the type of the transformation. Can be: * - #Affine: the transformation is stored as a (Dim+1)^2 matrix, * where the last row is assumed to be [0 ... 0 1]. @@ -100,7 +100,7 @@ template struct transform_make_affine; * - #Isometry: same as #Affine with the additional assumption that * the linear part represents a rotation. This assumption is exploited * to speed up some functions such as inverse() and rotation(). - * \tparam _Options has the same meaning as in class Matrix. It allows to specify DontAlign and/or RowMajor. + * \tparam Options_ has the same meaning as in class Matrix. It allows to specify DontAlign and/or RowMajor. * These Options are passed directly to the underlying matrix type. * * The homography is internally represented and stored by a matrix which @@ -200,20 +200,20 @@ template struct transform_make_affine; * * \sa class Matrix, class Quaternion */ -template +template class Transform { public: - EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(_Scalar,_Dim==Dynamic ? Dynamic : (_Dim+1)*(_Dim+1)) + EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(Scalar_,Dim_==Dynamic ? Dynamic : (Dim_+1)*(Dim_+1)) enum { Mode = _Mode, - Options = _Options, - Dim = _Dim, ///< space dimension in which the transformation holds - HDim = _Dim+1, ///< size of a respective homogeneous vector + Options = Options_, + Dim = Dim_, ///< space dimension in which the transformation holds + HDim = Dim_+1, ///< size of a respective homogeneous vector Rows = int(Mode)==(AffineCompact) ? Dim : HDim }; /** the scalar type of the coefficients */ - typedef _Scalar Scalar; + typedef Scalar_ Scalar; typedef Eigen::Index StorageIndex; typedef Eigen::Index Index; ///< \deprecated since Eigen 3.3 /** type of the matrix used to represent the transformation */ @@ -443,7 +443,7 @@ public: * \li a general transformation matrix of size Dim+1 x Dim+1. */ template friend - EIGEN_DEVICE_FUNC inline const typename internal::transform_left_product_impl::ResultType + EIGEN_DEVICE_FUNC inline const typename internal::transform_left_product_impl::ResultType operator * (const EigenBase &a, const Transform &b) { return internal::transform_left_product_impl::run(a.derived(),b); } diff --git a/Eigen/src/Geometry/Translation.h b/Eigen/src/Geometry/Translation.h index 8c2290121..cad623bfb 100644 --- a/Eigen/src/Geometry/Translation.h +++ b/Eigen/src/Geometry/Translation.h @@ -18,23 +18,23 @@ namespace Eigen { * * \brief Represents a translation transformation * - * \tparam _Scalar the scalar type, i.e., the type of the coefficients. - * \tparam _Dim the dimension of the space, can be a compile time value or Dynamic + * \tparam Scalar_ the scalar type, i.e., the type of the coefficients. + * \tparam Dim_ the dimension of the space, can be a compile time value or Dynamic * * \note This class is not aimed to be used to store a translation transformation, * but rather to make easier the constructions and updates of Transform objects. * * \sa class Scaling, class Transform */ -template +template class Translation { public: - EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(_Scalar,_Dim) + EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(Scalar_,Dim_) /** dimension of the space */ - enum { Dim = _Dim }; + enum { Dim = Dim_ }; /** the scalar type of the coefficients */ - typedef _Scalar Scalar; + typedef Scalar_ Scalar; /** corresponding vector type */ typedef Matrix VectorType; /** corresponding linear transformation matrix type */ diff --git a/Eigen/src/Householder/HouseholderSequence.h b/Eigen/src/Householder/HouseholderSequence.h index 022f6c3db..984b236d7 100644 --- a/Eigen/src/Householder/HouseholderSequence.h +++ b/Eigen/src/Householder/HouseholderSequence.h @@ -428,7 +428,7 @@ template class HouseholderS return res; } - template friend struct internal::hseq_side_dependent_impl; + template friend struct internal::hseq_side_dependent_impl; /** \brief Sets the length of the Householder sequence. * \param [in] length New value for the length. diff --git a/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h b/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h index a117fc155..3adfe4fdd 100644 --- a/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h +++ b/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h @@ -21,7 +21,7 @@ namespace Eigen { A.diagonal().asDiagonal() . x = b \endcode * - * \tparam _Scalar the type of the scalar. + * \tparam Scalar_ the type of the scalar. * * \implsparsesolverconcept * @@ -32,10 +32,10 @@ namespace Eigen { * * \sa class LeastSquareDiagonalPreconditioner, class ConjugateGradient */ -template +template class DiagonalPreconditioner { - typedef _Scalar Scalar; + typedef Scalar_ Scalar; typedef Matrix Vector; public: typedef typename Vector::StorageIndex StorageIndex; @@ -116,7 +116,7 @@ class DiagonalPreconditioner (A.adjoint() * A).diagonal().asDiagonal() * x = b \endcode * - * \tparam _Scalar the type of the scalar. + * \tparam Scalar_ the type of the scalar. * * \implsparsesolverconcept * @@ -124,12 +124,12 @@ class DiagonalPreconditioner * * \sa class LeastSquaresConjugateGradient, class DiagonalPreconditioner */ -template -class LeastSquareDiagonalPreconditioner : public DiagonalPreconditioner<_Scalar> +template +class LeastSquareDiagonalPreconditioner : public DiagonalPreconditioner { - typedef _Scalar Scalar; + typedef Scalar_ Scalar; typedef typename NumTraits::Real RealScalar; - typedef DiagonalPreconditioner<_Scalar> Base; + typedef DiagonalPreconditioner Base; using Base::m_invdiag; public: diff --git a/Eigen/src/IterativeLinearSolvers/BiCGSTAB.h b/Eigen/src/IterativeLinearSolvers/BiCGSTAB.h index 153acef65..22ad53907 100644 --- a/Eigen/src/IterativeLinearSolvers/BiCGSTAB.h +++ b/Eigen/src/IterativeLinearSolvers/BiCGSTAB.h @@ -108,17 +108,17 @@ bool bicgstab(const MatrixType& mat, const Rhs& rhs, Dest& x, } -template< typename _MatrixType, - typename _Preconditioner = DiagonalPreconditioner > +template< typename MatrixType_, + typename Preconditioner_ = DiagonalPreconditioner > class BiCGSTAB; namespace internal { -template< typename _MatrixType, typename _Preconditioner> -struct traits > +template< typename MatrixType_, typename Preconditioner_> +struct traits > { - typedef _MatrixType MatrixType; - typedef _Preconditioner Preconditioner; + typedef MatrixType_ MatrixType; + typedef Preconditioner_ Preconditioner; }; } @@ -129,8 +129,8 @@ struct traits > * This class allows to solve for A.x = b sparse linear problems using a bi conjugate gradient * stabilized algorithm. The vectors x and b can be either dense or sparse. * - * \tparam _MatrixType the type of the sparse matrix A, can be a dense or a sparse matrix. - * \tparam _Preconditioner the type of the preconditioner. Default is DiagonalPreconditioner + * \tparam MatrixType_ the type of the sparse matrix A, can be a dense or a sparse matrix. + * \tparam Preconditioner_ the type of the preconditioner. Default is DiagonalPreconditioner * * \implsparsesolverconcept * @@ -154,8 +154,8 @@ struct traits > * * \sa class SimplicialCholesky, DiagonalPreconditioner, IdentityPreconditioner */ -template< typename _MatrixType, typename _Preconditioner> -class BiCGSTAB : public IterativeSolverBase > +template< typename MatrixType_, typename Preconditioner_> +class BiCGSTAB : public IterativeSolverBase > { typedef IterativeSolverBase Base; using Base::matrix; @@ -164,10 +164,10 @@ class BiCGSTAB : public IterativeSolverBase > +template< typename MatrixType_, int UpLo_=Lower, + typename Preconditioner_ = DiagonalPreconditioner > class ConjugateGradient; namespace internal { -template< typename _MatrixType, int _UpLo, typename _Preconditioner> -struct traits > +template< typename MatrixType_, int UpLo_, typename Preconditioner_> +struct traits > { - typedef _MatrixType MatrixType; - typedef _Preconditioner Preconditioner; + typedef MatrixType_ MatrixType; + typedef Preconditioner_ Preconditioner; }; } @@ -113,11 +113,11 @@ struct traits > * This class allows to solve for A.x = b linear problems using an iterative conjugate gradient algorithm. * The matrix A must be selfadjoint. The matrix A and the vectors x and b can be either dense or sparse. * - * \tparam _MatrixType the type of the matrix A, can be a dense or a sparse matrix. - * \tparam _UpLo the triangular part that will be used for the computations. It can be Lower, + * \tparam MatrixType_ the type of the matrix A, can be a dense or a sparse matrix. + * \tparam UpLo_ the triangular part that will be used for the computations. It can be Lower, * \c Upper, or \c Lower|Upper in which the full matrix entries will be considered. * Default is \c Lower, best performance is \c Lower|Upper. - * \tparam _Preconditioner the type of the preconditioner. Default is DiagonalPreconditioner + * \tparam Preconditioner_ the type of the preconditioner. Default is DiagonalPreconditioner * * \implsparsesolverconcept * @@ -127,8 +127,8 @@ struct traits > * * The tolerance corresponds to the relative residual error: |Ax-b|/|b| * - * \b Performance: Even though the default value of \c _UpLo is \c Lower, significantly higher performance is - * achieved when using a complete matrix and \b Lower|Upper as the \a _UpLo template parameter. Moreover, in this + * \b Performance: Even though the default value of \c UpLo_ is \c Lower, significantly higher performance is + * achieved when using a complete matrix and \b Lower|Upper as the \a UpLo_ template parameter. Moreover, in this * case multi-threading can be exploited if the user code is compiled with OpenMP enabled. * See \ref TopicMultiThreading for details. * @@ -154,8 +154,8 @@ struct traits > * * \sa class LeastSquaresConjugateGradient, class SimplicialCholesky, DiagonalPreconditioner, IdentityPreconditioner */ -template< typename _MatrixType, int _UpLo, typename _Preconditioner> -class ConjugateGradient : public IterativeSolverBase > +template< typename MatrixType_, int UpLo_, typename Preconditioner_> +class ConjugateGradient : public IterativeSolverBase > { typedef IterativeSolverBase Base; using Base::matrix; @@ -164,13 +164,13 @@ class ConjugateGradient : public IterativeSolverBase or NaturalOrdering<>. Default is AMDOrdering, + * \tparam OrderingType_ The ordering method to use, either AMDOrdering<> or NaturalOrdering<>. Default is AMDOrdering, * unless EIGEN_MPL2_ONLY is defined, in which case the default is NaturalOrdering. * * \implsparsesolverconcept @@ -41,15 +41,15 @@ namespace Eigen { * the info() method, then you can either increase the initial shift, or better use another preconditioning technique. * */ -template > -class IncompleteCholesky : public SparseSolverBase > +template > +class IncompleteCholesky : public SparseSolverBase > { protected: - typedef SparseSolverBase > Base; + typedef SparseSolverBase > Base; using Base::m_isInitialized; public: typedef typename NumTraits::Real RealScalar; - typedef _OrderingType OrderingType; + typedef OrderingType_ OrderingType; typedef typename OrderingType::PermutationType PermutationType; typedef typename PermutationType::StorageIndex StorageIndex; typedef SparseMatrix FactorType; @@ -57,7 +57,7 @@ class IncompleteCholesky : public SparseSolverBase VectorRx; typedef Matrix VectorIx; typedef std::vector > VectorList; - enum { UpLo = _UpLo }; + enum { UpLo = UpLo_ }; enum { ColsAtCompileTime = Dynamic, MaxColsAtCompileTime = Dynamic @@ -185,9 +185,9 @@ class IncompleteCholesky : public SparseSolverBase -template -void IncompleteCholesky::factorize(const _MatrixType& mat) +template +template +void IncompleteCholesky::factorize(const MatrixType_& mat) { using std::sqrt; eigen_assert(m_analysisIsOk && "analyzePattern() should be called first"); @@ -199,12 +199,12 @@ void IncompleteCholesky::factorize(const _MatrixType { // The temporary is needed to make sure that the diagonal entry is properly sorted FactorType tmp(mat.rows(), mat.cols()); - tmp = mat.template selfadjointView<_UpLo>().twistedBy(m_perm); + tmp = mat.template selfadjointView().twistedBy(m_perm); m_L.template selfadjointView() = tmp.template selfadjointView(); } else { - m_L.template selfadjointView() = mat.template selfadjointView<_UpLo>(); + m_L.template selfadjointView() = mat.template selfadjointView(); } Index n = m_L.cols(); @@ -369,8 +369,8 @@ void IncompleteCholesky::factorize(const _MatrixType } while(m_info!=Success); } -template -inline void IncompleteCholesky::updateList(Ref colPtr, Ref rowIdx, Ref vals, const Index& col, const Index& jk, VectorIx& firstElt, VectorList& listCol) +template +inline void IncompleteCholesky::updateList(Ref colPtr, Ref rowIdx, Ref vals, const Index& col, const Index& jk, VectorIx& firstElt, VectorList& listCol) { if (jk < colPtr(col+1) ) { diff --git a/Eigen/src/IterativeLinearSolvers/IncompleteLUT.h b/Eigen/src/IterativeLinearSolvers/IncompleteLUT.h index cdcf709eb..6637a8e03 100644 --- a/Eigen/src/IterativeLinearSolvers/IncompleteLUT.h +++ b/Eigen/src/IterativeLinearSolvers/IncompleteLUT.h @@ -95,15 +95,15 @@ Index QuickSplit(VectorV &row, VectorI &ind, Index ncut) * alternatively, on GMANE: * http://comments.gmane.org/gmane.comp.lib.eigen/3302 */ -template -class IncompleteLUT : public SparseSolverBase > +template +class IncompleteLUT : public SparseSolverBase > { protected: typedef SparseSolverBase Base; using Base::m_isInitialized; public: - typedef _Scalar Scalar; - typedef _StorageIndex StorageIndex; + typedef Scalar_ Scalar; + typedef StorageIndex_ StorageIndex; typedef typename NumTraits::Real RealScalar; typedef Matrix Vector; typedef Matrix VectorI; @@ -219,8 +219,8 @@ void IncompleteLUT::setFillfactor(int fillfactor) } template -template -void IncompleteLUT::analyzePattern(const _MatrixType& amat) +template +void IncompleteLUT::analyzePattern(const MatrixType_& amat) { // Compute the Fill-reducing permutation // Since ILUT does not perform any numerical pivoting, @@ -240,8 +240,8 @@ void IncompleteLUT::analyzePattern(const _MatrixType& amat) } template -template -void IncompleteLUT::factorize(const _MatrixType& amat) +template +void IncompleteLUT::factorize(const MatrixType_& amat) { using std::sqrt; using std::swap; diff --git a/Eigen/src/IterativeLinearSolvers/LeastSquareConjugateGradient.h b/Eigen/src/IterativeLinearSolvers/LeastSquareConjugateGradient.h index 203fd0ec6..be816e495 100644 --- a/Eigen/src/IterativeLinearSolvers/LeastSquareConjugateGradient.h +++ b/Eigen/src/IterativeLinearSolvers/LeastSquareConjugateGradient.h @@ -93,17 +93,17 @@ void least_square_conjugate_gradient(const MatrixType& mat, const Rhs& rhs, Dest } -template< typename _MatrixType, - typename _Preconditioner = LeastSquareDiagonalPreconditioner > +template< typename MatrixType_, + typename Preconditioner_ = LeastSquareDiagonalPreconditioner > class LeastSquaresConjugateGradient; namespace internal { -template< typename _MatrixType, typename _Preconditioner> -struct traits > +template< typename MatrixType_, typename Preconditioner_> +struct traits > { - typedef _MatrixType MatrixType; - typedef _Preconditioner Preconditioner; + typedef MatrixType_ MatrixType; + typedef Preconditioner_ Preconditioner; }; } @@ -116,8 +116,8 @@ struct traits > * Otherwise, the SparseLU or SparseQR classes might be preferable. * The matrix A and the vectors x and b can be either dense or sparse. * - * \tparam _MatrixType the type of the matrix A, can be a dense or a sparse matrix. - * \tparam _Preconditioner the type of the preconditioner. Default is LeastSquareDiagonalPreconditioner + * \tparam MatrixType_ the type of the matrix A, can be a dense or a sparse matrix. + * \tparam Preconditioner_ the type of the preconditioner. Default is LeastSquareDiagonalPreconditioner * * \implsparsesolverconcept * @@ -145,8 +145,8 @@ struct traits > * * \sa class ConjugateGradient, SparseLU, SparseQR */ -template< typename _MatrixType, typename _Preconditioner> -class LeastSquaresConjugateGradient : public IterativeSolverBase > +template< typename MatrixType_, typename Preconditioner_> +class LeastSquaresConjugateGradient : public IterativeSolverBase > { typedef IterativeSolverBase Base; using Base::matrix; @@ -155,10 +155,10 @@ class LeastSquaresConjugateGradient : public IterativeSolverBase + * \tparam MatrixType_ the type of the sparse matrix A, it must be a SparseMatrix<> * * \implsparsesolverconcept * @@ -56,15 +56,15 @@ inline klu_numeric* klu_factor(int Ap[], int Ai[], std::complex Ax[], kl } -template -class KLU : public SparseSolverBase > +template +class KLU : public SparseSolverBase > { protected: - typedef SparseSolverBase > Base; + typedef SparseSolverBase > Base; using Base::m_isInitialized; public: using Base::_solve_impl; - typedef _MatrixType MatrixType; + typedef MatrixType_ MatrixType; typedef typename MatrixType::Scalar Scalar; typedef typename MatrixType::RealScalar RealScalar; typedef typename MatrixType::StorageIndex StorageIndex; diff --git a/Eigen/src/LU/FullPivLU.h b/Eigen/src/LU/FullPivLU.h index ba1749fa6..c45b2584d 100644 --- a/Eigen/src/LU/FullPivLU.h +++ b/Eigen/src/LU/FullPivLU.h @@ -13,8 +13,8 @@ namespace Eigen { namespace internal { -template struct traits > - : traits<_MatrixType> +template struct traits > + : traits { typedef MatrixXpr XprKind; typedef SolverStorage StorageKind; @@ -30,7 +30,7 @@ template struct traits > * * \brief LU decomposition of a matrix with complete pivoting, and related features * - * \tparam _MatrixType the type of the matrix of which we are computing the LU decomposition + * \tparam MatrixType_ the type of the matrix of which we are computing the LU decomposition * * This class represents a LU decomposition of any matrix, with complete pivoting: the matrix A is * decomposed as \f$ A = P^{-1} L U Q^{-1} \f$ where L is unit-lower-triangular, U is @@ -57,11 +57,11 @@ template struct traits > * * \sa MatrixBase::fullPivLu(), MatrixBase::determinant(), MatrixBase::inverse() */ -template class FullPivLU - : public SolverBase > +template class FullPivLU + : public SolverBase > { public: - typedef _MatrixType MatrixType; + typedef MatrixType_ MatrixType; typedef SolverBase Base; friend class SolverBase; @@ -613,11 +613,11 @@ MatrixType FullPivLU::reconstructedMatrix() const /********* Implementation of kernel() **************************************************/ namespace internal { -template -struct kernel_retval > - : kernel_retval_base > +template +struct kernel_retval > + : kernel_retval_base > { - EIGEN_MAKE_KERNEL_HELPERS(FullPivLU<_MatrixType>) + EIGEN_MAKE_KERNEL_HELPERS(FullPivLU) enum { MaxSmallDimAtCompileTime = EIGEN_SIZE_MIN_PREFER_FIXED( MatrixType::MaxColsAtCompileTime, @@ -699,11 +699,11 @@ struct kernel_retval > /***** Implementation of image() *****************************************************/ -template -struct image_retval > - : image_retval_base > +template +struct image_retval > + : image_retval_base > { - EIGEN_MAKE_IMAGE_HELPERS(FullPivLU<_MatrixType>) + EIGEN_MAKE_IMAGE_HELPERS(FullPivLU) enum { MaxSmallDimAtCompileTime = EIGEN_SIZE_MIN_PREFER_FIXED( MatrixType::MaxColsAtCompileTime, @@ -740,9 +740,9 @@ struct image_retval > } // end namespace internal #ifndef EIGEN_PARSED_BY_DOXYGEN -template +template template -void FullPivLU<_MatrixType>::_solve_impl(const RhsType &rhs, DstType &dst) const +void FullPivLU::_solve_impl(const RhsType &rhs, DstType &dst) const { /* The decomposition PAQ = LU can be rewritten as A = P^{-1} L U Q^{-1}. * So we proceed as follows: @@ -787,9 +787,9 @@ void FullPivLU<_MatrixType>::_solve_impl(const RhsType &rhs, DstType &dst) const dst.row(permutationQ().indices().coeff(i)).setZero(); } -template +template template -void FullPivLU<_MatrixType>::_solve_impl_transposed(const RhsType &rhs, DstType &dst) const +void FullPivLU::_solve_impl_transposed(const RhsType &rhs, DstType &dst) const { /* The decomposition PAQ = LU can be rewritten as A = P^{-1} L U Q^{-1}, * and since permutations are real and unitary, we can write this diff --git a/Eigen/src/LU/PartialPivLU.h b/Eigen/src/LU/PartialPivLU.h index 34aed7249..52e4bcccc 100644 --- a/Eigen/src/LU/PartialPivLU.h +++ b/Eigen/src/LU/PartialPivLU.h @@ -14,13 +14,13 @@ namespace Eigen { namespace internal { -template struct traits > - : traits<_MatrixType> +template struct traits > + : traits { typedef MatrixXpr XprKind; typedef SolverStorage StorageKind; typedef int StorageIndex; - typedef traits<_MatrixType> BaseTraits; + typedef traits BaseTraits; enum { Flags = BaseTraits::Flags & RowMajorBit, CoeffReadCost = Dynamic @@ -46,7 +46,7 @@ struct enable_if_ref,Derived> { * * \brief LU decomposition of a matrix with partial pivoting, and related features * - * \tparam _MatrixType the type of the matrix of which we are computing the LU decomposition + * \tparam MatrixType_ the type of the matrix of which we are computing the LU decomposition * * This class represents a LU decomposition of a \b square \b invertible matrix, with partial pivoting: the matrix A * is decomposed as A = PLU where L is unit-lower-triangular, U is upper-triangular, and P @@ -73,12 +73,12 @@ struct enable_if_ref,Derived> { * * \sa MatrixBase::partialPivLu(), MatrixBase::determinant(), MatrixBase::inverse(), MatrixBase::computeInverse(), class FullPivLU */ -template class PartialPivLU - : public SolverBase > +template class PartialPivLU + : public SolverBase > { public: - typedef _MatrixType MatrixType; + typedef MatrixType_ MatrixType; typedef SolverBase Base; friend class SolverBase; diff --git a/Eigen/src/PaStiXSupport/PaStiXSupport.h b/Eigen/src/PaStiXSupport/PaStiXSupport.h index 37426877a..cb133c5db 100644 --- a/Eigen/src/PaStiXSupport/PaStiXSupport.h +++ b/Eigen/src/PaStiXSupport/PaStiXSupport.h @@ -28,40 +28,40 @@ namespace Eigen { * * \sa TutorialSparseDirectSolvers */ -template class PastixLU; -template class PastixLLT; -template class PastixLDLT; +template class PastixLU; +template class PastixLLT; +template class PastixLDLT; namespace internal { template struct pastix_traits; - template - struct pastix_traits< PastixLU<_MatrixType> > + template + struct pastix_traits< PastixLU > { - typedef _MatrixType MatrixType; - typedef typename _MatrixType::Scalar Scalar; - typedef typename _MatrixType::RealScalar RealScalar; - typedef typename _MatrixType::StorageIndex StorageIndex; + typedef MatrixType_ MatrixType; + typedef typename MatrixType_::Scalar Scalar; + typedef typename MatrixType_::RealScalar RealScalar; + typedef typename MatrixType_::StorageIndex StorageIndex; }; - template - struct pastix_traits< PastixLLT<_MatrixType,Options> > + template + struct pastix_traits< PastixLLT > { - typedef _MatrixType MatrixType; - typedef typename _MatrixType::Scalar Scalar; - typedef typename _MatrixType::RealScalar RealScalar; - typedef typename _MatrixType::StorageIndex StorageIndex; + typedef MatrixType_ MatrixType; + typedef typename MatrixType_::Scalar Scalar; + typedef typename MatrixType_::RealScalar RealScalar; + typedef typename MatrixType_::StorageIndex StorageIndex; }; - template - struct pastix_traits< PastixLDLT<_MatrixType,Options> > + template + struct pastix_traits< PastixLDLT > { - typedef _MatrixType MatrixType; - typedef typename _MatrixType::Scalar Scalar; - typedef typename _MatrixType::RealScalar RealScalar; - typedef typename _MatrixType::StorageIndex StorageIndex; + typedef MatrixType_ MatrixType; + typedef typename MatrixType_::Scalar Scalar; + typedef typename MatrixType_::RealScalar RealScalar; + typedef typename MatrixType_::StorageIndex StorageIndex; }; inline void eigen_pastix(pastix_data_t **pastix_data, int pastix_comm, int n, int *ptr, int *idx, float *vals, int *perm, int * invp, float *x, int nbrhs, int *iparm, double *dparm) @@ -134,8 +134,8 @@ class PastixBase : public SparseSolverBase public: using Base::_solve_impl; - typedef typename internal::pastix_traits::MatrixType _MatrixType; - typedef _MatrixType MatrixType; + typedef typename internal::pastix_traits::MatrixType MatrixType_; + typedef MatrixType_ MatrixType; typedef typename MatrixType::Scalar Scalar; typedef typename MatrixType::RealScalar RealScalar; typedef typename MatrixType::StorageIndex StorageIndex; @@ -397,7 +397,7 @@ bool PastixBase::_solve_impl(const MatrixBase &b, MatrixBase &x * This interface can symmetrize the input matrix otherwise. * The vectors or matrices X and B can be either dense or sparse. * - * \tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<> + * \tparam MatrixType_ the type of the sparse matrix A, it must be a SparseMatrix<> * \tparam IsStrSym Indicates if the input matrix has a symmetric pattern, default is false * NOTE : Note that if the analysis and factorization phase are called separately, * the input matrix will be symmetrized at each call, hence it is advised to @@ -408,11 +408,11 @@ bool PastixBase::_solve_impl(const MatrixBase &b, MatrixBase &x * \sa \ref TutorialSparseSolverConcept, class SparseLU * */ -template -class PastixLU : public PastixBase< PastixLU<_MatrixType> > +template +class PastixLU : public PastixBase< PastixLU > { public: - typedef _MatrixType MatrixType; + typedef MatrixType_ MatrixType; typedef PastixBase > Base; typedef typename Base::ColSpMatrix ColSpMatrix; typedef typename MatrixType::StorageIndex StorageIndex; @@ -520,16 +520,16 @@ class PastixLU : public PastixBase< PastixLU<_MatrixType> > * * \sa \ref TutorialSparseSolverConcept, class SimplicialLLT */ -template -class PastixLLT : public PastixBase< PastixLLT<_MatrixType, _UpLo> > +template +class PastixLLT : public PastixBase< PastixLLT > { public: - typedef _MatrixType MatrixType; - typedef PastixBase > Base; + typedef MatrixType_ MatrixType; + typedef PastixBase > Base; typedef typename Base::ColSpMatrix ColSpMatrix; public: - enum { UpLo = _UpLo }; + enum { UpLo = UpLo_ }; PastixLLT() : Base() { init(); @@ -604,16 +604,16 @@ class PastixLLT : public PastixBase< PastixLLT<_MatrixType, _UpLo> > * * \sa \ref TutorialSparseSolverConcept, class SimplicialLDLT */ -template -class PastixLDLT : public PastixBase< PastixLDLT<_MatrixType, _UpLo> > +template +class PastixLDLT : public PastixBase< PastixLDLT > { public: - typedef _MatrixType MatrixType; - typedef PastixBase > Base; + typedef MatrixType_ MatrixType; + typedef PastixBase > Base; typedef typename Base::ColSpMatrix ColSpMatrix; public: - enum { UpLo = _UpLo }; + enum { UpLo = UpLo_ }; PastixLDLT():Base() { init(); diff --git a/Eigen/src/PardisoSupport/PardisoSupport.h b/Eigen/src/PardisoSupport/PardisoSupport.h index f89b79bd5..f09856a0b 100644 --- a/Eigen/src/PardisoSupport/PardisoSupport.h +++ b/Eigen/src/PardisoSupport/PardisoSupport.h @@ -34,9 +34,9 @@ namespace Eigen { -template class PardisoLU; -template class PardisoLLT; -template class PardisoLDLT; +template class PardisoLU; +template class PardisoLLT; +template class PardisoLDLT; namespace internal { @@ -66,31 +66,31 @@ namespace internal template struct pardiso_traits; - template - struct pardiso_traits< PardisoLU<_MatrixType> > + template + struct pardiso_traits< PardisoLU > { - typedef _MatrixType MatrixType; - typedef typename _MatrixType::Scalar Scalar; - typedef typename _MatrixType::RealScalar RealScalar; - typedef typename _MatrixType::StorageIndex StorageIndex; + typedef MatrixType_ MatrixType; + typedef typename MatrixType_::Scalar Scalar; + typedef typename MatrixType_::RealScalar RealScalar; + typedef typename MatrixType_::StorageIndex StorageIndex; }; - template - struct pardiso_traits< PardisoLLT<_MatrixType, Options> > + template + struct pardiso_traits< PardisoLLT > { - typedef _MatrixType MatrixType; - typedef typename _MatrixType::Scalar Scalar; - typedef typename _MatrixType::RealScalar RealScalar; - typedef typename _MatrixType::StorageIndex StorageIndex; + typedef MatrixType_ MatrixType; + typedef typename MatrixType_::Scalar Scalar; + typedef typename MatrixType_::RealScalar RealScalar; + typedef typename MatrixType_::StorageIndex StorageIndex; }; - template - struct pardiso_traits< PardisoLDLT<_MatrixType, Options> > + template + struct pardiso_traits< PardisoLDLT > { - typedef _MatrixType MatrixType; - typedef typename _MatrixType::Scalar Scalar; - typedef typename _MatrixType::RealScalar RealScalar; - typedef typename _MatrixType::StorageIndex StorageIndex; + typedef MatrixType_ MatrixType; + typedef typename MatrixType_::Scalar Scalar; + typedef typename MatrixType_::RealScalar RealScalar; + typedef typename MatrixType_::StorageIndex StorageIndex; }; } // end namespace internal @@ -375,7 +375,7 @@ void PardisoImpl::_solve_impl(const MatrixBase &b, MatrixBase * By default, it runs in in-core mode. To enable PARDISO's out-of-core feature, set: * \code solver.pardisoParameterArray()[59] = 1; \endcode * - * \tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<> + * \tparam MatrixType_ the type of the sparse matrix A, it must be a SparseMatrix<> * * \implsparsesolverconcept * @@ -437,21 +437,21 @@ class PardisoLU : public PardisoImpl< PardisoLU > * * \sa \ref TutorialSparseSolverConcept, class SimplicialLLT */ -template -class PardisoLLT : public PardisoImpl< PardisoLLT > +template +class PardisoLLT : public PardisoImpl< PardisoLLT > { protected: - typedef PardisoImpl< PardisoLLT > Base; + typedef PardisoImpl< PardisoLLT > Base; using Base::pardisoInit; using Base::m_matrix; - friend class PardisoImpl< PardisoLLT >; + friend class PardisoImpl< PardisoLLT >; public: typedef typename Base::Scalar Scalar; typedef typename Base::RealScalar RealScalar; typedef typename Base::StorageIndex StorageIndex; - enum { UpLo = _UpLo }; + enum { UpLo = UpLo_ }; using Base::compute; PardisoLLT() diff --git a/Eigen/src/QR/ColPivHouseholderQR.h b/Eigen/src/QR/ColPivHouseholderQR.h index 9b677e9bf..3c884e7a7 100644 --- a/Eigen/src/QR/ColPivHouseholderQR.h +++ b/Eigen/src/QR/ColPivHouseholderQR.h @@ -14,8 +14,8 @@ namespace Eigen { namespace internal { -template struct traits > - : traits<_MatrixType> +template struct traits > + : traits { typedef MatrixXpr XprKind; typedef SolverStorage StorageKind; @@ -31,7 +31,7 @@ template struct traits > * * \brief Householder rank-revealing QR decomposition of a matrix with column-pivoting * - * \tparam _MatrixType the type of the matrix of which we are computing the QR decomposition + * \tparam MatrixType_ the type of the matrix of which we are computing the QR decomposition * * This class performs a rank-revealing QR decomposition of a matrix \b A into matrices \b P, \b Q and \b R * such that @@ -48,12 +48,12 @@ template struct traits > * * \sa MatrixBase::colPivHouseholderQr() */ -template class ColPivHouseholderQR - : public SolverBase > +template class ColPivHouseholderQR + : public SolverBase > { public: - typedef _MatrixType MatrixType; + typedef MatrixType_ MatrixType; typedef SolverBase Base; friend class SolverBase; @@ -582,9 +582,9 @@ void ColPivHouseholderQR::computeInPlace() } #ifndef EIGEN_PARSED_BY_DOXYGEN -template +template template -void ColPivHouseholderQR<_MatrixType>::_solve_impl(const RhsType &rhs, DstType &dst) const +void ColPivHouseholderQR::_solve_impl(const RhsType &rhs, DstType &dst) const { const Index nonzero_pivots = nonzeroPivots(); @@ -606,9 +606,9 @@ void ColPivHouseholderQR<_MatrixType>::_solve_impl(const RhsType &rhs, DstType & for(Index i = nonzero_pivots; i < cols(); ++i) dst.row(m_colsPermutation.indices().coeff(i)).setZero(); } -template +template template -void ColPivHouseholderQR<_MatrixType>::_solve_impl_transposed(const RhsType &rhs, DstType &dst) const +void ColPivHouseholderQR::_solve_impl_transposed(const RhsType &rhs, DstType &dst) const { const Index nonzero_pivots = nonzeroPivots(); diff --git a/Eigen/src/QR/CompleteOrthogonalDecomposition.h b/Eigen/src/QR/CompleteOrthogonalDecomposition.h index 486d3373a..0445edb24 100644 --- a/Eigen/src/QR/CompleteOrthogonalDecomposition.h +++ b/Eigen/src/QR/CompleteOrthogonalDecomposition.h @@ -13,9 +13,9 @@ namespace Eigen { namespace internal { -template -struct traits > - : traits<_MatrixType> { +template +struct traits > + : traits { typedef MatrixXpr XprKind; typedef SolverStorage StorageKind; typedef int StorageIndex; @@ -47,11 +47,11 @@ struct traits > * * \sa MatrixBase::completeOrthogonalDecomposition() */ -template class CompleteOrthogonalDecomposition - : public SolverBase > +template class CompleteOrthogonalDecomposition + : public SolverBase > { public: - typedef _MatrixType MatrixType; + typedef MatrixType_ MatrixType; typedef SolverBase Base; template @@ -529,9 +529,9 @@ void CompleteOrthogonalDecomposition::applyZAdjointOnTheLeftInPlace( } #ifndef EIGEN_PARSED_BY_DOXYGEN -template +template template -void CompleteOrthogonalDecomposition<_MatrixType>::_solve_impl( +void CompleteOrthogonalDecomposition::_solve_impl( const RhsType& rhs, DstType& dst) const { const Index rank = this->rank(); if (rank == 0) { @@ -561,9 +561,9 @@ void CompleteOrthogonalDecomposition<_MatrixType>::_solve_impl( dst = colsPermutation() * dst; } -template +template template -void CompleteOrthogonalDecomposition<_MatrixType>::_solve_impl_transposed(const RhsType &rhs, DstType &dst) const +void CompleteOrthogonalDecomposition::_solve_impl_transposed(const RhsType &rhs, DstType &dst) const { const Index rank = this->rank(); diff --git a/Eigen/src/QR/FullPivHouseholderQR.h b/Eigen/src/QR/FullPivHouseholderQR.h index d0664a1d8..68585df5c 100644 --- a/Eigen/src/QR/FullPivHouseholderQR.h +++ b/Eigen/src/QR/FullPivHouseholderQR.h @@ -15,8 +15,8 @@ namespace Eigen { namespace internal { -template struct traits > - : traits<_MatrixType> +template struct traits > + : traits { typedef MatrixXpr XprKind; typedef SolverStorage StorageKind; @@ -40,7 +40,7 @@ struct traits > * * \brief Householder rank-revealing QR decomposition of a matrix with full pivoting * - * \tparam _MatrixType the type of the matrix of which we are computing the QR decomposition + * \tparam MatrixType_ the type of the matrix of which we are computing the QR decomposition * * This class performs a rank-revealing QR decomposition of a matrix \b A into matrices \b P, \b P', \b Q and \b R * such that @@ -57,12 +57,12 @@ struct traits > * * \sa MatrixBase::fullPivHouseholderQr() */ -template class FullPivHouseholderQR - : public SolverBase > +template class FullPivHouseholderQR + : public SolverBase > { public: - typedef _MatrixType MatrixType; + typedef MatrixType_ MatrixType; typedef SolverBase Base; friend class SolverBase; @@ -539,9 +539,9 @@ void FullPivHouseholderQR::computeInPlace() } #ifndef EIGEN_PARSED_BY_DOXYGEN -template +template template -void FullPivHouseholderQR<_MatrixType>::_solve_impl(const RhsType &rhs, DstType &dst) const +void FullPivHouseholderQR::_solve_impl(const RhsType &rhs, DstType &dst) const { const Index l_rank = rank(); @@ -573,9 +573,9 @@ void FullPivHouseholderQR<_MatrixType>::_solve_impl(const RhsType &rhs, DstType for(Index i = l_rank; i < cols(); ++i) dst.row(m_cols_permutation.indices().coeff(i)).setZero(); } -template +template template -void FullPivHouseholderQR<_MatrixType>::_solve_impl_transposed(const RhsType &rhs, DstType &dst) const +void FullPivHouseholderQR::_solve_impl_transposed(const RhsType &rhs, DstType &dst) const { const Index l_rank = rank(); diff --git a/Eigen/src/QR/HouseholderQR.h b/Eigen/src/QR/HouseholderQR.h index 801739fbd..d2216c553 100644 --- a/Eigen/src/QR/HouseholderQR.h +++ b/Eigen/src/QR/HouseholderQR.h @@ -15,8 +15,8 @@ namespace Eigen { namespace internal { -template struct traits > - : traits<_MatrixType> +template struct traits > + : traits { typedef MatrixXpr XprKind; typedef SolverStorage StorageKind; @@ -33,7 +33,7 @@ template struct traits > * * \brief Householder QR decomposition of a matrix * - * \tparam _MatrixType the type of the matrix of which we are computing the QR decomposition + * \tparam MatrixType_ the type of the matrix of which we are computing the QR decomposition * * This class performs a QR decomposition of a matrix \b A into matrices \b Q and \b R * such that @@ -53,12 +53,12 @@ template struct traits > * * \sa MatrixBase::householderQr() */ -template class HouseholderQR - : public SolverBase > +template class HouseholderQR + : public SolverBase > { public: - typedef _MatrixType MatrixType; + typedef MatrixType_ MatrixType; typedef SolverBase Base; friend class SolverBase; @@ -356,9 +356,9 @@ struct householder_qr_inplace_blocked } // end namespace internal #ifndef EIGEN_PARSED_BY_DOXYGEN -template +template template -void HouseholderQR<_MatrixType>::_solve_impl(const RhsType &rhs, DstType &dst) const +void HouseholderQR::_solve_impl(const RhsType &rhs, DstType &dst) const { const Index rank = (std::min)(rows(), cols()); @@ -374,9 +374,9 @@ void HouseholderQR<_MatrixType>::_solve_impl(const RhsType &rhs, DstType &dst) c dst.bottomRows(cols()-rank).setZero(); } -template +template template -void HouseholderQR<_MatrixType>::_solve_impl_transposed(const RhsType &rhs, DstType &dst) const +void HouseholderQR::_solve_impl_transposed(const RhsType &rhs, DstType &dst) const { const Index rank = (std::min)(rows(), cols()); diff --git a/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h b/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h index 013c7ae7a..0826c4df7 100644 --- a/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h +++ b/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h @@ -50,21 +50,21 @@ namespace Eigen { * R is the sparse triangular factor. Use matrixQR() to get it as SparseMatrix. * NOTE : The Index type of R is always SuiteSparse_long. You can get it with SPQR::Index * - * \tparam _MatrixType The type of the sparse matrix A, must be a column-major SparseMatrix<> + * \tparam MatrixType_ The type of the sparse matrix A, must be a column-major SparseMatrix<> * * \implsparsesolverconcept * * */ -template -class SPQR : public SparseSolverBase > +template +class SPQR : public SparseSolverBase > { protected: - typedef SparseSolverBase > Base; + typedef SparseSolverBase > Base; using Base::m_isInitialized; public: - typedef typename _MatrixType::Scalar Scalar; - typedef typename _MatrixType::RealScalar RealScalar; + typedef typename MatrixType_::Scalar Scalar; + typedef typename MatrixType_::RealScalar RealScalar; typedef SuiteSparse_long StorageIndex ; typedef SparseMatrix MatrixType; typedef Map > PermutationType; @@ -90,7 +90,7 @@ class SPQR : public SparseSolverBase > cholmod_l_start(&m_cc); } - explicit SPQR(const _MatrixType& matrix) + explicit SPQR(const MatrixType_& matrix) : m_analysisIsOk(false), m_factorizationIsOk(false), m_isRUpToDate(false), @@ -122,7 +122,7 @@ class SPQR : public SparseSolverBase > std::free(m_HPinv); } - void compute(const _MatrixType& matrix) + void compute(const MatrixType_& matrix) { if(m_isInitialized) SPQR_free(); diff --git a/Eigen/src/SVD/BDCSVD.h b/Eigen/src/SVD/BDCSVD.h index 17f8e4436..31a766d2e 100644 --- a/Eigen/src/SVD/BDCSVD.h +++ b/Eigen/src/SVD/BDCSVD.h @@ -33,15 +33,15 @@ namespace Eigen { IOFormat bdcsvdfmt(8, 0, ", ", "\n", " [", "]"); #endif -template class BDCSVD; +template class BDCSVD; namespace internal { -template -struct traits > - : traits<_MatrixType> +template +struct traits > + : traits { - typedef _MatrixType MatrixType; + typedef MatrixType_ MatrixType; }; } // end namespace internal @@ -54,7 +54,7 @@ struct traits > * * \brief class Bidiagonal Divide and Conquer SVD * - * \tparam _MatrixType the type of the matrix of which we are computing the SVD decomposition + * \tparam MatrixType_ the type of the matrix of which we are computing the SVD decomposition * * This class first reduces the input matrix to bi-diagonal form using class UpperBidiagonalization, * and then performs a divide-and-conquer diagonalization. Small blocks are diagonalized using class JacobiSVD. @@ -69,8 +69,8 @@ struct traits > * * \sa class JacobiSVD */ -template -class BDCSVD : public SVDBase > +template +class BDCSVD : public SVDBase > { typedef SVDBase Base; @@ -80,7 +80,7 @@ public: using Base::computeU; using Base::computeV; - typedef _MatrixType MatrixType; + typedef MatrixType_ MatrixType; typedef typename MatrixType::Scalar Scalar; typedef typename NumTraits::Real RealScalar; typedef typename NumTraits::Literal Literal; diff --git a/Eigen/src/SVD/JacobiSVD.h b/Eigen/src/SVD/JacobiSVD.h index 9d95acdf6..b135fb01d 100644 --- a/Eigen/src/SVD/JacobiSVD.h +++ b/Eigen/src/SVD/JacobiSVD.h @@ -423,11 +423,11 @@ struct svd_precondition_2x2_block_to_be_real } }; -template -struct traits > - : traits<_MatrixType> +template +struct traits > + : traits { - typedef _MatrixType MatrixType; + typedef MatrixType_ MatrixType; }; } // end namespace internal @@ -439,7 +439,7 @@ struct traits > * * \brief Two-sided Jacobi SVD decomposition of a rectangular matrix * - * \tparam _MatrixType the type of the matrix of which we are computing the SVD decomposition + * \tparam MatrixType_ the type of the matrix of which we are computing the SVD decomposition * \tparam QRPreconditioner this optional parameter allows to specify the type of QR decomposition that will be used internally * for the R-SVD step for non-square matrices. See discussion of possible values below. * @@ -485,13 +485,13 @@ struct traits > * * \sa MatrixBase::jacobiSvd() */ -template class JacobiSVD - : public SVDBase > +template class JacobiSVD + : public SVDBase > { typedef SVDBase Base; public: - typedef _MatrixType MatrixType; + typedef MatrixType_ MatrixType; typedef typename MatrixType::Scalar Scalar; typedef typename NumTraits::Real RealScalar; enum { @@ -601,9 +601,9 @@ template class JacobiSVD using Base::m_prescribedThreshold; WorkMatrixType m_workMatrix; - template + template friend struct internal::svd_precondition_2x2_block_to_be_real; - template + template friend struct internal::qr_preconditioner_impl; internal::qr_preconditioner_impl m_qr_precond_morecols; diff --git a/Eigen/src/SVD/UpperBidiagonalization.h b/Eigen/src/SVD/UpperBidiagonalization.h index 997defc47..48d638591 100644 --- a/Eigen/src/SVD/UpperBidiagonalization.h +++ b/Eigen/src/SVD/UpperBidiagonalization.h @@ -17,11 +17,11 @@ namespace internal { // UpperBidiagonalization will probably be replaced by a Bidiagonalization class, don't want to make it stable API. // At the same time, it's useful to keep for now as it's about the only thing that is testing the BandMatrix class. -template class UpperBidiagonalization +template class UpperBidiagonalization { public: - typedef _MatrixType MatrixType; + typedef MatrixType_ MatrixType; enum { RowsAtCompileTime = MatrixType::RowsAtCompileTime, ColsAtCompileTime = MatrixType::ColsAtCompileTime, @@ -355,8 +355,8 @@ void upperbidiagonalization_inplace_blocked(MatrixType& A, BidiagType& bidiagona } } -template -UpperBidiagonalization<_MatrixType>& UpperBidiagonalization<_MatrixType>::computeUnblocked(const _MatrixType& matrix) +template +UpperBidiagonalization& UpperBidiagonalization::computeUnblocked(const MatrixType_& matrix) { Index rows = matrix.rows(); Index cols = matrix.cols(); @@ -377,8 +377,8 @@ UpperBidiagonalization<_MatrixType>& UpperBidiagonalization<_MatrixType>::comput return *this; } -template -UpperBidiagonalization<_MatrixType>& UpperBidiagonalization<_MatrixType>::compute(const _MatrixType& matrix) +template +UpperBidiagonalization& UpperBidiagonalization::compute(const MatrixType_& matrix) { Index rows = matrix.rows(); Index cols = matrix.cols(); diff --git a/Eigen/src/SparseCholesky/SimplicialCholesky.h b/Eigen/src/SparseCholesky/SimplicialCholesky.h index 9f93e3255..cbd30899a 100644 --- a/Eigen/src/SparseCholesky/SimplicialCholesky.h +++ b/Eigen/src/SparseCholesky/SimplicialCholesky.h @@ -271,17 +271,17 @@ class SimplicialCholeskyBase : public SparseSolverBase RealScalar m_shiftScale; }; -template > class SimplicialLLT; -template > class SimplicialLDLT; -template > class SimplicialCholesky; +template > class SimplicialLLT; +template > class SimplicialLDLT; +template > class SimplicialCholesky; namespace internal { -template struct traits > +template struct traits > { - typedef _MatrixType MatrixType; - typedef _Ordering OrderingType; - enum { UpLo = _UpLo }; + typedef MatrixType_ MatrixType; + typedef Ordering_ OrderingType; + enum { UpLo = UpLo_ }; typedef typename MatrixType::Scalar Scalar; typedef typename MatrixType::StorageIndex StorageIndex; typedef SparseMatrix CholMatrixType; @@ -291,11 +291,11 @@ template struct traits struct traits > +template struct traits > { - typedef _MatrixType MatrixType; - typedef _Ordering OrderingType; - enum { UpLo = _UpLo }; + typedef MatrixType_ MatrixType; + typedef Ordering_ OrderingType; + enum { UpLo = UpLo_ }; typedef typename MatrixType::Scalar Scalar; typedef typename MatrixType::StorageIndex StorageIndex; typedef SparseMatrix CholMatrixType; @@ -305,11 +305,11 @@ template struct traits struct traits > +template struct traits > { - typedef _MatrixType MatrixType; - typedef _Ordering OrderingType; - enum { UpLo = _UpLo }; + typedef MatrixType_ MatrixType; + typedef Ordering_ OrderingType; + enum { UpLo = UpLo_ }; }; } @@ -325,21 +325,21 @@ template struct traits - * \tparam _UpLo the triangular part that will be used for the computations. It can be Lower + * \tparam MatrixType_ the type of the sparse matrix A, it must be a SparseMatrix<> + * \tparam UpLo_ the triangular part that will be used for the computations. It can be Lower * or Upper. Default is Lower. - * \tparam _Ordering The ordering method to use, either AMDOrdering<> or NaturalOrdering<>. Default is AMDOrdering<> + * \tparam Ordering_ The ordering method to use, either AMDOrdering<> or NaturalOrdering<>. Default is AMDOrdering<> * * \implsparsesolverconcept * * \sa class SimplicialLDLT, class AMDOrdering, class NaturalOrdering */ -template - class SimplicialLLT : public SimplicialCholeskyBase > +template + class SimplicialLLT : public SimplicialCholeskyBase > { public: - typedef _MatrixType MatrixType; - enum { UpLo = _UpLo }; + typedef MatrixType_ MatrixType; + enum { UpLo = UpLo_ }; typedef SimplicialCholeskyBase Base; typedef typename MatrixType::Scalar Scalar; typedef typename MatrixType::RealScalar RealScalar; @@ -416,21 +416,21 @@ public: * In order to reduce the fill-in, a symmetric permutation P is applied prior to the factorization * such that the factorized matrix is P A P^-1. * - * \tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<> - * \tparam _UpLo the triangular part that will be used for the computations. It can be Lower + * \tparam MatrixType_ the type of the sparse matrix A, it must be a SparseMatrix<> + * \tparam UpLo_ the triangular part that will be used for the computations. It can be Lower * or Upper. Default is Lower. - * \tparam _Ordering The ordering method to use, either AMDOrdering<> or NaturalOrdering<>. Default is AMDOrdering<> + * \tparam Ordering_ The ordering method to use, either AMDOrdering<> or NaturalOrdering<>. Default is AMDOrdering<> * * \implsparsesolverconcept * * \sa class SimplicialLLT, class AMDOrdering, class NaturalOrdering */ -template - class SimplicialLDLT : public SimplicialCholeskyBase > +template + class SimplicialLDLT : public SimplicialCholeskyBase > { public: - typedef _MatrixType MatrixType; - enum { UpLo = _UpLo }; + typedef MatrixType_ MatrixType; + enum { UpLo = UpLo_ }; typedef SimplicialCholeskyBase Base; typedef typename MatrixType::Scalar Scalar; typedef typename MatrixType::RealScalar RealScalar; @@ -507,12 +507,12 @@ public: * * \sa class SimplicialLDLT, class SimplicialLLT */ -template - class SimplicialCholesky : public SimplicialCholeskyBase > +template + class SimplicialCholesky : public SimplicialCholeskyBase > { public: - typedef _MatrixType MatrixType; - enum { UpLo = _UpLo }; + typedef MatrixType_ MatrixType; + enum { UpLo = UpLo_ }; typedef SimplicialCholeskyBase Base; typedef typename MatrixType::Scalar Scalar; typedef typename MatrixType::RealScalar RealScalar; diff --git a/Eigen/src/SparseCore/AmbiVector.h b/Eigen/src/SparseCore/AmbiVector.h index 2cb7747cc..212389b0a 100644 --- a/Eigen/src/SparseCore/AmbiVector.h +++ b/Eigen/src/SparseCore/AmbiVector.h @@ -19,12 +19,12 @@ namespace internal { * * See BasicSparseLLT and SparseProduct for usage examples. */ -template +template class AmbiVector { public: - typedef _Scalar Scalar; - typedef _StorageIndex StorageIndex; + typedef Scalar_ Scalar; + typedef StorageIndex_ StorageIndex; typedef typename NumTraits::Real RealScalar; explicit AmbiVector(Index size) @@ -125,8 +125,8 @@ class AmbiVector }; /** \returns the number of non zeros in the current sub vector */ -template -Index AmbiVector<_Scalar,_StorageIndex>::nonZeros() const +template +Index AmbiVector::nonZeros() const { if (m_mode==IsSparse) return m_llSize; @@ -134,8 +134,8 @@ Index AmbiVector<_Scalar,_StorageIndex>::nonZeros() const return m_end - m_start; } -template -void AmbiVector<_Scalar,_StorageIndex>::init(double estimatedDensity) +template +void AmbiVector::init(double estimatedDensity) { if (estimatedDensity>0.1) init(IsDense); @@ -143,8 +143,8 @@ void AmbiVector<_Scalar,_StorageIndex>::init(double estimatedDensity) init(IsSparse); } -template -void AmbiVector<_Scalar,_StorageIndex>::init(int mode) +template +void AmbiVector::init(int mode) { m_mode = mode; // This is only necessary in sparse mode, but we set these unconditionally to avoid some maybe-uninitialized warnings @@ -160,15 +160,15 @@ void AmbiVector<_Scalar,_StorageIndex>::init(int mode) * * Don't worry, this function is extremely cheap. */ -template -void AmbiVector<_Scalar,_StorageIndex>::restart() +template +void AmbiVector::restart() { m_llCurrent = m_llStart; } /** Set all coefficients of current subvector to zero */ -template -void AmbiVector<_Scalar,_StorageIndex>::setZero() +template +void AmbiVector::setZero() { if (m_mode==IsDense) { @@ -183,8 +183,8 @@ void AmbiVector<_Scalar,_StorageIndex>::setZero() } } -template -_Scalar& AmbiVector<_Scalar,_StorageIndex>::coeffRef(Index i) +template +Scalar_& AmbiVector::coeffRef(Index i) { if (m_mode==IsDense) return m_buffer[i]; @@ -252,8 +252,8 @@ _Scalar& AmbiVector<_Scalar,_StorageIndex>::coeffRef(Index i) } } -template -_Scalar& AmbiVector<_Scalar,_StorageIndex>::coeff(Index i) +template +Scalar_& AmbiVector::coeff(Index i) { if (m_mode==IsDense) return m_buffer[i]; @@ -280,11 +280,11 @@ _Scalar& AmbiVector<_Scalar,_StorageIndex>::coeff(Index i) } /** Iterator over the nonzero coefficients */ -template -class AmbiVector<_Scalar,_StorageIndex>::Iterator +template +class AmbiVector::Iterator { public: - typedef _Scalar Scalar; + typedef Scalar_ Scalar; typedef typename NumTraits::Real RealScalar; /** Default constructor diff --git a/Eigen/src/SparseCore/CompressedStorage.h b/Eigen/src/SparseCore/CompressedStorage.h index acd986fab..a5202c1e4 100644 --- a/Eigen/src/SparseCore/CompressedStorage.h +++ b/Eigen/src/SparseCore/CompressedStorage.h @@ -18,13 +18,13 @@ namespace internal { * Stores a sparse set of values as a list of values and a list of indices. * */ -template +template class CompressedStorage { public: - typedef _Scalar Scalar; - typedef _StorageIndex StorageIndex; + typedef Scalar_ Scalar; + typedef StorageIndex_ StorageIndex; protected: diff --git a/Eigen/src/SparseCore/MappedSparseMatrix.h b/Eigen/src/SparseCore/MappedSparseMatrix.h index 67718c85b..e980277ad 100644 --- a/Eigen/src/SparseCore/MappedSparseMatrix.h +++ b/Eigen/src/SparseCore/MappedSparseMatrix.h @@ -17,22 +17,22 @@ namespace Eigen { * * \brief Sparse matrix * - * \param _Scalar the scalar type, i.e. the type of the coefficients + * \param Scalar_ the scalar type, i.e. the type of the coefficients * * See http://www.netlib.org/linalg/html_templates/node91.html for details on the storage scheme. * */ namespace internal { -template -struct traits > : traits > +template +struct traits > : traits > {}; } // end namespace internal -template +template class MappedSparseMatrix - : public Map > + : public Map > { - typedef Map > Base; + typedef Map > Base; public: @@ -49,11 +49,11 @@ class MappedSparseMatrix namespace internal { -template -struct evaluator > - : evaluator > > +template +struct evaluator > + : evaluator > > { - typedef MappedSparseMatrix<_Scalar,_Options,_StorageIndex> XprType; + typedef MappedSparseMatrix XprType; typedef evaluator > Base; evaluator() : Base() {} diff --git a/Eigen/src/SparseCore/SparseBlock.h b/Eigen/src/SparseCore/SparseBlock.h index 5b4f6cc9f..c7bbb9e83 100644 --- a/Eigen/src/SparseCore/SparseBlock.h +++ b/Eigen/src/SparseCore/SparseBlock.h @@ -283,13 +283,13 @@ public: } // namespace internal -template -class BlockImpl,BlockRows,BlockCols,true,Sparse> - : public internal::sparse_matrix_block_impl,BlockRows,BlockCols> +template +class BlockImpl,BlockRows,BlockCols,true,Sparse> + : public internal::sparse_matrix_block_impl,BlockRows,BlockCols> { public: - typedef _StorageIndex StorageIndex; - typedef SparseMatrix<_Scalar, _Options, _StorageIndex> SparseMatrixType; + typedef StorageIndex_ StorageIndex; + typedef SparseMatrix SparseMatrixType; typedef internal::sparse_matrix_block_impl Base; inline BlockImpl(SparseMatrixType& xpr, Index i) : Base(xpr, i) @@ -302,13 +302,13 @@ public: using Base::operator=; }; -template -class BlockImpl,BlockRows,BlockCols,true,Sparse> - : public internal::sparse_matrix_block_impl,BlockRows,BlockCols> +template +class BlockImpl,BlockRows,BlockCols,true,Sparse> + : public internal::sparse_matrix_block_impl,BlockRows,BlockCols> { public: - typedef _StorageIndex StorageIndex; - typedef const SparseMatrix<_Scalar, _Options, _StorageIndex> SparseMatrixType; + typedef StorageIndex_ StorageIndex; + typedef const SparseMatrix SparseMatrixType; typedef internal::sparse_matrix_block_impl Base; inline BlockImpl(SparseMatrixType& xpr, Index i) : Base(xpr, i) @@ -545,20 +545,20 @@ public: inline operator bool() const { return m_outerPos < m_end; } }; -template -struct unary_evaluator,BlockRows,BlockCols,true>, IteratorBased> - : evaluator,BlockRows,BlockCols,true> > > +template +struct unary_evaluator,BlockRows,BlockCols,true>, IteratorBased> + : evaluator,BlockRows,BlockCols,true> > > { - typedef Block,BlockRows,BlockCols,true> XprType; + typedef Block,BlockRows,BlockCols,true> XprType; typedef evaluator > Base; explicit unary_evaluator(const XprType &xpr) : Base(xpr) {} }; -template -struct unary_evaluator,BlockRows,BlockCols,true>, IteratorBased> - : evaluator,BlockRows,BlockCols,true> > > +template +struct unary_evaluator,BlockRows,BlockCols,true>, IteratorBased> + : evaluator,BlockRows,BlockCols,true> > > { - typedef Block,BlockRows,BlockCols,true> XprType; + typedef Block,BlockRows,BlockCols,true> XprType; typedef evaluator > Base; explicit unary_evaluator(const XprType &xpr) : Base(xpr) {} }; diff --git a/Eigen/src/SparseCore/SparseDenseProduct.h b/Eigen/src/SparseCore/SparseDenseProduct.h index f005a18a1..722e928c4 100644 --- a/Eigen/src/SparseCore/SparseDenseProduct.h +++ b/Eigen/src/SparseCore/SparseDenseProduct.h @@ -73,8 +73,8 @@ struct sparse_time_dense_product_impl let's disable it for now as it is conflicting with generic scalar*matrix and matrix*scalar operators -// template -// struct ScalarBinaryOpTraits > +// template +// struct ScalarBinaryOpTraits > // { // enum { // Defined = 1 diff --git a/Eigen/src/SparseCore/SparseMatrix.h b/Eigen/src/SparseCore/SparseMatrix.h index 1db906d5d..75589e267 100644 --- a/Eigen/src/SparseCore/SparseMatrix.h +++ b/Eigen/src/SparseCore/SparseMatrix.h @@ -29,10 +29,10 @@ namespace Eigen { * * More details on this storage sceheme are given in the \ref TutorialSparse "manual pages". * - * \tparam _Scalar the scalar type, i.e. the type of the coefficients - * \tparam _Options Union of bit flags controlling the storage scheme. Currently the only possibility + * \tparam Scalar_ the scalar type, i.e. the type of the coefficients + * \tparam Options_ Union of bit flags controlling the storage scheme. Currently the only possibility * is ColMajor or RowMajor. The default is 0 which means column-major. - * \tparam _StorageIndex the type of the indices. It has to be a \b signed type (e.g., short, int, std::ptrdiff_t). Default is \c int. + * \tparam StorageIndex_ the type of the indices. It has to be a \b signed type (e.g., short, int, std::ptrdiff_t). Default is \c int. * * \warning In %Eigen 3.2, the undocumented type \c SparseMatrix::Index was improperly defined as the storage index type (e.g., int), * whereas it is now (starting from %Eigen 3.3) deprecated and always defined as Eigen::Index. @@ -43,11 +43,11 @@ namespace Eigen { */ namespace internal { -template -struct traits > +template +struct traits > { - typedef _Scalar Scalar; - typedef _StorageIndex StorageIndex; + typedef Scalar_ Scalar; + typedef StorageIndex_ StorageIndex; typedef Sparse StorageKind; typedef MatrixXpr XprKind; enum { @@ -55,21 +55,21 @@ struct traits > ColsAtCompileTime = Dynamic, MaxRowsAtCompileTime = Dynamic, MaxColsAtCompileTime = Dynamic, - Flags = _Options | NestByRefBit | LvalueBit | CompressedAccessBit, + Flags = Options_ | NestByRefBit | LvalueBit | CompressedAccessBit, SupportedAccessPatterns = InnerRandomAccessPattern }; }; -template -struct traits, DiagIndex> > +template +struct traits, DiagIndex> > { - typedef SparseMatrix<_Scalar, _Options, _StorageIndex> MatrixType; + typedef SparseMatrix MatrixType; typedef typename ref_selector::type MatrixTypeNested; typedef typename remove_reference::type _MatrixTypeNested; - typedef _Scalar Scalar; + typedef Scalar_ Scalar; typedef Dense StorageKind; - typedef _StorageIndex StorageIndex; + typedef StorageIndex_ StorageIndex; typedef MatrixXpr XprKind; enum { @@ -81,9 +81,9 @@ struct traits, DiagIndex }; }; -template -struct traits, DiagIndex> > - : public traits, DiagIndex> > +template +struct traits, DiagIndex> > + : public traits, DiagIndex> > { enum { Flags = 0 @@ -92,13 +92,13 @@ struct traits, Dia } // end namespace internal -template +template class SparseMatrix - : public SparseCompressedBase > + : public SparseCompressedBase > { typedef SparseCompressedBase Base; using Base::convert_index; - friend class SparseVector<_Scalar,0,_StorageIndex>; + friend class SparseVector; template friend struct internal::Assignment; public: @@ -118,7 +118,7 @@ class SparseMatrix using Base::IsRowMajor; typedef internal::CompressedStorage Storage; enum { - Options = _Options + Options = Options_ }; typedef typename Base::IndexVector IndexVector; @@ -1104,11 +1104,11 @@ void set_from_triplets(const InputIterator& begin, const InputIterator& end, Spa * an abstract iterator over a complex data-structure that would be expensive to evaluate. The triplets should rather * be explicitly stored into a std::vector for instance. */ -template +template template -void SparseMatrix::setFromTriplets(const InputIterators& begin, const InputIterators& end) +void SparseMatrix::setFromTriplets(const InputIterators& begin, const InputIterators& end) { - internal::set_from_triplets >(begin, end, *this, internal::scalar_sum_op()); + internal::set_from_triplets >(begin, end, *this, internal::scalar_sum_op()); } /** The same as setFromTriplets but when duplicates are met the functor \a dup_func is applied: @@ -1120,17 +1120,17 @@ void SparseMatrix::setFromTriplets(const InputIte * mat.setFromTriplets(triplets.begin(), triplets.end(), [] (const Scalar&,const Scalar &b) { return b; }); * \endcode */ -template +template template -void SparseMatrix::setFromTriplets(const InputIterators& begin, const InputIterators& end, DupFunctor dup_func) +void SparseMatrix::setFromTriplets(const InputIterators& begin, const InputIterators& end, DupFunctor dup_func) { - internal::set_from_triplets, DupFunctor>(begin, end, *this, dup_func); + internal::set_from_triplets, DupFunctor>(begin, end, *this, dup_func); } /** \internal */ -template +template template -void SparseMatrix::collapseDuplicates(DupFunctor dup_func) +void SparseMatrix::collapseDuplicates(DupFunctor dup_func) { eigen_assert(!isCompressed()); // TODO, in practice we should be able to use m_innerNonZeros for that task @@ -1168,9 +1168,9 @@ void SparseMatrix::collapseDuplicates(DupFunctor m_data.resize(m_outerIndex[m_outerSize]); } -template +template template -EIGEN_DONT_INLINE SparseMatrix& SparseMatrix::operator=(const SparseMatrixBase& other) +EIGEN_DONT_INLINE SparseMatrix& SparseMatrix::operator=(const SparseMatrixBase& other) { EIGEN_STATIC_ASSERT((internal::is_same::value), YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY) @@ -1241,8 +1241,8 @@ EIGEN_DONT_INLINE SparseMatrix& SparseMatrix -typename SparseMatrix<_Scalar,_Options,_StorageIndex>::Scalar& SparseMatrix<_Scalar,_Options,_StorageIndex>::insert(Index row, Index col) +template +typename SparseMatrix::Scalar& SparseMatrix::insert(Index row, Index col) { eigen_assert(row>=0 && row=0 && col::Scalar& SparseMatrix<_Sca return insertUncompressed(row,col); } -template -EIGEN_DONT_INLINE typename SparseMatrix<_Scalar,_Options,_StorageIndex>::Scalar& SparseMatrix<_Scalar,_Options,_StorageIndex>::insertUncompressed(Index row, Index col) +template +EIGEN_DONT_INLINE typename SparseMatrix::Scalar& SparseMatrix::insertUncompressed(Index row, Index col) { eigen_assert(!isCompressed()); @@ -1393,8 +1393,8 @@ EIGEN_DONT_INLINE typename SparseMatrix<_Scalar,_Options,_StorageIndex>::Scalar& return (m_data.value(p) = Scalar(0)); } -template -EIGEN_DONT_INLINE typename SparseMatrix<_Scalar,_Options,_StorageIndex>::Scalar& SparseMatrix<_Scalar,_Options,_StorageIndex>::insertCompressed(Index row, Index col) +template +EIGEN_DONT_INLINE typename SparseMatrix::Scalar& SparseMatrix::insertCompressed(Index row, Index col) { eigen_assert(isCompressed()); @@ -1502,12 +1502,12 @@ EIGEN_DONT_INLINE typename SparseMatrix<_Scalar,_Options,_StorageIndex>::Scalar& namespace internal { -template -struct evaluator > - : evaluator > > +template +struct evaluator > + : evaluator > > { - typedef evaluator > > Base; - typedef SparseMatrix<_Scalar,_Options,_StorageIndex> SparseMatrixType; + typedef evaluator > > Base; + typedef SparseMatrix SparseMatrixType; evaluator() : Base() {} explicit evaluator(const SparseMatrixType &mat) : Base(mat) {} }; diff --git a/Eigen/src/SparseCore/SparseProduct.h b/Eigen/src/SparseCore/SparseProduct.h index af8a7744d..78654d128 100644 --- a/Eigen/src/SparseCore/SparseProduct.h +++ b/Eigen/src/SparseCore/SparseProduct.h @@ -165,9 +165,9 @@ protected: } // end namespace internal // sparse matrix = sparse-product (can be sparse*sparse, sparse*perm, etc.) -template +template template -SparseMatrix& SparseMatrix::operator=(const Product& src) +SparseMatrix& SparseMatrix::operator=(const Product& src) { // std::cout << "in Assignment : " << DstOptions << "\n"; SparseMatrix dst(src.rows(),src.cols()); diff --git a/Eigen/src/SparseCore/SparseRedux.h b/Eigen/src/SparseCore/SparseRedux.h index 458774962..0748d3b86 100644 --- a/Eigen/src/SparseCore/SparseRedux.h +++ b/Eigen/src/SparseCore/SparseRedux.h @@ -25,9 +25,9 @@ SparseMatrixBase::sum() const return res; } -template -typename internal::traits >::Scalar -SparseMatrix<_Scalar,_Options,_Index>::sum() const +template +typename internal::traits >::Scalar +SparseMatrix::sum() const { eigen_assert(rows()>0 && cols()>0 && "you are using a non initialized matrix"); if(this->isCompressed()) @@ -36,9 +36,9 @@ SparseMatrix<_Scalar,_Options,_Index>::sum() const return Base::sum(); } -template -typename internal::traits >::Scalar -SparseVector<_Scalar,_Options,_Index>::sum() const +template +typename internal::traits >::Scalar +SparseVector::sum() const { eigen_assert(rows()>0 && cols()>0 && "you are using a non initialized matrix"); return Matrix::Map(m_data.valuePtr(), m_data.size()).sum(); diff --git a/Eigen/src/SparseCore/SparseRef.h b/Eigen/src/SparseCore/SparseRef.h index 748f87d62..f6e18aa99 100644 --- a/Eigen/src/SparseCore/SparseRef.h +++ b/Eigen/src/SparseCore/SparseRef.h @@ -20,13 +20,13 @@ namespace internal { template class SparseRefBase; -template -struct traits, _Options, _StrideType> > +template +struct traits, Options_, _StrideType> > : public traits > { typedef SparseMatrix PlainObjectType; enum { - Options = _Options, + Options = Options_, Flags = traits::Flags | CompressedAccessBit | NestByRefBit }; @@ -40,22 +40,22 @@ struct traits, _Options, _Stride }; -template -struct traits, _Options, _StrideType> > - : public traits, _Options, _StrideType> > +template +struct traits, Options_, _StrideType> > + : public traits, Options_, _StrideType> > { enum { Flags = (traits >::Flags | CompressedAccessBit | NestByRefBit) & ~LvalueBit }; }; -template -struct traits, _Options, _StrideType> > +template +struct traits, Options_, _StrideType> > : public traits > { typedef SparseVector PlainObjectType; enum { - Options = _Options, + Options = Options_, Flags = traits::Flags | CompressedAccessBit | NestByRefBit }; @@ -68,9 +68,9 @@ struct traits, _Options, _Stride }; -template -struct traits, _Options, _StrideType> > - : public traits, _Options, _StrideType> > +template +struct traits, Options_, _StrideType> > + : public traits, Options_, _StrideType> > { enum { Flags = (traits >::Flags | CompressedAccessBit | NestByRefBit) & ~LvalueBit diff --git a/Eigen/src/SparseCore/SparseSelfAdjointView.h b/Eigen/src/SparseCore/SparseSelfAdjointView.h index 85b00e10e..f4d1f356b 100644 --- a/Eigen/src/SparseCore/SparseSelfAdjointView.h +++ b/Eigen/src/SparseCore/SparseSelfAdjointView.h @@ -40,13 +40,13 @@ void permute_symm_to_fullsymm(const MatrixType& mat, SparseMatrix class SparseSelfAdjointView - : public EigenBase > +template class SparseSelfAdjointView + : public EigenBase > { public: enum { - Mode = _Mode, + Mode = Mode_, TransposeMode = ((Mode & Upper) ? Lower : 0) | ((Mode & Lower) ? Upper : 0), RowsAtCompileTime = internal::traits::RowsAtCompileTime, ColsAtCompileTime = internal::traits::ColsAtCompileTime @@ -516,7 +516,7 @@ void permute_symm_to_fullsymm(const MatrixType& mat, SparseMatrix +template void permute_symm_to_symm(const MatrixType& mat, SparseMatrix& _dest, const typename MatrixType::StorageIndex* perm) { typedef typename MatrixType::StorageIndex StorageIndex; @@ -529,8 +529,8 @@ void permute_symm_to_symm(const MatrixType& mat, SparseMatrix class SparseMatrix; -template class DynamicSparseMatrix; -template class SparseVector; -template class MappedSparseMatrix; +template class SparseMatrix; +template class DynamicSparseMatrix; +template class SparseVector; +template class MappedSparseMatrix; template class SparseSelfAdjointView; template class SparseDiagonalProduct; @@ -80,41 +80,41 @@ template struct eval {}; template struct sparse_eval { - typedef typename traits::Scalar _Scalar; - typedef typename traits::StorageIndex _StorageIndex; + typedef typename traits::Scalar Scalar_; + typedef typename traits::StorageIndex StorageIndex_; public: - typedef SparseVector<_Scalar, RowMajor, _StorageIndex> type; + typedef SparseVector type; }; template struct sparse_eval { - typedef typename traits::Scalar _Scalar; - typedef typename traits::StorageIndex _StorageIndex; + typedef typename traits::Scalar Scalar_; + typedef typename traits::StorageIndex StorageIndex_; public: - typedef SparseVector<_Scalar, ColMajor, _StorageIndex> type; + typedef SparseVector type; }; // TODO this seems almost identical to plain_matrix_type template struct sparse_eval { - typedef typename traits::Scalar _Scalar; - typedef typename traits::StorageIndex _StorageIndex; - enum { _Options = ((Flags&RowMajorBit)==RowMajorBit) ? RowMajor : ColMajor }; + typedef typename traits::Scalar Scalar_; + typedef typename traits::StorageIndex StorageIndex_; + enum { Options_ = ((Flags&RowMajorBit)==RowMajorBit) ? RowMajor : ColMajor }; public: - typedef SparseMatrix<_Scalar, _Options, _StorageIndex> type; + typedef SparseMatrix type; }; template struct sparse_eval { - typedef typename traits::Scalar _Scalar; + typedef typename traits::Scalar Scalar_; public: - typedef Matrix<_Scalar, 1, 1> type; + typedef Matrix type; }; template struct plain_matrix_type { - typedef typename traits::Scalar _Scalar; - typedef typename traits::StorageIndex _StorageIndex; - enum { _Options = ((evaluator::Flags&RowMajorBit)==RowMajorBit) ? RowMajor : ColMajor }; + typedef typename traits::Scalar Scalar_; + typedef typename traits::StorageIndex StorageIndex_; + enum { Options_ = ((evaluator::Flags&RowMajorBit)==RowMajorBit) ? RowMajor : ColMajor }; public: - typedef SparseMatrix<_Scalar, _Options, _StorageIndex> type; + typedef SparseMatrix type; }; template diff --git a/Eigen/src/SparseCore/SparseVector.h b/Eigen/src/SparseCore/SparseVector.h index 05779be68..c9d012781 100644 --- a/Eigen/src/SparseCore/SparseVector.h +++ b/Eigen/src/SparseCore/SparseVector.h @@ -17,7 +17,7 @@ namespace Eigen { * * \brief a sparse vector class * - * \tparam _Scalar the scalar type, i.e. the type of the coefficients + * \tparam Scalar_ the scalar type, i.e. the type of the coefficients * * See http://www.netlib.org/linalg/html_templates/node91.html for details on the storage scheme. * @@ -26,21 +26,21 @@ namespace Eigen { */ namespace internal { -template -struct traits > +template +struct traits > { - typedef _Scalar Scalar; - typedef _StorageIndex StorageIndex; + typedef Scalar_ Scalar; + typedef StorageIndex_ StorageIndex; typedef Sparse StorageKind; typedef MatrixXpr XprKind; enum { - IsColVector = (_Options & RowMajorBit) ? 0 : 1, + IsColVector = (Options_ & RowMajorBit) ? 0 : 1, RowsAtCompileTime = IsColVector ? Dynamic : 1, ColsAtCompileTime = IsColVector ? 1 : Dynamic, MaxRowsAtCompileTime = RowsAtCompileTime, MaxColsAtCompileTime = ColsAtCompileTime, - Flags = _Options | NestByRefBit | LvalueBit | (IsColVector ? 0 : RowMajorBit) | CompressedAccessBit, + Flags = Options_ | NestByRefBit | LvalueBit | (IsColVector ? 0 : RowMajorBit) | CompressedAccessBit, SupportedAccessPatterns = InnerRandomAccessPattern }; }; @@ -60,9 +60,9 @@ struct sparse_vector_assign_selector; } -template +template class SparseVector - : public SparseCompressedBase > + : public SparseCompressedBase > { typedef SparseCompressedBase Base; using Base::convert_index; @@ -75,7 +75,7 @@ class SparseVector enum { IsColVector = internal::traits::IsColVector }; enum { - Options = _Options + Options = Options_ }; EIGEN_STRONG_INLINE Index rows() const { return IsColVector ? m_size : 1; } @@ -397,7 +397,7 @@ protected: static void check_template_parameters() { EIGEN_STATIC_ASSERT(NumTraits::IsSigned,THE_INDEX_TYPE_MUST_BE_A_SIGNED_TYPE); - EIGEN_STATIC_ASSERT((_Options&(ColMajor|RowMajor))==Options,INVALID_MATRIX_TEMPLATE_PARAMETERS); + EIGEN_STATIC_ASSERT((Options_&(ColMajor|RowMajor))==Options,INVALID_MATRIX_TEMPLATE_PARAMETERS); } Storage m_data; @@ -406,17 +406,17 @@ protected: namespace internal { -template -struct evaluator > - : evaluator_base > +template +struct evaluator > + : evaluator_base > { - typedef SparseVector<_Scalar,_Options,_Index> SparseVectorType; + typedef SparseVector SparseVectorType; typedef evaluator_base Base; typedef typename SparseVectorType::InnerIterator InnerIterator; typedef typename SparseVectorType::ReverseInnerIterator ReverseInnerIterator; enum { - CoeffReadCost = NumTraits<_Scalar>::ReadCost, + CoeffReadCost = NumTraits::ReadCost, Flags = SparseVectorType::Flags }; diff --git a/Eigen/src/SparseLU/SparseLU.h b/Eigen/src/SparseLU/SparseLU.h index 0c8d8939b..9814565ca 100644 --- a/Eigen/src/SparseLU/SparseLU.h +++ b/Eigen/src/SparseLU/SparseLU.h @@ -14,7 +14,7 @@ namespace Eigen { -template > class SparseLU; +template > class SparseLU; template struct SparseLUMatrixLReturnType; template struct SparseLUMatrixUReturnType; @@ -119,25 +119,25 @@ private: * If this is the case for your matrices, you can try the basic scaling method at * "unsupported/Eigen/src/IterativeSolvers/Scaling.h" * - * \tparam _MatrixType The type of the sparse matrix. It must be a column-major SparseMatrix<> - * \tparam _OrderingType The ordering method to use, either AMD, COLAMD or METIS. Default is COLMAD + * \tparam MatrixType_ The type of the sparse matrix. It must be a column-major SparseMatrix<> + * \tparam OrderingType_ The ordering method to use, either AMD, COLAMD or METIS. Default is COLMAD * * \implsparsesolverconcept * * \sa \ref TutorialSparseSolverConcept * \sa \ref OrderingMethods_Module */ -template -class SparseLU : public SparseSolverBase >, public internal::SparseLUImpl +template +class SparseLU : public SparseSolverBase >, public internal::SparseLUImpl { protected: - typedef SparseSolverBase > APIBase; + typedef SparseSolverBase > APIBase; using APIBase::m_isInitialized; public: using APIBase::_solve_impl; - typedef _MatrixType MatrixType; - typedef _OrderingType OrderingType; + typedef MatrixType_ MatrixType; + typedef OrderingType_ OrderingType; typedef typename MatrixType::Scalar Scalar; typedef typename MatrixType::RealScalar RealScalar; typedef typename MatrixType::StorageIndex StorageIndex; @@ -197,9 +197,9 @@ class SparseLU : public SparseSolverBase >, * * \sa adjoint(), solve() */ - const SparseLUTransposeView > transpose() + const SparseLUTransposeView > transpose() { - SparseLUTransposeView > transposeView; + SparseLUTransposeView > transposeView; transposeView.setSparseLU(this); transposeView.setIsInitialized(this->m_isInitialized); return transposeView; @@ -218,9 +218,9 @@ class SparseLU : public SparseSolverBase >, * * \sa transpose(), solve() */ - const SparseLUTransposeView > adjoint() + const SparseLUTransposeView > adjoint() { - SparseLUTransposeView > adjointView; + SparseLUTransposeView > adjointView; adjointView.setSparseLU(this); adjointView.setIsInitialized(this->m_isInitialized); return adjointView; diff --git a/Eigen/src/SparseLU/SparseLU_SupernodalMatrix.h b/Eigen/src/SparseLU/SparseLU_SupernodalMatrix.h index 0be293d17..7eda565e5 100644 --- a/Eigen/src/SparseLU/SparseLU_SupernodalMatrix.h +++ b/Eigen/src/SparseLU/SparseLU_SupernodalMatrix.h @@ -29,12 +29,12 @@ namespace internal { * SuperInnerIterator to iterate through all supernodes * Function for triangular solve */ -template +template class MappedSuperNodalMatrix { public: - typedef _Scalar Scalar; - typedef _StorageIndex StorageIndex; + typedef Scalar_ Scalar; + typedef StorageIndex_ StorageIndex; typedef Matrix IndexVector; typedef Matrix ScalarVector; public: diff --git a/Eigen/src/SparseQR/SparseQR.h b/Eigen/src/SparseQR/SparseQR.h index d1fb96f5c..a19eaccc6 100644 --- a/Eigen/src/SparseQR/SparseQR.h +++ b/Eigen/src/SparseQR/SparseQR.h @@ -59,8 +59,8 @@ namespace internal { * R is the sparse triangular or trapezoidal matrix. The later occurs when A is rank-deficient. * matrixR().topLeftCorner(rank(), rank()) always returns a triangular factor of full rank. * - * \tparam _MatrixType The type of the sparse matrix A, must be a column-major SparseMatrix<> - * \tparam _OrderingType The fill-reducing ordering method. See the \link OrderingMethods_Module + * \tparam MatrixType_ The type of the sparse matrix A, must be a column-major SparseMatrix<> + * \tparam OrderingType_ The fill-reducing ordering method. See the \link OrderingMethods_Module * OrderingMethods \endlink module for the list of built-in and external ordering methods. * * \implsparsesolverconcept @@ -80,16 +80,16 @@ namespace internal { * \warning For complex matrices matrixQ().transpose() will actually return the adjoint matrix. * */ -template -class SparseQR : public SparseSolverBase > +template +class SparseQR : public SparseSolverBase > { protected: - typedef SparseSolverBase > Base; + typedef SparseSolverBase > Base; using Base::m_isInitialized; public: using Base::_solve_impl; - typedef _MatrixType MatrixType; - typedef _OrderingType OrderingType; + typedef MatrixType_ MatrixType; + typedef OrderingType_ OrderingType; typedef typename MatrixType::Scalar Scalar; typedef typename MatrixType::RealScalar RealScalar; typedef typename MatrixType::StorageIndex StorageIndex; diff --git a/Eigen/src/SuperLUSupport/SuperLUSupport.h b/Eigen/src/SuperLUSupport/SuperLUSupport.h index d1d3ad7f1..825988d37 100644 --- a/Eigen/src/SuperLUSupport/SuperLUSupport.h +++ b/Eigen/src/SuperLUSupport/SuperLUSupport.h @@ -313,7 +313,7 @@ MappedSparseMatrix map_superlu(SluMatrix& sluMat) * \class SuperLUBase * \brief The base class for the direct and incomplete LU factorization of SuperLU */ -template +template class SuperLUBase : public SparseSolverBase { protected: @@ -321,7 +321,7 @@ class SuperLUBase : public SparseSolverBase using Base::derived; using Base::m_isInitialized; public: - typedef _MatrixType MatrixType; + typedef MatrixType_ MatrixType; typedef typename MatrixType::Scalar Scalar; typedef typename MatrixType::RealScalar RealScalar; typedef typename MatrixType::StorageIndex StorageIndex; @@ -476,7 +476,7 @@ class SuperLUBase : public SparseSolverBase * using the SuperLU library. The sparse matrix A must be squared and invertible. The vectors or matrices * X and B can be either dense or sparse. * - * \tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<> + * \tparam MatrixType_ the type of the sparse matrix A, it must be a SparseMatrix<> * * \warning This class is only for the 4.x versions of SuperLU. The 3.x and 5.x versions are not supported. * @@ -484,12 +484,12 @@ class SuperLUBase : public SparseSolverBase * * \sa \ref TutorialSparseSolverConcept, class SparseLU */ -template -class SuperLU : public SuperLUBase<_MatrixType,SuperLU<_MatrixType> > +template +class SuperLU : public SuperLUBase > { public: - typedef SuperLUBase<_MatrixType,SuperLU> Base; - typedef _MatrixType MatrixType; + typedef SuperLUBase Base; + typedef MatrixType_ MatrixType; typedef typename Base::Scalar Scalar; typedef typename Base::RealScalar RealScalar; typedef typename Base::StorageIndex StorageIndex; @@ -830,19 +830,19 @@ typename SuperLU::Scalar SuperLU::determinant() const * * \warning This class is only for the 4.x versions of SuperLU. The 3.x and 5.x versions are not supported. * - * \tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<> + * \tparam MatrixType_ the type of the sparse matrix A, it must be a SparseMatrix<> * * \implsparsesolverconcept * * \sa \ref TutorialSparseSolverConcept, class IncompleteLUT, class ConjugateGradient, class BiCGSTAB */ -template -class SuperILU : public SuperLUBase<_MatrixType,SuperILU<_MatrixType> > +template +class SuperILU : public SuperLUBase > { public: - typedef SuperLUBase<_MatrixType,SuperILU> Base; - typedef _MatrixType MatrixType; + typedef SuperLUBase Base; + typedef MatrixType_ MatrixType; typedef typename Base::Scalar Scalar; typedef typename Base::RealScalar RealScalar; diff --git a/Eigen/src/UmfPackSupport/UmfPackSupport.h b/Eigen/src/UmfPackSupport/UmfPackSupport.h index e3a333f80..07d1f8b0f 100644 --- a/Eigen/src/UmfPackSupport/UmfPackSupport.h +++ b/Eigen/src/UmfPackSupport/UmfPackSupport.h @@ -278,21 +278,21 @@ inline SuiteSparse_long umfpack_get_determinant(std::complex *Mx, double * * \warning The input matrix A should be in a \b compressed and \b column-major form. * Otherwise an expensive copy will be made. You can call the inexpensive makeCompressed() to get a compressed matrix. - * \tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<> + * \tparam MatrixType_ the type of the sparse matrix A, it must be a SparseMatrix<> * * \implsparsesolverconcept * * \sa \ref TutorialSparseSolverConcept, class SparseLU */ -template -class UmfPackLU : public SparseSolverBase > +template +class UmfPackLU : public SparseSolverBase > { protected: - typedef SparseSolverBase > Base; + typedef SparseSolverBase > Base; using Base::m_isInitialized; public: using Base::_solve_impl; - typedef _MatrixType MatrixType; + typedef MatrixType_ MatrixType; typedef typename MatrixType::Scalar Scalar; typedef typename MatrixType::RealScalar RealScalar; typedef typename MatrixType::StorageIndex StorageIndex; diff --git a/Eigen/src/misc/Image.h b/Eigen/src/misc/Image.h index b8b8a0455..e99f2d537 100644 --- a/Eigen/src/misc/Image.h +++ b/Eigen/src/misc/Image.h @@ -32,10 +32,10 @@ struct traits > > ReturnType; }; -template struct image_retval_base - : public ReturnByValue > +template struct image_retval_base + : public ReturnByValue > { - typedef _DecompositionType DecompositionType; + typedef DecompositionType_ DecompositionType; typedef typename DecompositionType::MatrixType MatrixType; typedef ReturnByValue Base; diff --git a/Eigen/src/misc/Kernel.h b/Eigen/src/misc/Kernel.h index bef5d6ff5..377a8ce6a 100644 --- a/Eigen/src/misc/Kernel.h +++ b/Eigen/src/misc/Kernel.h @@ -34,10 +34,10 @@ struct traits > > ReturnType; }; -template struct kernel_retval_base - : public ReturnByValue > +template struct kernel_retval_base + : public ReturnByValue > { - typedef _DecompositionType DecompositionType; + typedef DecompositionType_ DecompositionType; typedef ReturnByValue Base; explicit kernel_retval_base(const DecompositionType& dec) diff --git a/demos/opengl/gpuhelper.h b/demos/opengl/gpuhelper.h index 9ff98e9dc..880e9a50e 100644 --- a/demos/opengl/gpuhelper.h +++ b/demos/opengl/gpuhelper.h @@ -34,21 +34,21 @@ class GpuHelper Essentially, this helper function automatically calls glMatrixMode(matrixTarget) if required and does a proper call to the right glMultMatrix*() function according to the scalar type and storage order. - \warning glMatrixMode() must never be called directly. If your're unsure, use forceMatrixMode(). + \warning glMatrixMode() must never be called directly. If you are unsure, use forceMatrixMode(). \sa Matrix, loadMatrix(), forceMatrixMode() */ - template - void multMatrix(const Matrix& mat, GLenum matrixTarget); + template + void multMatrix(const Matrix& mat, GLenum matrixTarget); /** Load the matrix \a mat to the OpenGL matrix \a matrixTarget. Essentially, this helper function automatically calls glMatrixMode(matrixTarget) if required and does a proper call to the right glLoadMatrix*() or glLoadIdentity() function according to the scalar type and storage order. - \warning glMatrixMode() must never be called directly. If your're unsure, use forceMatrixMode(). + \warning glMatrixMode() must never be called directly. If you are unsure, use forceMatrixMode(). \sa Matrix, multMatrix(), forceMatrixMode() */ - template - void loadMatrix(const Eigen::Matrix& mat, GLenum matrixTarget); + template + void loadMatrix(const Eigen::Matrix& mat, GLenum matrixTarget); template void loadMatrix( @@ -66,8 +66,8 @@ class GpuHelper /** Push the OpenGL matrix \a matrixTarget and load \a mat. */ - template - inline void pushMatrix(const Matrix& mat, GLenum matrixTarget); + template + inline void pushMatrix(const Matrix& mat, GLenum matrixTarget); template void pushMatrix( @@ -113,22 +113,22 @@ extern GpuHelper gpu; /** \internal */ -template struct GlMatrixHelper; +template struct GlMatrixHelper; -template struct GlMatrixHelper +template struct GlMatrixHelper { - static void loadMatrix(const Matrix& mat) { glLoadMatrixf(mat.data()); } - static void loadMatrix(const Matrix& mat) { glLoadMatrixd(mat.data()); } - static void multMatrix(const Matrix& mat) { glMultMatrixf(mat.data()); } - static void multMatrix(const Matrix& mat) { glMultMatrixd(mat.data()); } + static void loadMatrix(const Matrix& mat) { glLoadMatrixf(mat.data()); } + static void loadMatrix(const Matrix& mat) { glLoadMatrixd(mat.data()); } + static void multMatrix(const Matrix& mat) { glMultMatrixf(mat.data()); } + static void multMatrix(const Matrix& mat) { glMultMatrixd(mat.data()); } }; -template struct GlMatrixHelper +template struct GlMatrixHelper { - static void loadMatrix(const Matrix& mat) { glLoadMatrixf(mat.transpose().eval().data()); } - static void loadMatrix(const Matrix& mat) { glLoadMatrixd(mat.transpose().eval().data()); } - static void multMatrix(const Matrix& mat) { glMultMatrixf(mat.transpose().eval().data()); } - static void multMatrix(const Matrix& mat) { glMultMatrixd(mat.transpose().eval().data()); } + static void loadMatrix(const Matrix& mat) { glLoadMatrixf(mat.transpose().eval().data()); } + static void loadMatrix(const Matrix& mat) { glLoadMatrixd(mat.transpose().eval().data()); } + static void multMatrix(const Matrix& mat) { glMultMatrixf(mat.transpose().eval().data()); } + static void multMatrix(const Matrix& mat) { glMultMatrixd(mat.transpose().eval().data()); } }; inline void GpuHelper::setMatrixTarget(GLenum matrixTarget) @@ -137,11 +137,11 @@ inline void GpuHelper::setMatrixTarget(GLenum matrixTarget) glMatrixMode(mCurrentMatrixTarget=matrixTarget); } -template -void GpuHelper::multMatrix(const Matrix& mat, GLenum matrixTarget) +template +void GpuHelper::multMatrix(const Matrix& mat, GLenum matrixTarget) { setMatrixTarget(matrixTarget); - GlMatrixHelper<_Flags&Eigen::RowMajorBit, _Flags>::multMatrix(mat); + GlMatrixHelper::multMatrix(mat); } template @@ -153,11 +153,11 @@ void GpuHelper::loadMatrix( glLoadIdentity(); } -template -void GpuHelper::loadMatrix(const Eigen::Matrix& mat, GLenum matrixTarget) +template +void GpuHelper::loadMatrix(const Eigen::Matrix& mat, GLenum matrixTarget) { setMatrixTarget(matrixTarget); - GlMatrixHelper<(_Flags&Eigen::RowMajorBit)!=0, _Flags>::loadMatrix(mat); + GlMatrixHelper<(Flags_&Eigen::RowMajorBit)!=0, Flags_>::loadMatrix(mat); } inline void GpuHelper::pushMatrix(GLenum matrixTarget) @@ -166,11 +166,11 @@ inline void GpuHelper::pushMatrix(GLenum matrixTarget) glPushMatrix(); } -template -inline void GpuHelper::pushMatrix(const Matrix& mat, GLenum matrixTarget) +template +inline void GpuHelper::pushMatrix(const Matrix& mat, GLenum matrixTarget) { pushMatrix(matrixTarget); - GlMatrixHelper<_Flags&Eigen::RowMajorBit,_Flags>::loadMatrix(mat); + GlMatrixHelper::loadMatrix(mat); } template diff --git a/demos/opengl/quaternion_demo.cpp b/demos/opengl/quaternion_demo.cpp index dd323a4c9..531448de1 100644 --- a/demos/opengl/quaternion_demo.cpp +++ b/demos/opengl/quaternion_demo.cpp @@ -132,11 +132,11 @@ inline static Frame lerpFrame(float alpha, const Frame& a, const Frame& b) Quaternionf(lerp(alpha,OrientationType(a.orientation),OrientationType(b.orientation)))); } -template class EulerAngles +template class EulerAngles { public: enum { Dim = 3 }; - typedef _Scalar Scalar; + typedef Scalar_ Scalar; typedef Matrix Matrix3; typedef Matrix Vector3; typedef Quaternion QuaternionType; diff --git a/doc/InsideEigenExample.dox b/doc/InsideEigenExample.dox index ea2275bf2..4af185d64 100644 --- a/doc/InsideEigenExample.dox +++ b/doc/InsideEigenExample.dox @@ -88,7 +88,7 @@ You may wonder, isn't it overengineering to have the storage in a separate class Let's look at this constructor, in src/Core/DenseStorage.h. You can see that there are many partial template specializations of DenseStorages here, treating separately the cases where dimensions are Dynamic or fixed at compile-time. The partial specialization that we are looking at is: \code -template class DenseStorage +template class DenseStorage \endcode Here, the constructor called is DenseStorage::DenseStorage(int size, int rows, int columns) @@ -101,7 +101,7 @@ inline DenseStorage(int size, int rows, int) : m_data(internal::aligned_new(s Here, the \a m_data member is the actual array of coefficients of the matrix. As you see, it is dynamically allocated. Rather than calling new[] or malloc(), as you can see, we have our own internal::aligned_new defined in src/Core/util/Memory.h. What it does is that if vectorization is enabled, then it uses a platform-specific call to allocate a 128-bit-aligned array, as that is very useful for vectorization with both SSE2 and AltiVec. If vectorization is disabled, it amounts to the standard new[]. -As you can see, the constructor also sets the \a m_rows member to \a size. Notice that there is no \a m_columns member: indeed, in this partial specialization of DenseStorage, we know the number of columns at compile-time, since the _Cols template parameter is different from Dynamic. Namely, in our case, _Cols is 1, which is to say that our vector is just a matrix with 1 column. Hence, there is no need to store the number of columns as a runtime variable. +As you can see, the constructor also sets the \a m_rows member to \a size. Notice that there is no \a m_columns member: indeed, in this partial specialization of DenseStorage, we know the number of columns at compile-time, since the Cols_ template parameter is different from Dynamic. Namely, in our case, Cols_ is 1, which is to say that our vector is just a matrix with 1 column. Hence, there is no need to store the number of columns as a runtime variable. When you call VectorXf::data() to get the pointer to the array of coefficients, it returns DenseStorage::data() which returns the \a m_data member. diff --git a/test/swap.cpp b/test/swap.cpp index 5b259d3ec..813c61325 100644 --- a/test/swap.cpp +++ b/test/swap.cpp @@ -16,10 +16,10 @@ struct other_matrix_type typedef int type; }; -template -struct other_matrix_type > +template +struct other_matrix_type > { - typedef Matrix<_Scalar, _Rows, _Cols, _Options^RowMajor, _MaxRows, _MaxCols> type; + typedef Matrix type; }; template void swap(const MatrixType& m) diff --git a/unsupported/Eigen/AlignedVector3 b/unsupported/Eigen/AlignedVector3 index 4fa1842ac..fb36608ea 100644 --- a/unsupported/Eigen/AlignedVector3 +++ b/unsupported/Eigen/AlignedVector3 @@ -37,23 +37,23 @@ namespace Eigen { * */ // TODO specialize Cwise -template class AlignedVector3; +template class AlignedVector3; namespace internal { -template struct traits > - : traits > +template struct traits > + : traits > { }; } -template class AlignedVector3 - : public MatrixBase > +template class AlignedVector3 + : public MatrixBase > { - typedef Matrix<_Scalar,4,1> CoeffType; + typedef Matrix CoeffType; CoeffType m_coeffs; public: - typedef MatrixBase > Base; + typedef MatrixBase > Base; EIGEN_DENSE_PUBLIC_INTERFACE(AlignedVector3) using Base::operator*; @@ -207,10 +207,10 @@ template class AlignedVector3 namespace internal { -template -struct eval, Dense> +template +struct eval, Dense> { - typedef const AlignedVector3<_Scalar>& type; + typedef const AlignedVector3& type; }; template diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorTraits.h b/unsupported/Eigen/CXX11/src/Tensor/TensorTraits.h index 4f7fd340e..87dc41836 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorTraits.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorTraits.h @@ -122,16 +122,16 @@ struct traits > }; -template -struct eval, Eigen::Dense> +template +struct eval, Eigen::Dense> { - typedef const Tensor<_Scalar, NumIndices_, Options, IndexType_>EIGEN_DEVICE_REF type; + typedef const TensorEIGEN_DEVICE_REF type; }; -template -struct eval, Eigen::Dense> +template +struct eval, Eigen::Dense> { - typedef const Tensor<_Scalar, NumIndices_, Options, IndexType_>EIGEN_DEVICE_REF type; + typedef const TensorEIGEN_DEVICE_REF type; }; template diff --git a/unsupported/Eigen/CXX11/src/TensorSymmetry/util/TemplateGroupTheory.h b/unsupported/Eigen/CXX11/src/TensorSymmetry/util/TemplateGroupTheory.h index 54bf9dbb3..61113fec7 100644 --- a/unsupported/Eigen/CXX11/src/TensorSymmetry/util/TemplateGroupTheory.h +++ b/unsupported/Eigen/CXX11/src/TensorSymmetry/util/TemplateGroupTheory.h @@ -637,21 +637,21 @@ struct enumerate_group_elements_noid, initia * \tparam Equality The equality check operation that checks if two group elements * are equal to another. * \tparam id The identity element - * \tparam _generators A list of (possibly redundant) generators of the group + * \tparam Generators_ A list of (possibly redundant) generators of the group */ template< template class Multiply, template class Equality, typename id, - typename _generators + typename Generators_ > struct enumerate_group_elements : public enumerate_group_elements_noid< Multiply, Equality, id, - typename strip_identities::type, - strip_identities::global_flags + typename strip_identities::type, + strip_identities::global_flags > { }; diff --git a/unsupported/Eigen/FFT b/unsupported/Eigen/FFT index c8c311a60..e16a7d952 100644 --- a/unsupported/Eigen/FFT +++ b/unsupported/Eigen/FFT @@ -203,11 +203,11 @@ class FFT } */ - template + template inline - void fwd( std::vector & dst, const std::vector<_Input> & src) + void fwd( std::vector & dst, const std::vector & src) { - if ( NumTraits<_Input>::IsComplex == 0 && HasFlag(HalfSpectrum) ) + if ( NumTraits::IsComplex == 0 && HasFlag(HalfSpectrum) ) dst.resize( (src.size()>>1)+1); // half the bins + Nyquist bin else dst.resize(src.size()); @@ -343,12 +343,12 @@ class FFT } } - template + template inline - void inv( std::vector<_Output> & dst, const std::vector & src,Index nfft=-1) + void inv( std::vector & dst, const std::vector & src,Index nfft=-1) { if (nfft<1) - nfft = ( NumTraits<_Output>::IsComplex == 0 && HasFlag(HalfSpectrum) ) ? 2*(src.size()-1) : src.size(); + nfft = ( NumTraits::IsComplex == 0 && HasFlag(HalfSpectrum) ) ? 2*(src.size()-1) : src.size(); dst.resize( nfft ); inv( &dst[0],&src[0],nfft); } diff --git a/unsupported/Eigen/src/BVH/KdBVH.h b/unsupported/Eigen/src/BVH/KdBVH.h index 2d5b76ad0..034fec77d 100644 --- a/unsupported/Eigen/src/BVH/KdBVH.h +++ b/unsupported/Eigen/src/BVH/KdBVH.h @@ -55,23 +55,23 @@ struct get_boxes_helper { /** \class KdBVH * \brief A simple bounding volume hierarchy based on AlignedBox * - * \param _Scalar The underlying scalar type of the bounding boxes - * \param _Dim The dimension of the space in which the hierarchy lives + * \param Scalar_ The underlying scalar type of the bounding boxes + * \param Dim_ The dimension of the space in which the hierarchy lives * \param _Object The object type that lives in the hierarchy. It must have value semantics. Either bounding_box(_Object) must - * be defined and return an AlignedBox<_Scalar, _Dim> or bounding boxes must be provided to the tree initializer. + * be defined and return an AlignedBox or bounding boxes must be provided to the tree initializer. * * This class provides a simple (as opposed to optimized) implementation of a bounding volume hierarchy analogous to a Kd-tree. * Given a sequence of objects, it computes their bounding boxes, constructs a Kd-tree of their centers * and builds a BVH with the structure of that Kd-tree. When the elements of the tree are too expensive to be copied around, * it is useful for _Object to be a pointer. */ -template class KdBVH +template class KdBVH { public: - enum { Dim = _Dim }; + enum { Dim = Dim_ }; typedef _Object Object; typedef std::vector > ObjectList; - typedef _Scalar Scalar; + typedef Scalar_ Scalar; typedef AlignedBox Volume; typedef std::vector > VolumeList; typedef int Index; diff --git a/unsupported/Eigen/src/EulerAngles/EulerAngles.h b/unsupported/Eigen/src/EulerAngles/EulerAngles.h index e43cdb7fb..7f4535d54 100644 --- a/unsupported/Eigen/src/EulerAngles/EulerAngles.h +++ b/unsupported/Eigen/src/EulerAngles/EulerAngles.h @@ -92,18 +92,18 @@ namespace Eigen * * More information about Euler angles: https://en.wikipedia.org/wiki/Euler_angles * - * \tparam _Scalar the scalar type, i.e. the type of the angles. + * \tparam Scalar_ the scalar type, i.e. the type of the angles. * * \tparam _System the EulerSystem to use, which represents the axes of rotation. */ - template - class EulerAngles : public RotationBase, 3> + template + class EulerAngles : public RotationBase, 3> { public: - typedef RotationBase, 3> Base; + typedef RotationBase, 3> Base; /** the scalar type of the angles */ - typedef _Scalar Scalar; + typedef Scalar_ Scalar; typedef typename NumTraits::Real RealScalar; /** the EulerSystem to use, which represents the axes of rotation. */ @@ -322,10 +322,10 @@ EIGEN_EULER_ANGLES_TYPEDEFS(double, d) namespace internal { - template - struct traits > + template + struct traits > { - typedef _Scalar Scalar; + typedef Scalar_ Scalar; }; // set from a rotation matrix diff --git a/unsupported/Eigen/src/EulerAngles/EulerSystem.h b/unsupported/Eigen/src/EulerAngles/EulerSystem.h index 2a833b0a4..3b06d0136 100644 --- a/unsupported/Eigen/src/EulerAngles/EulerSystem.h +++ b/unsupported/Eigen/src/EulerAngles/EulerSystem.h @@ -13,7 +13,7 @@ namespace Eigen { // Forward declarations - template + template class EulerAngles; namespace internal @@ -272,7 +272,7 @@ namespace Eigen res.gamma() = -res.gamma(); } - template + template friend class Eigen::EulerAngles; template + template struct fftw_impl { - typedef _Scalar Scalar; + typedef Scalar_ Scalar; typedef std::complex Complex; inline diff --git a/unsupported/Eigen/src/FFT/ei_kissfft_impl.h b/unsupported/Eigen/src/FFT/ei_kissfft_impl.h index 430953aee..bcecb633e 100644 --- a/unsupported/Eigen/src/FFT/ei_kissfft_impl.h +++ b/unsupported/Eigen/src/FFT/ei_kissfft_impl.h @@ -14,10 +14,10 @@ namespace internal { // This FFT implementation was derived from kissfft http:sourceforge.net/projects/kissfft // Copyright 2003-2009 Mark Borgerding -template +template struct kiss_cpx_fft { - typedef _Scalar Scalar; + typedef Scalar_ Scalar; typedef std::complex Complex; std::vector m_twiddles; std::vector m_stageRadix; @@ -90,9 +90,9 @@ struct kiss_cpx_fft }while(n>1); } - template + template inline - void work( int stage,Complex * xout, const _Src * xin, size_t fstride,size_t in_stride) + void work( int stage,Complex * xout, const Src_ * xin, size_t fstride,size_t in_stride) { int p = m_stageRadix[stage]; int m = m_stageRemainder[stage]; @@ -292,10 +292,10 @@ struct kiss_cpx_fft } }; -template +template struct kissfft_impl { - typedef _Scalar Scalar; + typedef Scalar_ Scalar; typedef std::complex Complex; void clear() diff --git a/unsupported/Eigen/src/IterativeSolvers/DGMRES.h b/unsupported/Eigen/src/IterativeSolvers/DGMRES.h index 5ae011b75..9114b1634 100644 --- a/unsupported/Eigen/src/IterativeSolvers/DGMRES.h +++ b/unsupported/Eigen/src/IterativeSolvers/DGMRES.h @@ -14,17 +14,17 @@ namespace Eigen { -template< typename _MatrixType, - typename _Preconditioner = DiagonalPreconditioner > +template< typename MatrixType_, + typename Preconditioner_ = DiagonalPreconditioner > class DGMRES; namespace internal { -template< typename _MatrixType, typename _Preconditioner> -struct traits > +template< typename MatrixType_, typename Preconditioner_> +struct traits > { - typedef _MatrixType MatrixType; - typedef _Preconditioner Preconditioner; + typedef MatrixType_ MatrixType; + typedef Preconditioner_ Preconditioner; }; /** \brief Computes a permutation vector to have a sorted sequence @@ -68,8 +68,8 @@ void sortWithPermutation (VectorType& vec, IndexType& perm, typename IndexType:: * the IncompleteLUT for instance. The preconditioner is applied * at right of the matrix and the combination is multiplicative. * - * \tparam _MatrixType the type of the sparse matrix A, can be a dense or a sparse matrix. - * \tparam _Preconditioner the type of the preconditioner. Default is DiagonalPreconditioner + * \tparam MatrixType_ the type of the sparse matrix A, can be a dense or a sparse matrix. + * \tparam Preconditioner_ the type of the preconditioner. Default is DiagonalPreconditioner * Typical usage : * \code * SparseMatrix A; @@ -97,8 +97,8 @@ void sortWithPermutation (VectorType& vec, IndexType& perm, typename IndexType:: * */ -template< typename _MatrixType, typename _Preconditioner> -class DGMRES : public IterativeSolverBase > +template< typename MatrixType_, typename Preconditioner_> +class DGMRES : public IterativeSolverBase > { typedef IterativeSolverBase Base; using Base::matrix; @@ -110,11 +110,11 @@ class DGMRES : public IterativeSolverBase > public: using Base::_solve_impl; using Base::_solve_with_guess_impl; - typedef _MatrixType MatrixType; + typedef MatrixType_ MatrixType; typedef typename MatrixType::Scalar Scalar; typedef typename MatrixType::StorageIndex StorageIndex; typedef typename MatrixType::RealScalar RealScalar; - typedef _Preconditioner Preconditioner; + typedef Preconditioner_ Preconditioner; typedef Matrix DenseMatrix; typedef Matrix DenseRealMatrix; typedef Matrix DenseVector; @@ -223,9 +223,9 @@ class DGMRES : public IterativeSolverBase > * A right preconditioner is used combined with deflation. * */ -template< typename _MatrixType, typename _Preconditioner> +template< typename MatrixType_, typename Preconditioner_> template -void DGMRES<_MatrixType, _Preconditioner>::dgmres(const MatrixType& mat,const Rhs& rhs, Dest& x, +void DGMRES::dgmres(const MatrixType& mat,const Rhs& rhs, Dest& x, const Preconditioner& precond) const { const RealScalar considerAsZero = (std::numeric_limits::min)(); @@ -281,9 +281,9 @@ void DGMRES<_MatrixType, _Preconditioner>::dgmres(const MatrixType& mat,const Rh * \param normRhs The norm of the right hand side vector * \param nbIts The number of iterations */ -template< typename _MatrixType, typename _Preconditioner> +template< typename MatrixType_, typename Preconditioner_> template -Index DGMRES<_MatrixType, _Preconditioner>::dgmresCycle(const MatrixType& mat, const Preconditioner& precond, Dest& x, DenseVector& r0, RealScalar& beta, const RealScalar& normRhs, Index& nbIts) const +Index DGMRES::dgmresCycle(const MatrixType& mat, const Preconditioner& precond, Dest& x, DenseVector& r0, RealScalar& beta, const RealScalar& normRhs, Index& nbIts) const { //Initialization DenseVector g(m_restart+1); // Right hand side of the least square problem @@ -374,8 +374,8 @@ Index DGMRES<_MatrixType, _Preconditioner>::dgmresCycle(const MatrixType& mat, c } -template< typename _MatrixType, typename _Preconditioner> -void DGMRES<_MatrixType, _Preconditioner>::dgmresInitDeflation(Index& rows) const +template< typename MatrixType_, typename Preconditioner_> +void DGMRES::dgmresInitDeflation(Index& rows) const { m_U.resize(rows, m_maxNeig); m_MU.resize(rows, m_maxNeig); @@ -384,14 +384,14 @@ void DGMRES<_MatrixType, _Preconditioner>::dgmresInitDeflation(Index& rows) cons m_isDeflAllocated = true; } -template< typename _MatrixType, typename _Preconditioner> -inline typename DGMRES<_MatrixType, _Preconditioner>::ComplexVector DGMRES<_MatrixType, _Preconditioner>::schurValues(const ComplexSchur& schurofH) const +template< typename MatrixType_, typename Preconditioner_> +inline typename DGMRES::ComplexVector DGMRES::schurValues(const ComplexSchur& schurofH) const { return schurofH.matrixT().diagonal(); } -template< typename _MatrixType, typename _Preconditioner> -inline typename DGMRES<_MatrixType, _Preconditioner>::ComplexVector DGMRES<_MatrixType, _Preconditioner>::schurValues(const RealSchur& schurofH) const +template< typename MatrixType_, typename Preconditioner_> +inline typename DGMRES::ComplexVector DGMRES::schurValues(const RealSchur& schurofH) const { const DenseMatrix& T = schurofH.matrixT(); Index it = T.rows(); @@ -415,8 +415,8 @@ inline typename DGMRES<_MatrixType, _Preconditioner>::ComplexVector DGMRES<_Matr return eig; } -template< typename _MatrixType, typename _Preconditioner> -Index DGMRES<_MatrixType, _Preconditioner>::dgmresComputeDeflationData(const MatrixType& mat, const Preconditioner& precond, const Index& it, StorageIndex& neig) const +template< typename MatrixType_, typename Preconditioner_> +Index DGMRES::dgmresComputeDeflationData(const MatrixType& mat, const Preconditioner& precond, const Index& it, StorageIndex& neig) const { // First, find the Schur form of the Hessenberg matrix H typename internal::conditional::IsComplex, ComplexSchur, RealSchur >::type schurofH; @@ -498,9 +498,9 @@ Index DGMRES<_MatrixType, _Preconditioner>::dgmresComputeDeflationData(const Mat m_isDeflInitialized = true; return 0; } -template +template template -Index DGMRES<_MatrixType, _Preconditioner>::dgmresApplyDeflation(const RhsType &x, DestType &y) const +Index DGMRES::dgmresApplyDeflation(const RhsType &x, DestType &y) const { DenseVector x1 = m_U.leftCols(m_r).transpose() * x; y = x + m_U.leftCols(m_r) * ( m_lambdaN * m_luT.solve(x1) - x1); diff --git a/unsupported/Eigen/src/IterativeSolvers/GMRES.h b/unsupported/Eigen/src/IterativeSolvers/GMRES.h index ff912094f..4bd59044d 100644 --- a/unsupported/Eigen/src/IterativeSolvers/GMRES.h +++ b/unsupported/Eigen/src/IterativeSolvers/GMRES.h @@ -216,17 +216,17 @@ bool gmres(const MatrixType & mat, const Rhs & rhs, Dest & x, const Precondition } -template< typename _MatrixType, - typename _Preconditioner = DiagonalPreconditioner > +template< typename MatrixType_, + typename Preconditioner_ = DiagonalPreconditioner > class GMRES; namespace internal { -template< typename _MatrixType, typename _Preconditioner> -struct traits > +template< typename MatrixType_, typename Preconditioner_> +struct traits > { - typedef _MatrixType MatrixType; - typedef _Preconditioner Preconditioner; + typedef MatrixType_ MatrixType; + typedef Preconditioner_ Preconditioner; }; } @@ -237,8 +237,8 @@ struct traits > * This class allows to solve for A.x = b sparse linear problems using a generalized minimal * residual method. The vectors x and b can be either dense or sparse. * - * \tparam _MatrixType the type of the sparse matrix A, can be a dense or a sparse matrix. - * \tparam _Preconditioner the type of the preconditioner. Default is DiagonalPreconditioner + * \tparam MatrixType_ the type of the sparse matrix A, can be a dense or a sparse matrix. + * \tparam Preconditioner_ the type of the preconditioner. Default is DiagonalPreconditioner * * The maximal number of iterations and tolerance value can be controlled via the setMaxIterations() * and setTolerance() methods. The defaults are the size of the problem for the maximal number of iterations @@ -265,8 +265,8 @@ struct traits > * * \sa class SimplicialCholesky, DiagonalPreconditioner, IdentityPreconditioner */ -template< typename _MatrixType, typename _Preconditioner> -class GMRES : public IterativeSolverBase > +template< typename MatrixType_, typename Preconditioner_> +class GMRES : public IterativeSolverBase > { typedef IterativeSolverBase Base; using Base::matrix; @@ -280,10 +280,10 @@ private: public: using Base::_solve_impl; - typedef _MatrixType MatrixType; + typedef MatrixType_ MatrixType; typedef typename MatrixType::Scalar Scalar; typedef typename MatrixType::RealScalar RealScalar; - typedef _Preconditioner Preconditioner; + typedef Preconditioner_ Preconditioner; public: diff --git a/unsupported/Eigen/src/IterativeSolvers/IDRS.h b/unsupported/Eigen/src/IterativeSolvers/IDRS.h index 90d20fad4..5d6243997 100755 --- a/unsupported/Eigen/src/IterativeSolvers/IDRS.h +++ b/unsupported/Eigen/src/IterativeSolvers/IDRS.h @@ -271,17 +271,17 @@ namespace Eigen } // namespace internal - template > + template > class IDRS; namespace internal { - template - struct traits > + template + struct traits > { - typedef _MatrixType MatrixType; - typedef _Preconditioner Preconditioner; + typedef MatrixType_ MatrixType; + typedef Preconditioner_ Preconditioner; }; } // namespace internal @@ -305,8 +305,8 @@ namespace Eigen * and uses 7 vectors. GMRES terminates in at most N iterations, and uses I+3 vectors, with I the number of iterations. * Restarting GMRES limits the memory consumption, but destroys the finite termination property. * - * \tparam _MatrixType the type of the sparse matrix A, can be a dense or a sparse matrix. - * \tparam _Preconditioner the type of the preconditioner. Default is DiagonalPreconditioner + * \tparam MatrixType_ the type of the sparse matrix A, can be a dense or a sparse matrix. + * \tparam Preconditioner_ the type of the preconditioner. Default is DiagonalPreconditioner * * \implsparsesolverconcept * @@ -327,15 +327,15 @@ namespace Eigen * * \sa class SimplicialCholesky, DiagonalPreconditioner, IdentityPreconditioner */ - template - class IDRS : public IterativeSolverBase > + template + class IDRS : public IterativeSolverBase > { public: - typedef _MatrixType MatrixType; + typedef MatrixType_ MatrixType; typedef typename MatrixType::Scalar Scalar; typedef typename MatrixType::RealScalar RealScalar; - typedef _Preconditioner Preconditioner; + typedef Preconditioner_ Preconditioner; private: typedef IterativeSolverBase Base; diff --git a/unsupported/Eigen/src/IterativeSolvers/IncompleteLU.h b/unsupported/Eigen/src/IterativeSolvers/IncompleteLU.h index 7d08c3515..c528aa8ed 100644 --- a/unsupported/Eigen/src/IterativeSolvers/IncompleteLU.h +++ b/unsupported/Eigen/src/IterativeSolvers/IncompleteLU.h @@ -12,14 +12,14 @@ namespace Eigen { -template -class IncompleteLU : public SparseSolverBase > +template +class IncompleteLU : public SparseSolverBase > { protected: - typedef SparseSolverBase > Base; + typedef SparseSolverBase > Base; using Base::m_isInitialized; - typedef _Scalar Scalar; + typedef Scalar_ Scalar; typedef Matrix Vector; typedef typename Vector::Index Index; typedef SparseMatrix FactorType; diff --git a/unsupported/Eigen/src/IterativeSolvers/MINRES.h b/unsupported/Eigen/src/IterativeSolvers/MINRES.h index 5db454d24..f36c2c0fa 100644 --- a/unsupported/Eigen/src/IterativeSolvers/MINRES.h +++ b/unsupported/Eigen/src/IterativeSolvers/MINRES.h @@ -138,17 +138,17 @@ namespace Eigen { } - template< typename _MatrixType, int _UpLo=Lower, - typename _Preconditioner = IdentityPreconditioner> + template< typename MatrixType_, int UpLo_=Lower, + typename Preconditioner_ = IdentityPreconditioner> class MINRES; namespace internal { - template< typename _MatrixType, int _UpLo, typename _Preconditioner> - struct traits > + template< typename MatrixType_, int UpLo_, typename Preconditioner_> + struct traits > { - typedef _MatrixType MatrixType; - typedef _Preconditioner Preconditioner; + typedef MatrixType_ MatrixType; + typedef Preconditioner_ Preconditioner; }; } @@ -160,10 +160,10 @@ namespace Eigen { * of Paige and Saunders (1975). The sparse matrix A must be symmetric (possibly indefinite). * The vectors x and b can be either dense or sparse. * - * \tparam _MatrixType the type of the sparse matrix A, can be a dense or a sparse matrix. - * \tparam _UpLo the triangular part that will be used for the computations. It can be Lower, + * \tparam MatrixType_ the type of the sparse matrix A, can be a dense or a sparse matrix. + * \tparam UpLo_ the triangular part that will be used for the computations. It can be Lower, * Upper, or Lower|Upper in which the full matrix entries will be considered. Default is Lower. - * \tparam _Preconditioner the type of the preconditioner. Default is DiagonalPreconditioner + * \tparam Preconditioner_ the type of the preconditioner. Default is DiagonalPreconditioner * * The maximal number of iterations and tolerance value can be controlled via the setMaxIterations() * and setTolerance() methods. The defaults are the size of the problem for the maximal number of iterations @@ -191,8 +191,8 @@ namespace Eigen { * * \sa class ConjugateGradient, BiCGSTAB, SimplicialCholesky, DiagonalPreconditioner, IdentityPreconditioner */ - template< typename _MatrixType, int _UpLo, typename _Preconditioner> - class MINRES : public IterativeSolverBase > + template< typename MatrixType_, int UpLo_, typename Preconditioner_> + class MINRES : public IterativeSolverBase > { typedef IterativeSolverBase Base; @@ -203,12 +203,12 @@ namespace Eigen { using Base::m_isInitialized; public: using Base::_solve_impl; - typedef _MatrixType MatrixType; + typedef MatrixType_ MatrixType; typedef typename MatrixType::Scalar Scalar; typedef typename MatrixType::RealScalar RealScalar; - typedef _Preconditioner Preconditioner; + typedef Preconditioner_ Preconditioner; - enum {UpLo = _UpLo}; + enum {UpLo = UpLo_}; public: diff --git a/unsupported/Eigen/src/IterativeSolvers/Scaling.h b/unsupported/Eigen/src/IterativeSolvers/Scaling.h index 9b3eb53e0..848f57257 100644 --- a/unsupported/Eigen/src/IterativeSolvers/Scaling.h +++ b/unsupported/Eigen/src/IterativeSolvers/Scaling.h @@ -38,17 +38,17 @@ namespace Eigen { * x = scal.RightScaling().cwiseProduct(x); * \endcode * - * \tparam _MatrixType the type of the matrix. It should be a real square sparsematrix + * \tparam MatrixType_ the type of the matrix. It should be a real square sparsematrix * * References : D. Ruiz and B. Ucar, A Symmetry Preserving Algorithm for Matrix Scaling, INRIA Research report RR-7552 * * \sa \ref IncompleteLUT */ -template +template class IterScaling { public: - typedef _MatrixType MatrixType; + typedef MatrixType_ MatrixType; typedef typename MatrixType::Scalar Scalar; typedef typename MatrixType::Index Index; diff --git a/unsupported/Eigen/src/KroneckerProduct/KroneckerTensorProduct.h b/unsupported/Eigen/src/KroneckerProduct/KroneckerTensorProduct.h index 6a9b0be88..c14ca0c99 100644 --- a/unsupported/Eigen/src/KroneckerProduct/KroneckerTensorProduct.h +++ b/unsupported/Eigen/src/KroneckerProduct/KroneckerTensorProduct.h @@ -198,11 +198,11 @@ void KroneckerProductSparse::evalTo(Dest& dst) const namespace internal { -template -struct traits > +template +struct traits > { - typedef typename remove_all<_Lhs>::type Lhs; - typedef typename remove_all<_Rhs>::type Rhs; + typedef typename remove_all::type Lhs; + typedef typename remove_all::type Rhs; typedef typename ScalarBinaryOpTraits::ReturnType Scalar; typedef typename promote_index_type::type StorageIndex; @@ -216,12 +216,12 @@ struct traits > typedef Matrix ReturnType; }; -template -struct traits > +template +struct traits > { typedef MatrixXpr XprKind; - typedef typename remove_all<_Lhs>::type Lhs; - typedef typename remove_all<_Rhs>::type Rhs; + typedef typename remove_all::type Lhs; + typedef typename remove_all::type Rhs; typedef typename ScalarBinaryOpTraits::ReturnType Scalar; typedef typename cwise_promote_storage_type::StorageKind, typename traits::StorageKind, scalar_product_op >::ret StorageKind; typedef typename promote_index_type::type StorageIndex; diff --git a/unsupported/Eigen/src/LevenbergMarquardt/LMqrsolv.h b/unsupported/Eigen/src/LevenbergMarquardt/LMqrsolv.h index 123485817..bbf6ac1a9 100644 --- a/unsupported/Eigen/src/LevenbergMarquardt/LMqrsolv.h +++ b/unsupported/Eigen/src/LevenbergMarquardt/LMqrsolv.h @@ -98,9 +98,9 @@ void lmqrsolv( x = iPerm * wa; } -template +template void lmqrsolv( - SparseMatrix &s, + SparseMatrix &s, const PermutationMatrix &iPerm, const Matrix &diag, const Matrix &qtb, diff --git a/unsupported/Eigen/src/LevenbergMarquardt/LevenbergMarquardt.h b/unsupported/Eigen/src/LevenbergMarquardt/LevenbergMarquardt.h index 62561da1d..ac004f598 100644 --- a/unsupported/Eigen/src/LevenbergMarquardt/LevenbergMarquardt.h +++ b/unsupported/Eigen/src/LevenbergMarquardt/LevenbergMarquardt.h @@ -38,10 +38,10 @@ namespace LevenbergMarquardtSpace { }; } -template +template struct DenseFunctor { - typedef _Scalar Scalar; + typedef Scalar_ Scalar; enum { InputsAtCompileTime = NX, ValuesAtCompileTime = NY @@ -65,11 +65,11 @@ struct DenseFunctor // should be defined in derived classes }; -template +template struct SparseFunctor { - typedef _Scalar Scalar; - typedef _Index Index; + typedef Scalar_ Scalar; + typedef Index_ Index; typedef Matrix InputType; typedef Matrix ValueType; typedef SparseMatrix JacobianType; @@ -106,11 +106,11 @@ void lmpar2(const QRSolver &qr, const VectorType &diag, const VectorType &qtb, * Check wikipedia for more information. * http://en.wikipedia.org/wiki/Levenberg%E2%80%93Marquardt_algorithm */ -template +template class LevenbergMarquardt : internal::no_assignment_operator { public: - typedef _FunctorType FunctorType; + typedef FunctorType_ FunctorType; typedef typename FunctorType::QRSolver QRSolver; typedef typename FunctorType::JacobianType JacobianType; typedef typename JacobianType::Scalar Scalar; diff --git a/unsupported/Eigen/src/NumericalDiff/NumericalDiff.h b/unsupported/Eigen/src/NumericalDiff/NumericalDiff.h index ea5d8bc27..796d0bc7f 100644 --- a/unsupported/Eigen/src/NumericalDiff/NumericalDiff.h +++ b/unsupported/Eigen/src/NumericalDiff/NumericalDiff.h @@ -32,11 +32,11 @@ enum NumericalDiffMode { * * Currently only "Forward" and "Central" scheme are implemented. */ -template -class NumericalDiff : public _Functor +template +class NumericalDiff : public Functor_ { public: - typedef _Functor Functor; + typedef Functor_ Functor; typedef typename Functor::Scalar Scalar; typedef typename Functor::InputType InputType; typedef typename Functor::ValueType ValueType; diff --git a/unsupported/Eigen/src/Polynomials/Companion.h b/unsupported/Eigen/src/Polynomials/Companion.h index 59a15b098..3c9a1642f 100644 --- a/unsupported/Eigen/src/Polynomials/Companion.h +++ b/unsupported/Eigen/src/Polynomials/Companion.h @@ -29,18 +29,18 @@ struct decrement_if_fixed_size #endif -template< typename _Scalar, int _Deg > +template< typename Scalar_, int _Deg > class companion { public: - EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(_Scalar,_Deg==Dynamic ? Dynamic : _Deg) + EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(Scalar_,_Deg==Dynamic ? Dynamic : _Deg) enum { Deg = _Deg, Deg_1=decrement_if_fixed_size::ret }; - typedef _Scalar Scalar; + typedef Scalar_ Scalar; typedef typename NumTraits::Real RealScalar; typedef Matrix RightColumn; //typedef DiagonalMatrix< Scalar, Deg_1, Deg_1 > BottomLeftDiagonal; @@ -54,7 +54,7 @@ class companion typedef DenseIndex Index; public: - EIGEN_STRONG_INLINE const _Scalar operator()(Index row, Index col ) const + EIGEN_STRONG_INLINE const Scalar_ operator()(Index row, Index col ) const { if( m_bl_diag.rows() > col ) { @@ -130,9 +130,9 @@ class companion -template< typename _Scalar, int _Deg > +template< typename Scalar_, int _Deg > inline -bool companion<_Scalar,_Deg>::balanced( RealScalar colNorm, RealScalar rowNorm, +bool companion::balanced( RealScalar colNorm, RealScalar rowNorm, bool& isBalanced, RealScalar& colB, RealScalar& rowB ) { if( RealScalar(0) == colNorm || RealScalar(0) == rowNorm @@ -184,9 +184,9 @@ bool companion<_Scalar,_Deg>::balanced( RealScalar colNorm, RealScalar rowNorm, } } -template< typename _Scalar, int _Deg > +template< typename Scalar_, int _Deg > inline -bool companion<_Scalar,_Deg>::balancedR( RealScalar colNorm, RealScalar rowNorm, +bool companion::balancedR( RealScalar colNorm, RealScalar rowNorm, bool& isBalanced, RealScalar& colB, RealScalar& rowB ) { if( RealScalar(0) == colNorm || RealScalar(0) == rowNorm ){ return true; } @@ -197,7 +197,7 @@ bool companion<_Scalar,_Deg>::balancedR( RealScalar colNorm, RealScalar rowNorm, * of the row and column norm */ const RealScalar q = colNorm/rowNorm; - if( !isApprox( q, _Scalar(1) ) ) + if( !isApprox( q, Scalar_(1) ) ) { rowB = sqrt( colNorm/rowNorm ); colB = RealScalar(1)/rowB; @@ -211,8 +211,8 @@ bool companion<_Scalar,_Deg>::balancedR( RealScalar colNorm, RealScalar rowNorm, } -template< typename _Scalar, int _Deg > -void companion<_Scalar,_Deg>::balance() +template< typename Scalar_, int _Deg > +void companion::balance() { using std::abs; EIGEN_STATIC_ASSERT( Deg == Dynamic || 1 < Deg, YOU_MADE_A_PROGRAMMING_MISTAKE ); diff --git a/unsupported/Eigen/src/Polynomials/PolynomialSolver.h b/unsupported/Eigen/src/Polynomials/PolynomialSolver.h index 5e0ecbb43..a9e821229 100644 --- a/unsupported/Eigen/src/Polynomials/PolynomialSolver.h +++ b/unsupported/Eigen/src/Polynomials/PolynomialSolver.h @@ -25,13 +25,13 @@ namespace Eigen { * It stores the set of roots as a vector of complexes. * */ -template< typename _Scalar, int _Deg > +template< typename Scalar_, int _Deg > class PolynomialSolverBase { public: - EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(_Scalar,_Deg==Dynamic ? Dynamic : _Deg) + EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(Scalar_,_Deg==Dynamic ? Dynamic : _Deg) - typedef _Scalar Scalar; + typedef Scalar_ Scalar; typedef typename NumTraits::Real RealScalar; typedef std::complex RootType; typedef Matrix RootsType; @@ -59,7 +59,7 @@ class PolynomialSolverBase * i.e. the real part of the complex roots that have an imaginary part which * absolute value is smaller than absImaginaryThreshold. * absImaginaryThreshold takes the dummy_precision associated - * with the _Scalar template parameter of the PolynomialSolver class as the default value. + * with the Scalar_ template parameter of the PolynomialSolver class as the default value. * * \param[out] bi_seq : the back insertion sequence (stl concept) * \param[in] absImaginaryThreshold : the maximum bound of the imaginary part of a complex @@ -200,7 +200,7 @@ class PolynomialSolverBase * A real root is defined as the real part of a complex root with absolute imaginary * part smallest than absImaginaryThreshold. * absImaginaryThreshold takes the dummy_precision associated - * with the _Scalar template parameter of the PolynomialSolver class as the default value. + * with the Scalar_ template parameter of the PolynomialSolver class as the default value. * If no real root is found the boolean hasArealRoot is set to false and the real part of * the root with smallest absolute imaginary part is returned instead. * @@ -223,7 +223,7 @@ class PolynomialSolverBase * A real root is defined as the real part of a complex root with absolute imaginary * part smallest than absImaginaryThreshold. * absImaginaryThreshold takes the dummy_precision associated - * with the _Scalar template parameter of the PolynomialSolver class as the default value. + * with the Scalar_ template parameter of the PolynomialSolver class as the default value. * If no real root is found the boolean hasArealRoot is set to false and the real part of * the root with smallest absolute imaginary part is returned instead. * @@ -246,7 +246,7 @@ class PolynomialSolverBase * A real root is defined as the real part of a complex root with absolute imaginary * part smallest than absImaginaryThreshold. * absImaginaryThreshold takes the dummy_precision associated - * with the _Scalar template parameter of the PolynomialSolver class as the default value. + * with the Scalar_ template parameter of the PolynomialSolver class as the default value. * If no real root is found the boolean hasArealRoot is set to false and the real part of * the root with smallest absolute imaginary part is returned instead. * @@ -269,7 +269,7 @@ class PolynomialSolverBase * A real root is defined as the real part of a complex root with absolute imaginary * part smallest than absImaginaryThreshold. * absImaginaryThreshold takes the dummy_precision associated - * with the _Scalar template parameter of the PolynomialSolver class as the default value. + * with the Scalar_ template parameter of the PolynomialSolver class as the default value. * If no real root is found the boolean hasArealRoot is set to false and the real part of * the root with smallest absolute imaginary part is returned instead. * @@ -306,7 +306,7 @@ class PolynomialSolverBase * * Computes the complex roots of a real polynomial. * - * \param _Scalar the scalar type, i.e., the type of the polynomial coefficients + * \param Scalar_ the scalar type, i.e., the type of the polynomial coefficients * \param _Deg the degree of the polynomial, can be a compile time value or Dynamic. * Notice that the number of polynomial coefficients is _Deg+1. * @@ -327,13 +327,13 @@ class PolynomialSolverBase * However, almost always, correct accuracy is reached even in these cases for 64bit * (double) floating types and small polynomial degree (<20). */ -template -class PolynomialSolver : public PolynomialSolverBase<_Scalar,_Deg> +template +class PolynomialSolver : public PolynomialSolverBase { public: - EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(_Scalar,_Deg==Dynamic ? Dynamic : _Deg) + EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(Scalar_,_Deg==Dynamic ? Dynamic : _Deg) - typedef PolynomialSolverBase<_Scalar,_Deg> PS_Base; + typedef PolynomialSolverBase PS_Base; EIGEN_POLYNOMIAL_SOLVER_BASE_INHERITED_TYPES( PS_Base ) typedef Matrix CompanionMatrixType; @@ -395,11 +395,11 @@ class PolynomialSolver : public PolynomialSolverBase<_Scalar,_Deg> }; -template< typename _Scalar > -class PolynomialSolver<_Scalar,1> : public PolynomialSolverBase<_Scalar,1> +template< typename Scalar_ > +class PolynomialSolver : public PolynomialSolverBase { public: - typedef PolynomialSolverBase<_Scalar,1> PS_Base; + typedef PolynomialSolverBase PS_Base; EIGEN_POLYNOMIAL_SOLVER_BASE_INHERITED_TYPES( PS_Base ) public: diff --git a/unsupported/Eigen/src/Skyline/SkylineInplaceLU.h b/unsupported/Eigen/src/Skyline/SkylineInplaceLU.h index 6d0370d5b..7dce840ed 100644 --- a/unsupported/Eigen/src/Skyline/SkylineInplaceLU.h +++ b/unsupported/Eigen/src/Skyline/SkylineInplaceLU.h @@ -116,7 +116,7 @@ protected: * using the default algorithm. */ template -//template +//template void SkylineInplaceLU::compute() { const size_t rows = m_lu.rows(); const size_t cols = m_lu.cols(); diff --git a/unsupported/Eigen/src/Skyline/SkylineMatrix.h b/unsupported/Eigen/src/Skyline/SkylineMatrix.h index 664a97f60..060843f3d 100644 --- a/unsupported/Eigen/src/Skyline/SkylineMatrix.h +++ b/unsupported/Eigen/src/Skyline/SkylineMatrix.h @@ -24,16 +24,16 @@ namespace Eigen { * This class implements a skyline matrix using the very uncommon storage * scheme. * - * \param _Scalar the scalar type, i.e. the type of the coefficients - * \param _Options Union of bit flags controlling the storage scheme. Currently the only possibility + * \param Scalar_ the scalar type, i.e. the type of the coefficients + * \param Options_ Union of bit flags controlling the storage scheme. Currently the only possibility * is RowMajor. The default is 0 which means column-major. * * */ namespace internal { -template -struct traits > { - typedef _Scalar Scalar; +template +struct traits > { + typedef Scalar_ Scalar; typedef Sparse StorageKind; enum { @@ -41,15 +41,15 @@ struct traits > { ColsAtCompileTime = Dynamic, MaxRowsAtCompileTime = Dynamic, MaxColsAtCompileTime = Dynamic, - Flags = SkylineBit | _Options, + Flags = SkylineBit | Options_, CoeffReadCost = NumTraits::ReadCost, }; }; } -template +template class SkylineMatrix -: public SkylineMatrixBase > { +: public SkylineMatrixBase > { public: EIGEN_SKYLINE_GENERIC_PUBLIC_INTERFACE(SkylineMatrix) EIGEN_SKYLINE_INHERIT_ASSIGNMENT_OPERATOR(SkylineMatrix, +=) @@ -731,15 +731,15 @@ public: Scalar sum() const; }; -template -class SkylineMatrix::InnerUpperIterator { +template +class SkylineMatrix::InnerUpperIterator { public: InnerUpperIterator(const SkylineMatrix& mat, Index outer) : m_matrix(mat), m_outer(outer), - m_id(_Options == RowMajor ? mat.m_colStartIndex[outer] : mat.m_rowStartIndex[outer] + 1), + m_id(Options_ == RowMajor ? mat.m_colStartIndex[outer] : mat.m_rowStartIndex[outer] + 1), m_start(m_id), - m_end(_Options == RowMajor ? mat.m_colStartIndex[outer + 1] : mat.m_rowStartIndex[outer + 1] + 1) { + m_end(Options_ == RowMajor ? mat.m_colStartIndex[outer + 1] : mat.m_rowStartIndex[outer + 1] + 1) { } inline InnerUpperIterator & operator++() { @@ -793,16 +793,16 @@ protected: const Index m_end; }; -template -class SkylineMatrix::InnerLowerIterator { +template +class SkylineMatrix::InnerLowerIterator { public: InnerLowerIterator(const SkylineMatrix& mat, Index outer) : m_matrix(mat), m_outer(outer), - m_id(_Options == RowMajor ? mat.m_rowStartIndex[outer] : mat.m_colStartIndex[outer] + 1), + m_id(Options_ == RowMajor ? mat.m_rowStartIndex[outer] : mat.m_colStartIndex[outer] + 1), m_start(m_id), - m_end(_Options == RowMajor ? mat.m_rowStartIndex[outer + 1] : mat.m_colStartIndex[outer + 1] + 1) { + m_end(Options_ == RowMajor ? mat.m_rowStartIndex[outer + 1] : mat.m_colStartIndex[outer + 1] + 1) { } inline InnerLowerIterator & operator++() { diff --git a/unsupported/Eigen/src/Skyline/SkylineProduct.h b/unsupported/Eigen/src/Skyline/SkylineProduct.h index d9eb814c1..5da66af9c 100644 --- a/unsupported/Eigen/src/Skyline/SkylineProduct.h +++ b/unsupported/Eigen/src/Skyline/SkylineProduct.h @@ -120,17 +120,17 @@ protected: template EIGEN_DONT_INLINE void skyline_row_major_time_dense_product(const Lhs& lhs, const Rhs& rhs, Dest& dst) { - typedef typename remove_all::type _Lhs; - typedef typename remove_all::type _Rhs; + typedef typename remove_all::type Lhs_; + typedef typename remove_all::type Rhs_; typedef typename traits::Scalar Scalar; enum { - LhsIsRowMajor = (_Lhs::Flags & RowMajorBit) == RowMajorBit, - LhsIsSelfAdjoint = (_Lhs::Flags & SelfAdjointBit) == SelfAdjointBit, + LhsIsRowMajor = (Lhs_::Flags & RowMajorBit) == RowMajorBit, + LhsIsSelfAdjoint = (Lhs_::Flags & SelfAdjointBit) == SelfAdjointBit, ProcessFirstHalf = LhsIsSelfAdjoint - && (((_Lhs::Flags & (UpperTriangularBit | LowerTriangularBit)) == 0) - || ((_Lhs::Flags & UpperTriangularBit) && !LhsIsRowMajor) - || ((_Lhs::Flags & LowerTriangularBit) && LhsIsRowMajor)), + && (((Lhs_::Flags & (UpperTriangularBit | LowerTriangularBit)) == 0) + || ((Lhs_::Flags & UpperTriangularBit) && !LhsIsRowMajor) + || ((Lhs_::Flags & LowerTriangularBit) && LhsIsRowMajor)), ProcessSecondHalf = LhsIsSelfAdjoint && (!ProcessFirstHalf) }; @@ -142,7 +142,7 @@ EIGEN_DONT_INLINE void skyline_row_major_time_dense_product(const Lhs& lhs, cons } //Use matrix lower triangular part for (Index row = 0; row < lhs.rows(); row++) { - typename _Lhs::InnerLowerIterator lIt(lhs, row); + typename Lhs_::InnerLowerIterator lIt(lhs, row); const Index stop = lIt.col() + lIt.size(); for (Index col = 0; col < rhs.cols(); col++) { @@ -162,7 +162,7 @@ EIGEN_DONT_INLINE void skyline_row_major_time_dense_product(const Lhs& lhs, cons //Use matrix upper triangular part for (Index lhscol = 0; lhscol < lhs.cols(); lhscol++) { - typename _Lhs::InnerUpperIterator uIt(lhs, lhscol); + typename Lhs_::InnerUpperIterator uIt(lhs, lhscol); const Index stop = uIt.size() + uIt.row(); for (Index rhscol = 0; rhscol < rhs.cols(); rhscol++) { @@ -183,17 +183,17 @@ EIGEN_DONT_INLINE void skyline_row_major_time_dense_product(const Lhs& lhs, cons template EIGEN_DONT_INLINE void skyline_col_major_time_dense_product(const Lhs& lhs, const Rhs& rhs, Dest& dst) { - typedef typename remove_all::type _Lhs; - typedef typename remove_all::type _Rhs; + typedef typename remove_all::type Lhs_; + typedef typename remove_all::type Rhs_; typedef typename traits::Scalar Scalar; enum { - LhsIsRowMajor = (_Lhs::Flags & RowMajorBit) == RowMajorBit, - LhsIsSelfAdjoint = (_Lhs::Flags & SelfAdjointBit) == SelfAdjointBit, + LhsIsRowMajor = (Lhs_::Flags & RowMajorBit) == RowMajorBit, + LhsIsSelfAdjoint = (Lhs_::Flags & SelfAdjointBit) == SelfAdjointBit, ProcessFirstHalf = LhsIsSelfAdjoint - && (((_Lhs::Flags & (UpperTriangularBit | LowerTriangularBit)) == 0) - || ((_Lhs::Flags & UpperTriangularBit) && !LhsIsRowMajor) - || ((_Lhs::Flags & LowerTriangularBit) && LhsIsRowMajor)), + && (((Lhs_::Flags & (UpperTriangularBit | LowerTriangularBit)) == 0) + || ((Lhs_::Flags & UpperTriangularBit) && !LhsIsRowMajor) + || ((Lhs_::Flags & LowerTriangularBit) && LhsIsRowMajor)), ProcessSecondHalf = LhsIsSelfAdjoint && (!ProcessFirstHalf) }; @@ -206,7 +206,7 @@ EIGEN_DONT_INLINE void skyline_col_major_time_dense_product(const Lhs& lhs, cons //Use matrix upper triangular part for (Index row = 0; row < lhs.rows(); row++) { - typename _Lhs::InnerUpperIterator uIt(lhs, row); + typename Lhs_::InnerUpperIterator uIt(lhs, row); const Index stop = uIt.col() + uIt.size(); for (Index col = 0; col < rhs.cols(); col++) { @@ -227,7 +227,7 @@ EIGEN_DONT_INLINE void skyline_col_major_time_dense_product(const Lhs& lhs, cons //Use matrix lower triangular part for (Index lhscol = 0; lhscol < lhs.cols(); lhscol++) { - typename _Lhs::InnerLowerIterator lIt(lhs, lhscol); + typename Lhs_::InnerLowerIterator lIt(lhs, lhscol); const Index stop = lIt.size() + lIt.row(); for (Index rhscol = 0; rhscol < rhs.cols(); rhscol++) { @@ -272,7 +272,7 @@ struct skyline_product_selector { // template // template // Derived & MatrixBase::lazyAssign(const SkylineProduct& product) { -// typedef typename internal::remove_all::type _Lhs; +// typedef typename internal::remove_all::type Lhs_; // internal::skyline_product_selector::type, // typename internal::remove_all::type, // Derived>::run(product.lhs(), product.rhs(), derived()); diff --git a/unsupported/Eigen/src/Skyline/SkylineUtil.h b/unsupported/Eigen/src/Skyline/SkylineUtil.h index 75eb612f4..4446d7322 100644 --- a/unsupported/Eigen/src/Skyline/SkylineUtil.h +++ b/unsupported/Eigen/src/Skyline/SkylineUtil.h @@ -61,10 +61,10 @@ EIGEN_STRONG_INLINE Derived& operator Op(const Other& scalar) \ _EIGEN_SKYLINE_GENERIC_PUBLIC_INTERFACE(Derived, Eigen::SkylineMatrixBase) template class SkylineMatrixBase; -template class SkylineMatrix; -template class DynamicSkylineMatrix; -template class SkylineVector; -template class MappedSkylineMatrix; +template class SkylineMatrix; +template class DynamicSkylineMatrix; +template class SkylineVector; +template class MappedSkylineMatrix; namespace internal { @@ -73,13 +73,13 @@ template class eval { - typedef typename traits::Scalar _Scalar; + typedef typename traits::Scalar Scalar_; enum { _Flags = traits::Flags }; public: - typedef SkylineMatrix<_Scalar, _Flags> type; + typedef SkylineMatrix type; }; } // end namespace internal diff --git a/unsupported/Eigen/src/SparseExtra/BlockOfDynamicSparseMatrix.h b/unsupported/Eigen/src/SparseExtra/BlockOfDynamicSparseMatrix.h index e9ec746e3..912d01bd8 100644 --- a/unsupported/Eigen/src/SparseExtra/BlockOfDynamicSparseMatrix.h +++ b/unsupported/Eigen/src/SparseExtra/BlockOfDynamicSparseMatrix.h @@ -14,7 +14,7 @@ namespace Eigen { #if 0 -// NOTE Have to be reimplemented as a specialization of BlockImpl< DynamicSparseMatrix<_Scalar, _Options, _Index>, ... > +// NOTE Have to be reimplemented as a specialization of BlockImpl< DynamicSparseMatrix, ... > // See SparseBlock.h for an example @@ -22,11 +22,11 @@ namespace Eigen { * specialisation for DynamicSparseMatrix ***************************************************************************/ -template -class SparseInnerVectorSet, Size> - : public SparseMatrixBase, Size> > +template +class SparseInnerVectorSet, Size> + : public SparseMatrixBase, Size> > { - typedef DynamicSparseMatrix<_Scalar, _Options, _Index> MatrixType; + typedef DynamicSparseMatrix MatrixType; public: enum { IsRowMajor = internal::traits::IsRowMajor }; diff --git a/unsupported/Eigen/src/SparseExtra/BlockSparseMatrix.h b/unsupported/Eigen/src/SparseExtra/BlockSparseMatrix.h index 536a0c320..6b4f8a13f 100644 --- a/unsupported/Eigen/src/SparseExtra/BlockSparseMatrix.h +++ b/unsupported/Eigen/src/SparseExtra/BlockSparseMatrix.h @@ -46,21 +46,21 @@ namespace Eigen { * It is obviously required to describe the block layout beforehand by calling either * setBlockSize() for fixed-size blocks or setBlockLayout for variable-size blocks. * - * \tparam _Scalar The Scalar type + * \tparam Scalar_ The Scalar type * \tparam _BlockAtCompileTime The block layout option. It takes the following values * Dynamic : block size known at runtime * a numeric number : fixed-size block known at compile time */ -template class BlockSparseMatrix; +template class BlockSparseMatrix; template class BlockSparseMatrixView; namespace internal { -template -struct traits > +template +struct traits > { - typedef _Scalar Scalar; - typedef _Index Index; + typedef Scalar_ Scalar; + typedef Index_ Index; typedef Sparse StorageKind; // FIXME Where is it used ?? typedef MatrixXpr XprKind; enum { @@ -69,7 +69,7 @@ struct traits > MaxRowsAtCompileTime = Dynamic, MaxColsAtCompileTime = Dynamic, BlockSize = _BlockAtCompileTime, - Flags = _Options | NestByRefBit | LvalueBit, + Flags = Options_ | NestByRefBit | LvalueBit, CoeffReadCost = NumTraits::ReadCost, SupportedAccessPatterns = InnerRandomAccessPattern }; @@ -280,17 +280,17 @@ class BlockSparseTimeDenseProduct BlockSparseTimeDenseProduct& operator=(const BlockSparseTimeDenseProduct&); }; -template -class BlockSparseMatrix : public SparseMatrixBase > +template +class BlockSparseMatrix : public SparseMatrixBase > { public: - typedef _Scalar Scalar; + typedef Scalar_ Scalar; typedef typename NumTraits::Real RealScalar; - typedef _StorageIndex StorageIndex; - typedef typename internal::ref_selector >::type Nested; + typedef StorageIndex_ StorageIndex; + typedef typename internal::ref_selector >::type Nested; enum { - Options = _Options, + Options = Options_, Flags = Options, BlockSize=_BlockAtCompileTime, RowsAtCompileTime = Dynamic, @@ -968,13 +968,13 @@ class BlockSparseMatrix : public SparseMatrixBase -class BlockSparseMatrix<_Scalar, _BlockAtCompileTime, _Options, _StorageIndex>::BlockInnerIterator +template +class BlockSparseMatrix::BlockInnerIterator { public: enum{ - Flags = _Options + Flags = Options_ }; BlockInnerIterator(const BlockSparseMatrix& mat, const Index outer) @@ -1010,14 +1010,14 @@ class BlockSparseMatrix<_Scalar, _BlockAtCompileTime, _Options, _StorageIndex>:: inline operator bool() const { return (m_id < m_end); } protected: - const BlockSparseMatrix<_Scalar, _BlockAtCompileTime, _Options, StorageIndex>& m_mat; + const BlockSparseMatrix& m_mat; const Index m_outer; Index m_id; Index m_end; }; -template -class BlockSparseMatrix<_Scalar, _BlockAtCompileTime, _Options, _StorageIndex>::InnerIterator +template +class BlockSparseMatrix::InnerIterator { public: InnerIterator(const BlockSparseMatrix& mat, Index outer) diff --git a/unsupported/Eigen/src/SparseExtra/DynamicSparseMatrix.h b/unsupported/Eigen/src/SparseExtra/DynamicSparseMatrix.h index 42c99e467..c32cf7c1c 100644 --- a/unsupported/Eigen/src/SparseExtra/DynamicSparseMatrix.h +++ b/unsupported/Eigen/src/SparseExtra/DynamicSparseMatrix.h @@ -18,7 +18,7 @@ namespace Eigen { * * \brief A sparse matrix class designed for matrix assembly purpose * - * \param _Scalar the scalar type, i.e. the type of the coefficients + * \param Scalar_ the scalar type, i.e. the type of the coefficients * * Unlike SparseMatrix, this class provides a much higher degree of flexibility. In particular, it allows * random read/write accesses in log(rho*outer_size) where \c rho is the probability that a coefficient is @@ -33,11 +33,11 @@ namespace Eigen { */ namespace internal { -template -struct traits > +template +struct traits > { - typedef _Scalar Scalar; - typedef _StorageIndex StorageIndex; + typedef Scalar_ Scalar; + typedef StorageIndex_ StorageIndex; typedef Sparse StorageKind; typedef MatrixXpr XprKind; enum { @@ -45,16 +45,16 @@ struct traits > ColsAtCompileTime = Dynamic, MaxRowsAtCompileTime = Dynamic, MaxColsAtCompileTime = Dynamic, - Flags = _Options | NestByRefBit | LvalueBit, + Flags = Options_ | NestByRefBit | LvalueBit, CoeffReadCost = NumTraits::ReadCost, SupportedAccessPatterns = OuterRandomAccessPattern }; }; } -template +template class DynamicSparseMatrix - : public SparseMatrixBase > + : public SparseMatrixBase > { typedef SparseMatrixBase Base; using Base::convert_index; @@ -67,7 +67,7 @@ template using Base::IsRowMajor; using Base::operator=; enum { - Options = _Options + Options = Options_ }; protected: @@ -334,10 +334,10 @@ template # endif }; -template -class DynamicSparseMatrix::InnerIterator : public SparseVector::InnerIterator +template +class DynamicSparseMatrix::InnerIterator : public SparseVector::InnerIterator { - typedef typename SparseVector::InnerIterator Base; + typedef typename SparseVector::InnerIterator Base; public: InnerIterator(const DynamicSparseMatrix& mat, Index outer) : Base(mat.m_data[outer]), m_outer(outer) @@ -351,10 +351,10 @@ class DynamicSparseMatrix::InnerIterator : public const Index m_outer; }; -template -class DynamicSparseMatrix::ReverseInnerIterator : public SparseVector::ReverseInnerIterator +template +class DynamicSparseMatrix::ReverseInnerIterator : public SparseVector::ReverseInnerIterator { - typedef typename SparseVector::ReverseInnerIterator Base; + typedef typename SparseVector::ReverseInnerIterator Base; public: ReverseInnerIterator(const DynamicSparseMatrix& mat, Index outer) : Base(mat.m_data[outer]), m_outer(outer) @@ -370,17 +370,17 @@ class DynamicSparseMatrix::ReverseInnerIterator : namespace internal { -template -struct evaluator > - : evaluator_base > +template +struct evaluator > + : evaluator_base > { - typedef _Scalar Scalar; - typedef DynamicSparseMatrix<_Scalar,_Options,_StorageIndex> SparseMatrixType; + typedef Scalar_ Scalar; + typedef DynamicSparseMatrix SparseMatrixType; typedef typename SparseMatrixType::InnerIterator InnerIterator; typedef typename SparseMatrixType::ReverseInnerIterator ReverseInnerIterator; enum { - CoeffReadCost = NumTraits<_Scalar>::ReadCost, + CoeffReadCost = NumTraits::ReadCost, Flags = SparseMatrixType::Flags }; diff --git a/unsupported/Eigen/src/Splines/Spline.h b/unsupported/Eigen/src/Splines/Spline.h index 79edd52ce..e61ee30a5 100644 --- a/unsupported/Eigen/src/Splines/Spline.h +++ b/unsupported/Eigen/src/Splines/Spline.h @@ -25,18 +25,18 @@ namespace Eigen * C(u) & = \sum_{i=0}^{n}N_{i,p}(u)P_i * \f} * - * \tparam _Scalar The underlying data type (typically float or double) - * \tparam _Dim The curve dimension (e.g. 2 or 3) + * \tparam Scalar_ The underlying data type (typically float or double) + * \tparam Dim_ The curve dimension (e.g. 2 or 3) * \tparam _Degree Per default set to Dynamic; could be set to the actual desired * degree for optimization purposes (would result in stack allocation * of several temporary variables). **/ - template + template class Spline { public: - typedef _Scalar Scalar; /*!< The spline curve's scalar type. */ - enum { Dimension = _Dim /*!< The spline curve's dimension. */ }; + typedef Scalar_ Scalar; /*!< The spline curve's scalar type. */ + enum { Dimension = Dim_ /*!< The spline curve's dimension. */ }; enum { Degree = _Degree /*!< The spline curve's degree. */ }; /** \brief The point type the spline is representing. */ @@ -223,18 +223,18 @@ namespace Eigen template static void BasisFunctionDerivativesImpl( - const typename Spline<_Scalar, _Dim, _Degree>::Scalar u, + const typename Spline::Scalar u, const DenseIndex order, const DenseIndex p, - const typename Spline<_Scalar, _Dim, _Degree>::KnotVectorType& U, + const typename Spline::KnotVectorType& U, DerivativeType& N_); }; - template - DenseIndex Spline<_Scalar, _Dim, _Degree>::Span( - typename SplineTraits< Spline<_Scalar, _Dim, _Degree> >::Scalar u, + template + DenseIndex Spline::Span( + typename SplineTraits< Spline >::Scalar u, DenseIndex degree, - const typename SplineTraits< Spline<_Scalar, _Dim, _Degree> >::KnotVectorType& knots) + const typename SplineTraits< Spline >::KnotVectorType& knots) { // Piegl & Tiller, "The NURBS Book", A2.1 (p. 68) if (u <= knots(0)) return degree; @@ -242,12 +242,12 @@ namespace Eigen return static_cast( std::distance(knots.data(), pos) - 1 ); } - template - typename Spline<_Scalar, _Dim, _Degree>::BasisVectorType - Spline<_Scalar, _Dim, _Degree>::BasisFunctions( - typename Spline<_Scalar, _Dim, _Degree>::Scalar u, + template + typename Spline::BasisVectorType + Spline::BasisFunctions( + typename Spline::Scalar u, DenseIndex degree, - const typename Spline<_Scalar, _Dim, _Degree>::KnotVectorType& knots) + const typename Spline::KnotVectorType& knots) { const DenseIndex p = degree; const DenseIndex i = Spline::Span(u, degree, knots); @@ -276,8 +276,8 @@ namespace Eigen return N; } - template - DenseIndex Spline<_Scalar, _Dim, _Degree>::degree() const + template + DenseIndex Spline::degree() const { if (_Degree == Dynamic) return m_knots.size() - m_ctrls.cols() - 1; @@ -285,14 +285,14 @@ namespace Eigen return _Degree; } - template - DenseIndex Spline<_Scalar, _Dim, _Degree>::span(Scalar u) const + template + DenseIndex Spline::span(Scalar u) const { return Spline::Span(u, degree(), knots()); } - template - typename Spline<_Scalar, _Dim, _Degree>::PointType Spline<_Scalar, _Dim, _Degree>::operator()(Scalar u) const + template + typename Spline::PointType Spline::operator()(Scalar u) const { enum { Order = SplineTraits::OrderAtCompileTime }; @@ -337,28 +337,28 @@ namespace Eigen } } - template - typename SplineTraits< Spline<_Scalar, _Dim, _Degree> >::DerivativeType - Spline<_Scalar, _Dim, _Degree>::derivatives(Scalar u, DenseIndex order) const + template + typename SplineTraits< Spline >::DerivativeType + Spline::derivatives(Scalar u, DenseIndex order) const { typename SplineTraits< Spline >::DerivativeType res; derivativesImpl(*this, u, order, res); return res; } - template + template template - typename SplineTraits< Spline<_Scalar, _Dim, _Degree>, DerivativeOrder >::DerivativeType - Spline<_Scalar, _Dim, _Degree>::derivatives(Scalar u, DenseIndex order) const + typename SplineTraits< Spline, DerivativeOrder >::DerivativeType + Spline::derivatives(Scalar u, DenseIndex order) const { typename SplineTraits< Spline, DerivativeOrder >::DerivativeType res; derivativesImpl(*this, u, order, res); return res; } - template - typename SplineTraits< Spline<_Scalar, _Dim, _Degree> >::BasisVectorType - Spline<_Scalar, _Dim, _Degree>::basisFunctions(Scalar u) const + template + typename SplineTraits< Spline >::BasisVectorType + Spline::basisFunctions(Scalar u) const { return Spline::BasisFunctions(u, degree(), knots()); } @@ -366,16 +366,16 @@ namespace Eigen /* --------------------------------------------------------------------------------------------- */ - template + template template - void Spline<_Scalar, _Dim, _Degree>::BasisFunctionDerivativesImpl( - const typename Spline<_Scalar, _Dim, _Degree>::Scalar u, + void Spline::BasisFunctionDerivativesImpl( + const typename Spline::Scalar u, const DenseIndex order, const DenseIndex p, - const typename Spline<_Scalar, _Dim, _Degree>::KnotVectorType& U, + const typename Spline::KnotVectorType& U, DerivativeType& N_) { - typedef Spline<_Scalar, _Dim, _Degree> SplineType; + typedef Spline SplineType; enum { Order = SplineTraits::OrderAtCompileTime }; const DenseIndex span = SplineType::Span(u, p, U); @@ -471,32 +471,32 @@ namespace Eigen } } - template - typename SplineTraits< Spline<_Scalar, _Dim, _Degree> >::BasisDerivativeType - Spline<_Scalar, _Dim, _Degree>::basisFunctionDerivatives(Scalar u, DenseIndex order) const + template + typename SplineTraits< Spline >::BasisDerivativeType + Spline::basisFunctionDerivatives(Scalar u, DenseIndex order) const { - typename SplineTraits >::BasisDerivativeType der; + typename SplineTraits >::BasisDerivativeType der; BasisFunctionDerivativesImpl(u, order, degree(), knots(), der); return der; } - template + template template - typename SplineTraits< Spline<_Scalar, _Dim, _Degree>, DerivativeOrder >::BasisDerivativeType - Spline<_Scalar, _Dim, _Degree>::basisFunctionDerivatives(Scalar u, DenseIndex order) const + typename SplineTraits< Spline, DerivativeOrder >::BasisDerivativeType + Spline::basisFunctionDerivatives(Scalar u, DenseIndex order) const { - typename SplineTraits< Spline<_Scalar, _Dim, _Degree>, DerivativeOrder >::BasisDerivativeType der; + typename SplineTraits< Spline, DerivativeOrder >::BasisDerivativeType der; BasisFunctionDerivativesImpl(u, order, degree(), knots(), der); return der; } - template - typename SplineTraits >::BasisDerivativeType - Spline<_Scalar, _Dim, _Degree>::BasisFunctionDerivatives( - const typename Spline<_Scalar, _Dim, _Degree>::Scalar u, + template + typename SplineTraits >::BasisDerivativeType + Spline::BasisFunctionDerivatives( + const typename Spline::Scalar u, const DenseIndex order, const DenseIndex degree, - const typename Spline<_Scalar, _Dim, _Degree>::KnotVectorType& knots) + const typename Spline::KnotVectorType& knots) { typename SplineTraits::BasisDerivativeType der; BasisFunctionDerivativesImpl(u, order, degree, knots, der); diff --git a/unsupported/Eigen/src/Splines/SplineFwd.h b/unsupported/Eigen/src/Splines/SplineFwd.h index 00d6b4921..35b31f3f3 100644 --- a/unsupported/Eigen/src/Splines/SplineFwd.h +++ b/unsupported/Eigen/src/Splines/SplineFwd.h @@ -22,11 +22,11 @@ namespace Eigen * \ingroup Splines_Module * \brief Compile-time attributes of the Spline class for Dynamic degree. **/ - template - struct SplineTraits< Spline<_Scalar, _Dim, _Degree>, Dynamic > + template + struct SplineTraits< Spline, Dynamic > { - typedef _Scalar Scalar; /*!< The spline curve's scalar type. */ - enum { Dimension = _Dim /*!< The spline curve's dimension. */ }; + typedef Scalar_ Scalar; /*!< The spline curve's scalar type. */ + enum { Dimension = Dim_ /*!< The spline curve's dimension. */ }; enum { Degree = _Degree /*!< The spline curve's degree. */ }; enum { OrderAtCompileTime = _Degree==Dynamic ? Dynamic : _Degree+1 /*!< The spline curve's order at compile-time. */ }; @@ -62,19 +62,19 @@ namespace Eigen * * The traits class inherits all attributes from the SplineTraits of Dynamic degree. **/ - template < typename _Scalar, int _Dim, int _Degree, int _DerivativeOrder > - struct SplineTraits< Spline<_Scalar, _Dim, _Degree>, _DerivativeOrder > : public SplineTraits< Spline<_Scalar, _Dim, _Degree> > + template < typename Scalar_, int Dim_, int _Degree, int _DerivativeOrder > + struct SplineTraits< Spline, _DerivativeOrder > : public SplineTraits< Spline > { enum { OrderAtCompileTime = _Degree==Dynamic ? Dynamic : _Degree+1 /*!< The spline curve's order at compile-time. */ }; enum { NumOfDerivativesAtCompileTime = _DerivativeOrder==Dynamic ? Dynamic : _DerivativeOrder+1 /*!< The number of derivatives defined for the current spline. */ }; - enum { DerivativeMemoryLayout = _Dim==1 ? RowMajor : ColMajor /*!< The derivative type's memory layout. */ }; + enum { DerivativeMemoryLayout = Dim_==1 ? RowMajor : ColMajor /*!< The derivative type's memory layout. */ }; /** \brief The data type used to store the values of the basis function derivatives. */ - typedef Array<_Scalar,Dynamic,Dynamic,RowMajor,NumOfDerivativesAtCompileTime,OrderAtCompileTime> BasisDerivativeType; + typedef Array BasisDerivativeType; /** \brief The data type used to store the spline's derivative values. */ - typedef Array<_Scalar,_Dim,Dynamic,DerivativeMemoryLayout,_Dim,NumOfDerivativesAtCompileTime> DerivativeType; + typedef Array DerivativeType; }; /** \brief 2D float B-spline with dynamic degree. */ diff --git a/unsupported/test/NonLinearOptimization.cpp b/unsupported/test/NonLinearOptimization.cpp index c667b7247..f1c13841d 100644 --- a/unsupported/test/NonLinearOptimization.cpp +++ b/unsupported/test/NonLinearOptimization.cpp @@ -113,10 +113,10 @@ void testChkder() } // Generic functor -template +template struct Functor { - typedef _Scalar Scalar; + typedef Scalar_ Scalar; enum { InputsAtCompileTime = NX, ValuesAtCompileTime = NY diff --git a/unsupported/test/NumericalDiff.cpp b/unsupported/test/NumericalDiff.cpp index 6d836413b..96e7f192d 100644 --- a/unsupported/test/NumericalDiff.cpp +++ b/unsupported/test/NumericalDiff.cpp @@ -9,10 +9,10 @@ #include // Generic functor -template +template struct Functor { - typedef _Scalar Scalar; + typedef Scalar_ Scalar; enum { InputsAtCompileTime = NX, ValuesAtCompileTime = NY diff --git a/unsupported/test/autodiff.cpp b/unsupported/test/autodiff.cpp index 2cea56ba5..fded7b8b8 100644 --- a/unsupported/test/autodiff.cpp +++ b/unsupported/test/autodiff.cpp @@ -29,10 +29,10 @@ EIGEN_DONT_INLINE typename Vector::Scalar foo(const Vector& p) return (p-Vector(Scalar(-1),Scalar(1.))).norm() + (p.array() * p.array()).sum() + p.dot(p); } -template +template struct TestFunc1 { - typedef _Scalar Scalar; + typedef Scalar_ Scalar; enum { InputsAtCompileTime = NX, ValuesAtCompileTime = NY diff --git a/unsupported/test/forward_adolc.cpp b/unsupported/test/forward_adolc.cpp index 14a909d3b..27d09dd7e 100644 --- a/unsupported/test/forward_adolc.cpp +++ b/unsupported/test/forward_adolc.cpp @@ -20,10 +20,10 @@ EIGEN_DONT_INLINE typename Vector::Scalar foo(const Vector& p) return (p-Vector(Scalar(-1),Scalar(1.))).norm() + (p.array().sqrt().abs() * p.array().sin()).sum() + p.dot(p); } -template +template struct TestFunc1 { - typedef _Scalar Scalar; + typedef Scalar_ Scalar; enum { InputsAtCompileTime = NX, ValuesAtCompileTime = NY diff --git a/unsupported/test/polynomialsolver.cpp b/unsupported/test/polynomialsolver.cpp index 4ff9bda5a..4cf4bc2b2 100644 --- a/unsupported/test/polynomialsolver.cpp +++ b/unsupported/test/polynomialsolver.cpp @@ -179,13 +179,13 @@ void evalSolverSugarFunction( const POLYNOMIAL& pols, const ROOTS& roots, const } -template +template void polynomialsolver(int deg) { - typedef typename NumTraits<_Scalar>::Real RealScalar; + typedef typename NumTraits::Real RealScalar; typedef internal::increment_if_fixed_size<_Deg> Dim; - typedef Matrix<_Scalar,Dim::ret,1> PolynomialType; - typedef Matrix<_Scalar,_Deg,1> EvalRootsType; + typedef Matrix PolynomialType; + typedef Matrix EvalRootsType; typedef Matrix RealRootsType; cout << "Standard cases" << endl; @@ -193,7 +193,7 @@ void polynomialsolver(int deg) evalSolver<_Deg,PolynomialType>( pols ); cout << "Hard cases" << endl; - _Scalar multipleRoot = internal::random<_Scalar>(); + Scalar_ multipleRoot = internal::random(); EvalRootsType allRoots = EvalRootsType::Constant(deg,multipleRoot); roots_to_monicPolynomial( allRoots, pols ); evalSolver<_Deg,PolynomialType>( pols ); diff --git a/unsupported/test/polynomialutils.cpp b/unsupported/test/polynomialutils.cpp index 8ff451996..fb86913d7 100644 --- a/unsupported/test/polynomialutils.cpp +++ b/unsupported/test/polynomialutils.cpp @@ -25,12 +25,12 @@ struct increment_if_fixed_size } } -template +template void realRoots_to_monicPolynomial_test(int deg) { typedef internal::increment_if_fixed_size<_Deg> Dim; - typedef Matrix<_Scalar,Dim::ret,1> PolynomialType; - typedef Matrix<_Scalar,_Deg,1> EvalRootsType; + typedef Matrix PolynomialType; + typedef Matrix EvalRootsType; PolynomialType pols(deg+1); EvalRootsType roots = EvalRootsType::Random(deg); @@ -40,43 +40,43 @@ void realRoots_to_monicPolynomial_test(int deg) for( int i=0; i() ); + bool evalToZero = evr.isZero( test_precision() ); if( !evalToZero ){ cerr << evr.transpose() << endl; } VERIFY( evalToZero ); } -template void realRoots_to_monicPolynomial_scalar() +template void realRoots_to_monicPolynomial_scalar() { - CALL_SUBTEST_2( (realRoots_to_monicPolynomial_test<_Scalar,2>(2)) ); - CALL_SUBTEST_3( (realRoots_to_monicPolynomial_test<_Scalar,3>(3)) ); - CALL_SUBTEST_4( (realRoots_to_monicPolynomial_test<_Scalar,4>(4)) ); - CALL_SUBTEST_5( (realRoots_to_monicPolynomial_test<_Scalar,5>(5)) ); - CALL_SUBTEST_6( (realRoots_to_monicPolynomial_test<_Scalar,6>(6)) ); - CALL_SUBTEST_7( (realRoots_to_monicPolynomial_test<_Scalar,7>(7)) ); - CALL_SUBTEST_8( (realRoots_to_monicPolynomial_test<_Scalar,17>(17)) ); + CALL_SUBTEST_2( (realRoots_to_monicPolynomial_test(2)) ); + CALL_SUBTEST_3( (realRoots_to_monicPolynomial_test(3)) ); + CALL_SUBTEST_4( (realRoots_to_monicPolynomial_test(4)) ); + CALL_SUBTEST_5( (realRoots_to_monicPolynomial_test(5)) ); + CALL_SUBTEST_6( (realRoots_to_monicPolynomial_test(6)) ); + CALL_SUBTEST_7( (realRoots_to_monicPolynomial_test(7)) ); + CALL_SUBTEST_8( (realRoots_to_monicPolynomial_test(17)) ); - CALL_SUBTEST_9( (realRoots_to_monicPolynomial_test<_Scalar,Dynamic>( + CALL_SUBTEST_9( (realRoots_to_monicPolynomial_test( internal::random(18,26) )) ); } -template +template void CauchyBounds(int deg) { typedef internal::increment_if_fixed_size<_Deg> Dim; - typedef Matrix<_Scalar,Dim::ret,1> PolynomialType; - typedef Matrix<_Scalar,_Deg,1> EvalRootsType; + typedef Matrix PolynomialType; + typedef Matrix EvalRootsType; PolynomialType pols(deg+1); EvalRootsType roots = EvalRootsType::Random(deg); roots_to_monicPolynomial( roots, pols ); - _Scalar M = cauchy_max_bound( pols ); - _Scalar m = cauchy_min_bound( pols ); - _Scalar Max = roots.array().abs().maxCoeff(); - _Scalar min = roots.array().abs().minCoeff(); + Scalar_ M = cauchy_max_bound( pols ); + Scalar_ m = cauchy_min_bound( pols ); + Scalar_ Max = roots.array().abs().maxCoeff(); + Scalar_ min = roots.array().abs().minCoeff(); bool eval = (M >= Max) && (m <= min); if( !eval ) { @@ -87,17 +87,17 @@ void CauchyBounds(int deg) VERIFY( eval ); } -template void CauchyBounds_scalar() +template void CauchyBounds_scalar() { - CALL_SUBTEST_2( (CauchyBounds<_Scalar,2>(2)) ); - CALL_SUBTEST_3( (CauchyBounds<_Scalar,3>(3)) ); - CALL_SUBTEST_4( (CauchyBounds<_Scalar,4>(4)) ); - CALL_SUBTEST_5( (CauchyBounds<_Scalar,5>(5)) ); - CALL_SUBTEST_6( (CauchyBounds<_Scalar,6>(6)) ); - CALL_SUBTEST_7( (CauchyBounds<_Scalar,7>(7)) ); - CALL_SUBTEST_8( (CauchyBounds<_Scalar,17>(17)) ); + CALL_SUBTEST_2( (CauchyBounds(2)) ); + CALL_SUBTEST_3( (CauchyBounds(3)) ); + CALL_SUBTEST_4( (CauchyBounds(4)) ); + CALL_SUBTEST_5( (CauchyBounds(5)) ); + CALL_SUBTEST_6( (CauchyBounds(6)) ); + CALL_SUBTEST_7( (CauchyBounds(7)) ); + CALL_SUBTEST_8( (CauchyBounds(17)) ); - CALL_SUBTEST_9( (CauchyBounds<_Scalar,Dynamic>( + CALL_SUBTEST_9( (CauchyBounds( internal::random(18,26) )) ); }