diff options
author | Gael Guennebaud <g.gael@free.fr> | 2013-04-10 22:27:35 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2013-04-10 22:27:35 +0200 |
commit | 899c0c2b6c723b4b6e324fd8c157e53039c54f67 (patch) | |
tree | 3ec9470328f8597a03f3ac8a33d3c12c04c0a326 | |
parent | 7e04d7db029866eab0ff7c2a752edb2905bff61f (diff) |
Clean source code and unit tests with respect to -Wunused-local-typedefs
60 files changed, 3 insertions, 114 deletions
diff --git a/Eigen/src/CholmodSupport/CholmodSupport.h b/Eigen/src/CholmodSupport/CholmodSupport.h index 26abaf48f..42d289ad8 100644 --- a/Eigen/src/CholmodSupport/CholmodSupport.h +++ b/Eigen/src/CholmodSupport/CholmodSupport.h @@ -51,7 +51,6 @@ void cholmod_configure_matrix(CholmodType& mat) template<typename _Scalar, int _Options, typename _Index> cholmod_sparse viewAsCholmod(SparseMatrix<_Scalar,_Options,_Index>& mat) { - typedef SparseMatrix<_Scalar,_Options,_Index> MatrixType; cholmod_sparse res; res.nzmax = mat.nonZeros(); res.nrow = mat.rows();; diff --git a/Eigen/src/Core/AssignEvaluator.h b/Eigen/src/Core/AssignEvaluator.h index f095067e7..8d835b2f6 100644 --- a/Eigen/src/Core/AssignEvaluator.h +++ b/Eigen/src/Core/AssignEvaluator.h @@ -596,7 +596,6 @@ struct copy_using_evaluator_impl<DstXprType, SrcXprType, AllAtOnceTraversal, NoU { typedef typename evaluator<DstXprType>::type DstEvaluatorType; typedef typename evaluator<SrcXprType>::type SrcEvaluatorType; - typedef typename DstXprType::Index Index; DstEvaluatorType dstEvaluator(dst); SrcEvaluatorType srcEvaluator(src); diff --git a/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h b/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h index be7134072..5c3763909 100644 --- a/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h +++ b/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h @@ -238,7 +238,6 @@ struct general_product_to_triangular_selector<MatrixType,ProductType,UpLo,false> { static void run(MatrixType& mat, const ProductType& prod, const typename MatrixType::Scalar& alpha) { - typedef typename MatrixType::Scalar Scalar; typedef typename MatrixType::Index Index; typedef typename internal::remove_all<typename ProductType::LhsNested>::type Lhs; diff --git a/Eigen/src/Core/products/SelfadjointMatrixVector.h b/Eigen/src/Core/products/SelfadjointMatrixVector.h index 7c9e3fc98..f70f4894c 100644 --- a/Eigen/src/Core/products/SelfadjointMatrixVector.h +++ b/Eigen/src/Core/products/SelfadjointMatrixVector.h @@ -44,7 +44,6 @@ EIGEN_DONT_INLINE void selfadjoint_matrix_vector_product<Scalar,Index,StorageOrd Scalar alpha) { typedef typename packet_traits<Scalar>::type Packet; - typedef typename NumTraits<Scalar>::Real RealScalar; const Index PacketSize = sizeof(Packet)/sizeof(Scalar); enum { diff --git a/Eigen/src/Core/util/Memory.h b/Eigen/src/Core/util/Memory.h index e1a160d2d..3ca666fd9 100644 --- a/Eigen/src/Core/util/Memory.h +++ b/Eigen/src/Core/util/Memory.h @@ -457,7 +457,6 @@ template<typename T, bool Align> inline void conditional_aligned_delete_auto(T * template<typename Scalar, typename Index> static inline Index first_aligned(const Scalar* array, Index size) { - typedef typename packet_traits<Scalar>::type Packet; enum { PacketSize = packet_traits<Scalar>::size, PacketAlignedMask = PacketSize-1 }; diff --git a/Eigen/src/Eigenvalues/ComplexSchur.h b/Eigen/src/Eigenvalues/ComplexSchur.h index 57ce23e42..62b57ff66 100644 --- a/Eigen/src/Eigenvalues/ComplexSchur.h +++ b/Eigen/src/Eigenvalues/ComplexSchur.h @@ -364,7 +364,6 @@ struct complex_schur_reduce_to_hessenberg<MatrixType, false> static void run(ComplexSchur<MatrixType>& _this, const MatrixType& matrix, bool computeU) { typedef typename ComplexSchur<MatrixType>::ComplexScalar ComplexScalar; - typedef typename ComplexSchur<MatrixType>::ComplexMatrixType ComplexMatrixType; // Note: m_hess is over RealScalar; m_matT and m_matU is over ComplexScalar _this.m_hess.compute(matrix); diff --git a/Eigen/src/Eigenvalues/Tridiagonalization.h b/Eigen/src/Eigenvalues/Tridiagonalization.h index 5118874cd..e8408761d 100644 --- a/Eigen/src/Eigenvalues/Tridiagonalization.h +++ b/Eigen/src/Eigenvalues/Tridiagonalization.h @@ -426,8 +426,6 @@ struct tridiagonalization_inplace_selector; template<typename MatrixType, typename DiagonalType, typename SubDiagonalType> void tridiagonalization_inplace(MatrixType& mat, DiagonalType& diag, SubDiagonalType& subdiag, bool extractQ) { - typedef typename MatrixType::Index Index; - //Index n = mat.rows(); eigen_assert(mat.cols()==mat.rows() && diag.size()==mat.rows() && subdiag.size()==mat.rows()-1); tridiagonalization_inplace_selector<MatrixType>::run(mat, diag, subdiag, extractQ); } diff --git a/Eigen/src/OrderingMethods/Amd.h b/Eigen/src/OrderingMethods/Amd.h index 2ef6aa64c..41b4fd7e3 100644 --- a/Eigen/src/OrderingMethods/Amd.h +++ b/Eigen/src/OrderingMethods/Amd.h @@ -91,7 +91,6 @@ template<typename Scalar, typename Index> void minimum_degree_ordering(SparseMatrix<Scalar,ColMajor,Index>& C, PermutationMatrix<Dynamic,Dynamic,Index>& perm) { using std::sqrt; - typedef SparseMatrix<Scalar,ColMajor,Index> CCS; int d, dk, dext, lemax = 0, e, elenk, eln, i, j, k, k1, k2, k3, jlast, ln, dense, nzmax, mindeg = 0, nvi, nvj, nvk, mark, wnvi, diff --git a/Eigen/src/QR/HouseholderQR.h b/Eigen/src/QR/HouseholderQR.h index 9db64e219..0314d5259 100644 --- a/Eigen/src/QR/HouseholderQR.h +++ b/Eigen/src/QR/HouseholderQR.h @@ -241,7 +241,6 @@ void householder_qr_inplace_blocked(MatrixQR& mat, HCoeffs& hCoeffs, { typedef typename MatrixQR::Index Index; typedef typename MatrixQR::Scalar Scalar; - typedef typename MatrixQR::RealScalar RealScalar; typedef Block<MatrixQR,Dynamic,Dynamic> BlockType; Index rows = mat.rows(); diff --git a/Eigen/src/SparseCore/SparseMatrix.h b/Eigen/src/SparseCore/SparseMatrix.h index 748d2fadb..dc57f77fc 100644 --- a/Eigen/src/SparseCore/SparseMatrix.h +++ b/Eigen/src/SparseCore/SparseMatrix.h @@ -909,7 +909,6 @@ void set_from_triplets(const InputIterator& begin, const InputIterator& end, Spa EIGEN_UNUSED_VARIABLE(Options); enum { IsRowMajor = SparseMatrixType::IsRowMajor }; typedef typename SparseMatrixType::Scalar Scalar; - typedef typename SparseMatrixType::Index Index; SparseMatrix<Scalar,IsRowMajor?ColMajor:RowMajor> trMat(mat.rows(),mat.cols()); // pass 1: count the nnz per inner-vector diff --git a/Eigen/src/SparseCore/SparseSelfAdjointView.h b/Eigen/src/SparseCore/SparseSelfAdjointView.h index c10853791..9630b60f5 100644 --- a/Eigen/src/SparseCore/SparseSelfAdjointView.h +++ b/Eigen/src/SparseCore/SparseSelfAdjointView.h @@ -213,7 +213,6 @@ class SparseSelfAdjointTimeDenseProduct // TODO use alpha eigen_assert(alpha==Scalar(1) && "alpha != 1 is not implemented yet, sorry"); typedef typename internal::remove_all<Lhs>::type _Lhs; - typedef typename internal::remove_all<Rhs>::type _Rhs; typedef typename _Lhs::InnerIterator LhsInnerIterator; enum { LhsIsRowMajor = (_Lhs::Flags&RowMajorBit)==RowMajorBit, diff --git a/test/array.cpp b/test/array.cpp index c1538c108..ceb00fa05 100644 --- a/test/array.cpp +++ b/test/array.cpp @@ -13,7 +13,6 @@ template<typename ArrayType> void array(const ArrayType& m) { typedef typename ArrayType::Index Index; typedef typename ArrayType::Scalar Scalar; - typedef typename NumTraits<Scalar>::Real RealScalar; typedef Array<Scalar, ArrayType::RowsAtCompileTime, 1> ColVectorType; typedef Array<Scalar, 1, ArrayType::ColsAtCompileTime> RowVectorType; @@ -90,7 +89,6 @@ template<typename ArrayType> void comparisons(const ArrayType& m) typedef typename ArrayType::Index Index; typedef typename ArrayType::Scalar Scalar; typedef typename NumTraits<Scalar>::Real RealScalar; - typedef Array<Scalar, ArrayType::RowsAtCompileTime, 1> VectorType; Index rows = m.rows(); Index cols = m.cols(); diff --git a/test/array_for_matrix.cpp b/test/array_for_matrix.cpp index d832832e6..99cda1ffe 100644 --- a/test/array_for_matrix.cpp +++ b/test/array_for_matrix.cpp @@ -13,7 +13,6 @@ template<typename MatrixType> void array_for_matrix(const MatrixType& m) { typedef typename MatrixType::Index Index; typedef typename MatrixType::Scalar Scalar; - typedef typename NumTraits<Scalar>::Real RealScalar; typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> ColVectorType; typedef Matrix<Scalar, 1, MatrixType::ColsAtCompileTime> RowVectorType; @@ -77,7 +76,6 @@ template<typename MatrixType> void comparisons(const MatrixType& m) typedef typename MatrixType::Index Index; typedef typename MatrixType::Scalar Scalar; typedef typename NumTraits<Scalar>::Real RealScalar; - typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType; Index rows = m.rows(); Index cols = m.cols(); diff --git a/test/array_replicate.cpp b/test/array_replicate.cpp index 94da7425b..f412d1aed 100644 --- a/test/array_replicate.cpp +++ b/test/array_replicate.cpp @@ -16,7 +16,6 @@ template<typename MatrixType> void replicate(const MatrixType& m) */ typedef typename MatrixType::Index Index; typedef typename MatrixType::Scalar Scalar; - typedef typename NumTraits<Scalar>::Real RealScalar; typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType; typedef Matrix<Scalar, Dynamic, Dynamic> MatrixX; typedef Matrix<Scalar, Dynamic, 1> VectorX; diff --git a/test/cholesky.cpp b/test/cholesky.cpp index 49c79f9c8..ca7ecb1f4 100644 --- a/test/cholesky.cpp +++ b/test/cholesky.cpp @@ -68,7 +68,6 @@ template<typename MatrixType> void cholesky(const MatrixType& m) Index cols = m.cols(); typedef typename MatrixType::Scalar Scalar; - typedef typename NumTraits<Scalar>::Real RealScalar; typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime> SquareMatrixType; typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType; diff --git a/test/cwiseop.cpp b/test/cwiseop.cpp index d171fe279..247fa2a09 100644 --- a/test/cwiseop.cpp +++ b/test/cwiseop.cpp @@ -60,7 +60,6 @@ template<typename MatrixType> typename Eigen::internal::enable_if<NumTraits<typename MatrixType::Scalar>::IsInteger,typename MatrixType::Scalar>::type cwiseops_real_only(MatrixType& , MatrixType& , MatrixType& , MatrixType& ) { - typedef typename MatrixType::Scalar Scalar; return 0; } @@ -68,7 +67,6 @@ template<typename MatrixType> void cwiseops(const MatrixType& m) { typedef typename MatrixType::Index Index; typedef typename MatrixType::Scalar Scalar; - typedef typename NumTraits<Scalar>::Real RealScalar; typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType; Index rows = m.rows(); diff --git a/test/diagonal.cpp b/test/diagonal.cpp index bcf54fd3c..53814a588 100644 --- a/test/diagonal.cpp +++ b/test/diagonal.cpp @@ -13,9 +13,6 @@ template<typename MatrixType> void diagonal(const MatrixType& m) { typedef typename MatrixType::Index Index; typedef typename MatrixType::Scalar Scalar; - typedef typename MatrixType::RealScalar RealScalar; - typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType; - typedef Matrix<Scalar, 1, MatrixType::ColsAtCompileTime> RowVectorType; Index rows = m.rows(); Index cols = m.cols(); diff --git a/test/diagonalmatrices.cpp b/test/diagonalmatrices.cpp index 7e9c80d7b..149f1db2f 100644 --- a/test/diagonalmatrices.cpp +++ b/test/diagonalmatrices.cpp @@ -13,7 +13,6 @@ template<typename MatrixType> void diagonalmatrices(const MatrixType& m) { typedef typename MatrixType::Index Index; typedef typename MatrixType::Scalar Scalar; - typedef typename MatrixType::RealScalar RealScalar; enum { Rows = MatrixType::RowsAtCompileTime, Cols = MatrixType::ColsAtCompileTime }; typedef Matrix<Scalar, Rows, 1> VectorType; typedef Matrix<Scalar, 1, Cols> RowVectorType; diff --git a/test/eigensolver_complex.cpp b/test/eigensolver_complex.cpp index aef125739..817fbf2c2 100644 --- a/test/eigensolver_complex.cpp +++ b/test/eigensolver_complex.cpp @@ -41,9 +41,6 @@ template<typename MatrixType> void eigensolver(const MatrixType& m) typedef typename MatrixType::Scalar Scalar; typedef typename NumTraits<Scalar>::Real RealScalar; - typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType; - typedef Matrix<RealScalar, MatrixType::RowsAtCompileTime, 1> RealVectorType; - typedef typename std::complex<typename NumTraits<typename MatrixType::Scalar>::Real> Complex; MatrixType a = MatrixType::Random(rows,cols); MatrixType symmA = a.adjoint() * a; diff --git a/test/eigensolver_generalized_real.cpp b/test/eigensolver_generalized_real.cpp index e3edbb772..b8775871d 100644 --- a/test/eigensolver_generalized_real.cpp +++ b/test/eigensolver_generalized_real.cpp @@ -21,10 +21,7 @@ template<typename MatrixType> void generalized_eigensolver_real(const MatrixType Index cols = m.cols(); typedef typename MatrixType::Scalar Scalar; - typedef typename NumTraits<Scalar>::Real RealScalar; typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType; - typedef Matrix<RealScalar, MatrixType::RowsAtCompileTime, 1> RealVectorType; - typedef typename std::complex<typename NumTraits<typename MatrixType::Scalar>::Real> Complex; MatrixType a = MatrixType::Random(rows,cols); MatrixType b = MatrixType::Random(rows,cols); diff --git a/test/eigensolver_generic.cpp b/test/eigensolver_generic.cpp index ef499a989..a8bbf9007 100644 --- a/test/eigensolver_generic.cpp +++ b/test/eigensolver_generic.cpp @@ -23,7 +23,6 @@ template<typename MatrixType> void eigensolver(const MatrixType& m) typedef typename MatrixType::Scalar Scalar; typedef typename NumTraits<Scalar>::Real RealScalar; - typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType; typedef Matrix<RealScalar, MatrixType::RowsAtCompileTime, 1> RealVectorType; typedef typename std::complex<typename NumTraits<typename MatrixType::Scalar>::Real> Complex; diff --git a/test/eigensolver_selfadjoint.cpp b/test/eigensolver_selfadjoint.cpp index 02dbdb429..55b7eea8d 100644 --- a/test/eigensolver_selfadjoint.cpp +++ b/test/eigensolver_selfadjoint.cpp @@ -23,9 +23,6 @@ template<typename MatrixType> void selfadjointeigensolver(const MatrixType& m) typedef typename MatrixType::Scalar Scalar; typedef typename NumTraits<Scalar>::Real RealScalar; - typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType; - typedef Matrix<RealScalar, MatrixType::RowsAtCompileTime, 1> RealVectorType; - typedef typename std::complex<typename NumTraits<typename MatrixType::Scalar>::Real> Complex; RealScalar largerEps = 10*test_precision<RealScalar>(); diff --git a/test/geo_alignedbox.cpp b/test/geo_alignedbox.cpp index 4a51fc71e..e9fbfddf1 100644 --- a/test/geo_alignedbox.cpp +++ b/test/geo_alignedbox.cpp @@ -71,7 +71,6 @@ void alignedboxCastTests(const BoxType& _box) // casting typedef typename BoxType::Index Index; typedef typename BoxType::Scalar Scalar; - typedef typename NumTraits<Scalar>::Real RealScalar; typedef Matrix<Scalar, BoxType::AmbientDimAtCompileTime, 1> VectorType; const Index dim = _box.dim(); diff --git a/test/geo_hyperplane.cpp b/test/geo_hyperplane.cpp index 2845ba95d..f26fc1329 100644 --- a/test/geo_hyperplane.cpp +++ b/test/geo_hyperplane.cpp @@ -22,7 +22,6 @@ template<typename HyperplaneType> void hyperplane(const HyperplaneType& _plane) const Index dim = _plane.dim(); enum { Options = HyperplaneType::Options }; typedef typename HyperplaneType::Scalar Scalar; - typedef typename NumTraits<Scalar>::Real RealScalar; typedef Matrix<Scalar, HyperplaneType::AmbientDimAtCompileTime, 1> VectorType; typedef Matrix<Scalar, HyperplaneType::AmbientDimAtCompileTime, HyperplaneType::AmbientDimAtCompileTime> MatrixType; diff --git a/test/geo_parametrizedline.cpp b/test/geo_parametrizedline.cpp index 7b2e34abe..f0462d40a 100644 --- a/test/geo_parametrizedline.cpp +++ b/test/geo_parametrizedline.cpp @@ -24,8 +24,6 @@ template<typename LineType> void parametrizedline(const LineType& _line) typedef typename LineType::Scalar Scalar; typedef typename NumTraits<Scalar>::Real RealScalar; typedef Matrix<Scalar, LineType::AmbientDimAtCompileTime, 1> VectorType; - typedef Matrix<Scalar, LineType::AmbientDimAtCompileTime, - LineType::AmbientDimAtCompileTime> MatrixType; typedef Hyperplane<Scalar,LineType::AmbientDimAtCompileTime> HyperplaneType; VectorType p0 = VectorType::Random(dim); diff --git a/test/geo_quaternion.cpp b/test/geo_quaternion.cpp index 568a5f582..06b3af7c1 100644 --- a/test/geo_quaternion.cpp +++ b/test/geo_quaternion.cpp @@ -25,7 +25,6 @@ template<typename QuatType> void check_slerp(const QuatType& q0, const QuatType& { using std::abs; typedef typename QuatType::Scalar Scalar; - typedef Matrix<Scalar,3,1> VectorType; typedef AngleAxis<Scalar> AA; Scalar largeEps = test_precision<Scalar>(); @@ -49,7 +48,6 @@ template<typename Scalar, int Options> void quaternion(void) Quaternion.h */ using std::abs; - typedef Matrix<Scalar,3,3> Matrix3; typedef Matrix<Scalar,3,1> Vector3; typedef Matrix<Scalar,4,1> Vector4; typedef Quaternion<Scalar,Options> Quaternionx; diff --git a/test/geo_transformations.cpp b/test/geo_transformations.cpp index 89b09e5d4..35ae67ebe 100644 --- a/test/geo_transformations.cpp +++ b/test/geo_transformations.cpp @@ -17,22 +17,11 @@ template<typename Scalar, int Mode, int Options> void non_projective_only() /* this test covers the following files: Cross.h Quaternion.h, Transform.cpp */ - typedef Matrix<Scalar,2,2> Matrix2; - typedef Matrix<Scalar,3,3> Matrix3; - typedef Matrix<Scalar,4,4> Matrix4; - typedef Matrix<Scalar,2,1> Vector2; typedef Matrix<Scalar,3,1> Vector3; - typedef Matrix<Scalar,4,1> Vector4; typedef Quaternion<Scalar> Quaternionx; typedef AngleAxis<Scalar> AngleAxisx; - typedef Transform<Scalar,2,Mode,Options> Transform2; typedef Transform<Scalar,3,Mode,Options> Transform3; - typedef Transform<Scalar,2,Isometry,Options> Isometry2; - typedef Transform<Scalar,3,Isometry,Options> Isometry3; - typedef typename Transform3::MatrixType MatrixType; - typedef DiagonalMatrix<Scalar,2> AlignedScaling2; typedef DiagonalMatrix<Scalar,3> AlignedScaling3; - typedef Translation<Scalar,2> Translation2; typedef Translation<Scalar,3> Translation3; Vector3 v0 = Vector3::Random(), @@ -90,7 +79,6 @@ template<typename Scalar, int Mode, int Options> void transformations() */ using std::cos; using std::abs; - typedef Matrix<Scalar,2,2> Matrix2; typedef Matrix<Scalar,3,3> Matrix3; typedef Matrix<Scalar,4,4> Matrix4; typedef Matrix<Scalar,2,1> Vector2; @@ -100,10 +88,7 @@ template<typename Scalar, int Mode, int Options> void transformations() typedef AngleAxis<Scalar> AngleAxisx; typedef Transform<Scalar,2,Mode,Options> Transform2; typedef Transform<Scalar,3,Mode,Options> Transform3; - typedef Transform<Scalar,2,Isometry,Options> Isometry2; - typedef Transform<Scalar,3,Isometry,Options> Isometry3; typedef typename Transform3::MatrixType MatrixType; - typedef DiagonalMatrix<Scalar,2> AlignedScaling2; typedef DiagonalMatrix<Scalar,3> AlignedScaling3; typedef Translation<Scalar,2> Translation2; typedef Translation<Scalar,3> Translation3; diff --git a/test/householder.cpp b/test/householder.cpp index 203dce46c..1dac4331f 100644 --- a/test/householder.cpp +++ b/test/householder.cpp @@ -29,8 +29,6 @@ template<typename MatrixType> void householder(const MatrixType& m) typedef Matrix<Scalar, Dynamic, MatrixType::ColsAtCompileTime> HBlockMatrixType; typedef Matrix<Scalar, Dynamic, 1> HCoeffsVectorType; - typedef Matrix<Scalar, MatrixType::ColsAtCompileTime, MatrixType::ColsAtCompileTime> RightSquareMatrixType; - typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, Dynamic> VBlockMatrixType; typedef Matrix<Scalar, MatrixType::ColsAtCompileTime, MatrixType::RowsAtCompileTime> TMatrixType; Matrix<Scalar, EIGEN_SIZE_MAX(MatrixType::RowsAtCompileTime,MatrixType::ColsAtCompileTime), 1> _tmp((std::max)(rows,cols)); diff --git a/test/inverse.cpp b/test/inverse.cpp index 5544eb671..8978a1877 100644 --- a/test/inverse.cpp +++ b/test/inverse.cpp @@ -22,8 +22,6 @@ template<typename MatrixType> void inverse(const MatrixType& m) Index cols = m.cols(); typedef typename MatrixType::Scalar Scalar; - typedef typename NumTraits<Scalar>::Real RealScalar; - typedef Matrix<Scalar, MatrixType::ColsAtCompileTime, 1> VectorType; MatrixType m1(rows, cols), m2(rows, cols), @@ -43,6 +41,9 @@ template<typename MatrixType> void inverse(const MatrixType& m) VERIFY_IS_APPROX(MatrixType(m1.transpose().inverse()), MatrixType(m1.inverse().transpose())); #if !defined(EIGEN_TEST_PART_5) && !defined(EIGEN_TEST_PART_6) + typedef typename NumTraits<Scalar>::Real RealScalar; + typedef Matrix<Scalar, MatrixType::ColsAtCompileTime, 1> VectorType; + //computeInverseAndDetWithCheck tests //First: an invertible matrix bool invertible; diff --git a/test/jacobi.cpp b/test/jacobi.cpp index f64f5d08f..b123b9189 100644 --- a/test/jacobi.cpp +++ b/test/jacobi.cpp @@ -14,7 +14,6 @@ template<typename MatrixType, typename JacobiScalar> void jacobi(const MatrixType& m = MatrixType()) { - typedef typename MatrixType::Scalar Scalar; typedef typename MatrixType::Index Index; Index rows = m.rows(); Index cols = m.cols(); diff --git a/test/jacobisvd.cpp b/test/jacobisvd.cpp index f6c567829..26da05037 100644 --- a/test/jacobisvd.cpp +++ b/test/jacobisvd.cpp @@ -27,11 +27,8 @@ void jacobisvd_check_full(const MatrixType& m, const JacobiSVD<MatrixType, QRPre }; typedef typename MatrixType::Scalar Scalar; - typedef typename NumTraits<Scalar>::Real RealScalar; typedef Matrix<Scalar, RowsAtCompileTime, RowsAtCompileTime> MatrixUType; typedef Matrix<Scalar, ColsAtCompileTime, ColsAtCompileTime> MatrixVType; - typedef Matrix<Scalar, RowsAtCompileTime, 1> ColVectorType; - typedef Matrix<Scalar, ColsAtCompileTime, 1> InputVectorType; MatrixType sigma = MatrixType::Zero(rows,cols); sigma.diagonal() = svd.singularValues().template cast<Scalar>(); diff --git a/test/lu.cpp b/test/lu.cpp index 6cbcb0a95..25f86755a 100644 --- a/test/lu.cpp +++ b/test/lu.cpp @@ -14,7 +14,6 @@ using namespace std; template<typename MatrixType> void lu_non_invertible() { typedef typename MatrixType::Index Index; - typedef typename MatrixType::Scalar Scalar; typedef typename MatrixType::RealScalar RealScalar; /* this test covers the following files: LU.h @@ -100,7 +99,6 @@ template<typename MatrixType> void lu_invertible() /* this test covers the following files: LU.h */ - typedef typename MatrixType::Scalar Scalar; typedef typename NumTraits<typename MatrixType::Scalar>::Real RealScalar; int size = internal::random<int>(1,EIGEN_TEST_MAX_SIZE); @@ -132,8 +130,6 @@ template<typename MatrixType> void lu_partial_piv() PartialPivLU.h */ typedef typename MatrixType::Index Index; - typedef typename MatrixType::Scalar Scalar; - typedef typename NumTraits<typename MatrixType::Scalar>::Real RealScalar; Index rows = internal::random<Index>(1,4); Index cols = rows; diff --git a/test/map.cpp b/test/map.cpp index fe983e802..2b52e4f38 100644 --- a/test/map.cpp +++ b/test/map.cpp @@ -102,9 +102,6 @@ template<typename VectorType> void map_static_methods(const VectorType& m) template<typename PlainObjectType> void check_const_correctness(const PlainObjectType&) { - typedef typename PlainObjectType::Index Index; - typedef typename PlainObjectType::Scalar Scalar; - // there's a lot that we can't test here while still having this test compile! // the only possible approach would be to run a script trying to compile stuff and checking that it fails. // CMake can help with that. diff --git a/test/meta.cpp b/test/meta.cpp index 0ba968ba9..3302c5887 100644 --- a/test/meta.cpp +++ b/test/meta.cpp @@ -11,9 +11,6 @@ void test_meta() { - typedef float & FloatRef; - typedef const float & ConstFloatRef; - VERIFY((internal::conditional<(3<4),internal::true_type, internal::false_type>::type::value)); VERIFY(( internal::is_same<float,float>::value)); VERIFY((!internal::is_same<float,double>::value)); diff --git a/test/miscmatrices.cpp b/test/miscmatrices.cpp index af0481cfe..ef20dc749 100644 --- a/test/miscmatrices.cpp +++ b/test/miscmatrices.cpp @@ -17,7 +17,6 @@ template<typename MatrixType> void miscMatrices(const MatrixType& m) typedef typename MatrixType::Index Index; typedef typename MatrixType::Scalar Scalar; typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType; - typedef Matrix<Scalar, 1, MatrixType::ColsAtCompileTime> RowVectorType; Index rows = m.rows(); Index cols = m.cols(); diff --git a/test/nesting_ops.cpp b/test/nesting_ops.cpp index 938ebcb7a..a92000f15 100644 --- a/test/nesting_ops.cpp +++ b/test/nesting_ops.cpp @@ -12,7 +12,6 @@ template <typename MatrixType> void run_nesting_ops(const MatrixType& _m) { typename MatrixType::Nested m(_m); - typedef typename MatrixType::Scalar Scalar; #ifdef NDEBUG const bool is_debug = false; diff --git a/test/nomalloc.cpp b/test/nomalloc.cpp index a05bcb3ee..cbd02dd21 100644 --- a/test/nomalloc.cpp +++ b/test/nomalloc.cpp @@ -36,7 +36,6 @@ template<typename MatrixType> void nomalloc(const MatrixType& m) */ typedef typename MatrixType::Index Index; typedef typename MatrixType::Scalar Scalar; - typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType; Index rows = m.rows(); Index cols = m.cols(); diff --git a/test/permutationmatrices.cpp b/test/permutationmatrices.cpp index 00f666ccd..7b0dbc763 100644 --- a/test/permutationmatrices.cpp +++ b/test/permutationmatrices.cpp @@ -14,7 +14,6 @@ template<typename MatrixType> void permutationmatrices(const MatrixType& m) { typedef typename MatrixType::Index Index; typedef typename MatrixType::Scalar Scalar; - typedef typename MatrixType::RealScalar RealScalar; enum { Rows = MatrixType::RowsAtCompileTime, Cols = MatrixType::ColsAtCompileTime, Options = MatrixType::Options }; typedef PermutationMatrix<Rows> LeftPermutationType; diff --git a/test/prec_inverse_4x4.cpp b/test/prec_inverse_4x4.cpp index 9bab30a25..c4ef2d4bd 100644 --- a/test/prec_inverse_4x4.cpp +++ b/test/prec_inverse_4x4.cpp @@ -14,7 +14,6 @@ template<typename MatrixType> void inverse_permutation_4x4() { typedef typename MatrixType::Scalar Scalar; - typedef typename MatrixType::RealScalar RealScalar; Vector4i indices(0,1,2,3); for(int i = 0; i < 24; ++i) { diff --git a/test/product.h b/test/product.h index 4aa9fd56d..856b234ac 100644 --- a/test/product.h +++ b/test/product.h @@ -24,7 +24,6 @@ template<typename MatrixType> void product(const MatrixType& m) */ typedef typename MatrixType::Index Index; typedef typename MatrixType::Scalar Scalar; - typedef typename NumTraits<Scalar>::NonInteger NonInteger; typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> RowVectorType; typedef Matrix<Scalar, MatrixType::ColsAtCompileTime, 1> ColVectorType; typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime> RowSquareMatrixType; diff --git a/test/product_extra.cpp b/test/product_extra.cpp index 6f962159e..53493bdd6 100644 --- a/test/product_extra.cpp +++ b/test/product_extra.cpp @@ -13,7 +13,6 @@ template<typename MatrixType> void product_extra(const MatrixType& m) { typedef typename MatrixType::Index Index; typedef typename MatrixType::Scalar Scalar; - typedef typename NumTraits<Scalar>::NonInteger NonInteger; typedef Matrix<Scalar, 1, Dynamic> RowVectorType; typedef Matrix<Scalar, Dynamic, 1> ColVectorType; typedef Matrix<Scalar, Dynamic, Dynamic, diff --git a/test/product_mmtr.cpp b/test/product_mmtr.cpp index 879cfe16a..7d6746800 100644 --- a/test/product_mmtr.cpp +++ b/test/product_mmtr.cpp @@ -19,8 +19,6 @@ template<typename Scalar> void mmtr(int size) { - typedef typename NumTraits<Scalar>::Real RealScalar; - typedef Matrix<Scalar,Dynamic,Dynamic,ColMajor> MatrixColMaj; typedef Matrix<Scalar,Dynamic,Dynamic,RowMajor> MatrixRowMaj; diff --git a/test/product_selfadjoint.cpp b/test/product_selfadjoint.cpp index 95693b155..aede15053 100644 --- a/test/product_selfadjoint.cpp +++ b/test/product_selfadjoint.cpp @@ -13,7 +13,6 @@ template<typename MatrixType> void product_selfadjoint(const MatrixType& m) { typedef typename MatrixType::Index Index; typedef typename MatrixType::Scalar Scalar; - typedef typename NumTraits<Scalar>::Real RealScalar; typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType; typedef Matrix<Scalar, 1, MatrixType::RowsAtCompileTime> RowVectorType; diff --git a/test/product_symm.cpp b/test/product_symm.cpp index 2f7a0d231..74d7329b1 100644 --- a/test/product_symm.cpp +++ b/test/product_symm.cpp @@ -11,8 +11,6 @@ template<typename Scalar, int Size, int OtherSize> void symm(int size = Size, int othersize = OtherSize) { - typedef typename NumTraits<Scalar>::Real RealScalar; - typedef Matrix<Scalar, Size, Size> MatrixType; typedef Matrix<Scalar, Size, OtherSize> Rhs1; typedef Matrix<Scalar, OtherSize, Size> Rhs2; diff --git a/test/product_syrk.cpp b/test/product_syrk.cpp index ad233af70..73c95000c 100644 --- a/test/product_syrk.cpp +++ b/test/product_syrk.cpp @@ -13,7 +13,6 @@ template<typename MatrixType> void syrk(const MatrixType& m) { typedef typename MatrixType::Index Index; typedef typename MatrixType::Scalar Scalar; - typedef typename NumTraits<Scalar>::Real RealScalar; typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::ColsAtCompileTime, RowMajor> RMatrixType; typedef Matrix<Scalar, MatrixType::ColsAtCompileTime, Dynamic> Rhs1; typedef Matrix<Scalar, Dynamic, MatrixType::RowsAtCompileTime> Rhs2; diff --git a/test/product_trmm.cpp b/test/product_trmm.cpp index 64244c18f..31ac1b22e 100644 --- a/test/product_trmm.cpp +++ b/test/product_trmm.cpp @@ -14,8 +14,6 @@ void trmm(int rows=internal::random<int>(1,EIGEN_TEST_MAX_SIZE), int cols=internal::random<int>(1,EIGEN_TEST_MAX_SIZE), int otherCols = OtherCols==Dynamic?internal::random<int>(1,EIGEN_TEST_MAX_SIZE):OtherCols) { - typedef typename NumTraits<Scalar>::Real RealScalar; - typedef Matrix<Scalar,Dynamic,Dynamic,TriOrder> TriMatrix; typedef Matrix<Scalar,Dynamic,OtherCols,OtherCols==1?ColMajor:OtherOrder> OnTheRight; typedef Matrix<Scalar,OtherCols,Dynamic,OtherCols==1?RowMajor:OtherOrder> OnTheLeft; diff --git a/test/qr.cpp b/test/qr.cpp index 237aa98d8..a79e0dd34 100644 --- a/test/qr.cpp +++ b/test/qr.cpp @@ -19,7 +19,6 @@ template<typename MatrixType> void qr(const MatrixType& m) typedef typename MatrixType::Scalar Scalar; typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime> MatrixQType; - typedef Matrix<Scalar, MatrixType::ColsAtCompileTime, 1> VectorType; MatrixType a = MatrixType::Random(rows,cols); HouseholderQR<MatrixType> qrOfA(a); diff --git a/test/qr_colpivoting.cpp b/test/qr_colpivoting.cpp index 0fd19c4ee..eb3feac01 100644 --- a/test/qr_colpivoting.cpp +++ b/test/qr_colpivoting.cpp @@ -19,9 +19,7 @@ template<typename MatrixType> void qr() Index rank = internal::random<Index>(1, (std::min)(rows, cols)-1); typedef typename MatrixType::Scalar Scalar; - typedef typename MatrixType::RealScalar RealScalar; typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime> MatrixQType; - typedef Matrix<Scalar, MatrixType::ColsAtCompileTime, 1> VectorType; MatrixType m1; createRandomPIMatrixOfRank(rank,rows,cols,m1); ColPivHouseholderQR<MatrixType> qr(m1); diff --git a/test/qr_fullpivoting.cpp b/test/qr_fullpivoting.cpp index 8b8188da3..15d7299d7 100644 --- a/test/qr_fullpivoting.cpp +++ b/test/qr_fullpivoting.cpp @@ -20,7 +20,6 @@ template<typename MatrixType> void qr() typedef typename MatrixType::Scalar Scalar; typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime> MatrixQType; - typedef Matrix<Scalar, MatrixType::ColsAtCompileTime, 1> VectorType; MatrixType m1; createRandomPIMatrixOfRank(rank,rows,cols,m1); FullPivHouseholderQR<MatrixType> qr(m1); diff --git a/test/real_qz.cpp b/test/real_qz.cpp index c31621439..b48bac361 100644 --- a/test/real_qz.cpp +++ b/test/real_qz.cpp @@ -19,10 +19,6 @@ template<typename MatrixType> void real_qz(const MatrixType& m) using std::abs; typedef typename MatrixType::Index Index; typedef typename MatrixType::Scalar Scalar; - typedef typename NumTraits<Scalar>::Real RealScalar; - typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType; - typedef Matrix<RealScalar, MatrixType::RowsAtCompileTime, 1> RealVectorType; - typedef typename std::complex<typename NumTraits<typename MatrixType::Scalar>::Real> Complex; Index dim = m.cols(); diff --git a/test/ref.cpp b/test/ref.cpp index 9c24f3a4f..7c0ccafcf 100644 --- a/test/ref.cpp +++ b/test/ref.cpp @@ -146,9 +146,6 @@ template<typename VectorType> void ref_vector(const VectorType& m) template<typename PlainObjectType> void check_const_correctness(const PlainObjectType&) { - typedef typename PlainObjectType::Index Index; - typedef typename PlainObjectType::Scalar Scalar; - // verify that ref-to-const don't have LvalueBit typedef typename internal::add_const<PlainObjectType>::type ConstPlainObjectType; VERIFY( !(internal::traits<Ref<ConstPlainObjectType> >::Flags & LvalueBit) ); diff --git a/test/selfadjoint.cpp b/test/selfadjoint.cpp index 6d3ec6536..32791eeb5 100644 --- a/test/selfadjoint.cpp +++ b/test/selfadjoint.cpp @@ -16,7 +16,6 @@ template<typename MatrixType> void selfadjoint(const MatrixType& m) { typedef typename MatrixType::Index Index; typedef typename MatrixType::Scalar Scalar; - typedef typename NumTraits<Scalar>::Real RealScalar; Index rows = m.rows(); Index cols = m.cols(); diff --git a/test/sparse_solver.h b/test/sparse_solver.h index 6b3c48274..645a965bb 100644 --- a/test/sparse_solver.h +++ b/test/sparse_solver.h @@ -112,7 +112,6 @@ void check_sparse_determinant(Solver& solver, const typename Solver::MatrixType& { typedef typename Solver::MatrixType Mat; typedef typename Mat::Scalar Scalar; - typedef typename Mat::RealScalar RealScalar; solver.compute(A); if (solver.info() != Success) @@ -168,7 +167,6 @@ template<typename Solver> void check_sparse_spd_solving(Solver& solver) { typedef typename Solver::MatrixType Mat; typedef typename Mat::Scalar Scalar; - typedef typename Mat::Index Index; typedef SparseMatrix<Scalar,ColMajor> SpMat; typedef Matrix<Scalar,Dynamic,Dynamic> DenseMatrix; typedef Matrix<Scalar,Dynamic,1> DenseVector; @@ -247,7 +245,6 @@ int generate_sparse_square_problem(Solver&, typename Solver::MatrixType& A, Dens { typedef typename Solver::MatrixType Mat; typedef typename Mat::Scalar Scalar; - typedef Matrix<Scalar,Dynamic,Dynamic> DenseMatrix; int size = internal::random<int>(1,maxSize); double density = (std::max)(8./(size*size), 0.01); diff --git a/test/triangular.cpp b/test/triangular.cpp index 0e8ee5487..7e1723af5 100644 --- a/test/triangular.cpp +++ b/test/triangular.cpp @@ -123,9 +123,6 @@ template<typename MatrixType> void triangular_rect(const MatrixType& m) typedef typename MatrixType::Scalar Scalar; typedef typename NumTraits<Scalar>::Real RealScalar; enum { Rows = MatrixType::RowsAtCompileTime, Cols = MatrixType::ColsAtCompileTime }; - typedef Matrix<Scalar, Rows, 1> VectorType; - typedef Matrix<Scalar, Rows, Rows> RMatrixType; - Index rows = m.rows(); Index cols = m.cols(); diff --git a/test/umeyama.cpp b/test/umeyama.cpp index 972a280c3..814d19d01 100644 --- a/test/umeyama.cpp +++ b/test/umeyama.cpp @@ -22,8 +22,6 @@ template <typename T> Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> randMatrixUnitary(int size) { typedef T Scalar; - typedef typename NumTraits<Scalar>::Real RealScalar; - typedef Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic> MatrixType; MatrixType Q; @@ -77,7 +75,6 @@ template <typename T> Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> randMatrixSpecialUnitary(int size) { typedef T Scalar; - typedef typename NumTraits<Scalar>::Real RealScalar; typedef Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic> MatrixType; diff --git a/test/upperbidiagonalization.cpp b/test/upperbidiagonalization.cpp index db6ce383e..5897cffab 100644 --- a/test/upperbidiagonalization.cpp +++ b/test/upperbidiagonalization.cpp @@ -15,7 +15,6 @@ template<typename MatrixType> void upperbidiag(const MatrixType& m) const typename MatrixType::Index rows = m.rows(); const typename MatrixType::Index cols = m.cols(); - typedef typename MatrixType::Scalar Scalar; typedef Matrix<typename MatrixType::RealScalar, MatrixType::RowsAtCompileTime, MatrixType::ColsAtCompileTime> RealMatrixType; MatrixType a = MatrixType::Random(rows,cols); diff --git a/test/vectorwiseop.cpp b/test/vectorwiseop.cpp index 904b51664..9d60b0388 100644 --- a/test/vectorwiseop.cpp +++ b/test/vectorwiseop.cpp @@ -15,7 +15,6 @@ template<typename ArrayType> void vectorwiseop_array(const ArrayType& m) { typedef typename ArrayType::Index Index; typedef typename ArrayType::Scalar Scalar; - typedef typename NumTraits<Scalar>::Real RealScalar; typedef Array<Scalar, ArrayType::RowsAtCompileTime, 1> ColVectorType; typedef Array<Scalar, 1, ArrayType::ColsAtCompileTime> RowVectorType; diff --git a/unsupported/Eigen/src/IterativeSolvers/GMRES.h b/unsupported/Eigen/src/IterativeSolvers/GMRES.h index f82472159..073367506 100644 --- a/unsupported/Eigen/src/IterativeSolvers/GMRES.h +++ b/unsupported/Eigen/src/IterativeSolvers/GMRES.h @@ -61,7 +61,6 @@ bool gmres(const MatrixType & mat, const Rhs & rhs, Dest & x, const Precondition typedef typename Dest::RealScalar RealScalar; typedef typename Dest::Scalar Scalar; - typedef Matrix < RealScalar, Dynamic, 1 > RealVectorType; typedef Matrix < Scalar, Dynamic, 1 > VectorType; typedef Matrix < Scalar, Dynamic, Dynamic > FMatrixType; diff --git a/unsupported/Eigen/src/LevenbergMarquardt/LMonestep.h b/unsupported/Eigen/src/LevenbergMarquardt/LMonestep.h index 49fe6d77c..60584c523 100644 --- a/unsupported/Eigen/src/LevenbergMarquardt/LMonestep.h +++ b/unsupported/Eigen/src/LevenbergMarquardt/LMonestep.h @@ -20,7 +20,6 @@ template<typename FunctorType> LevenbergMarquardtSpace::Status LevenbergMarquardt<FunctorType>::minimizeOneStep(FVectorType &x) { - typedef typename FunctorType::JacobianType JacobianType; using std::abs; using std::sqrt; RealScalar temp, temp1,temp2; diff --git a/unsupported/test/matrix_function.cpp b/unsupported/test/matrix_function.cpp index 0439c5a7d..3c76cfb65 100644 --- a/unsupported/test/matrix_function.cpp +++ b/unsupported/test/matrix_function.cpp @@ -110,7 +110,6 @@ void testMatrixLogarithm(const MatrixType& A) { typedef typename internal::traits<MatrixType>::Scalar Scalar; typedef typename NumTraits<Scalar>::Real RealScalar; - typedef std::complex<RealScalar> ComplexScalar; MatrixType scaledA; RealScalar maxImagPartOfSpectrum = A.eigenvalues().imag().cwiseAbs().maxCoeff(); |