mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Remove local Index typedef from unit-tests
This commit is contained in:
@@ -13,7 +13,6 @@
|
||||
|
||||
template<typename MatrixType> void basicStuff(const MatrixType& m)
|
||||
{
|
||||
typedef typename MatrixType::Index Index;
|
||||
typedef typename MatrixType::Scalar Scalar;
|
||||
typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType;
|
||||
typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime> SquareMatrixType;
|
||||
@@ -124,22 +123,22 @@ template<typename MatrixType> void basicStuff(const MatrixType& m)
|
||||
|
||||
// check automatic transposition
|
||||
sm2.setZero();
|
||||
for(typename MatrixType::Index i=0;i<rows;++i)
|
||||
for(Index i=0;i<rows;++i)
|
||||
sm2.col(i) = sm1.row(i);
|
||||
VERIFY_IS_APPROX(sm2,sm1.transpose());
|
||||
|
||||
sm2.setZero();
|
||||
for(typename MatrixType::Index i=0;i<rows;++i)
|
||||
for(Index i=0;i<rows;++i)
|
||||
sm2.col(i).noalias() = sm1.row(i);
|
||||
VERIFY_IS_APPROX(sm2,sm1.transpose());
|
||||
|
||||
sm2.setZero();
|
||||
for(typename MatrixType::Index i=0;i<rows;++i)
|
||||
for(Index i=0;i<rows;++i)
|
||||
sm2.col(i).noalias() += sm1.row(i);
|
||||
VERIFY_IS_APPROX(sm2,sm1.transpose());
|
||||
|
||||
sm2.setZero();
|
||||
for(typename MatrixType::Index i=0;i<rows;++i)
|
||||
for(Index i=0;i<rows;++i)
|
||||
sm2.col(i).noalias() -= sm1.row(i);
|
||||
VERIFY_IS_APPROX(sm2,-sm1.transpose());
|
||||
|
||||
@@ -160,7 +159,6 @@ template<typename MatrixType> void basicStuff(const MatrixType& m)
|
||||
|
||||
template<typename MatrixType> void basicStuffComplex(const MatrixType& m)
|
||||
{
|
||||
typedef typename MatrixType::Index Index;
|
||||
typedef typename MatrixType::Scalar Scalar;
|
||||
typedef typename NumTraits<Scalar>::Real RealScalar;
|
||||
typedef Matrix<RealScalar, MatrixType::RowsAtCompileTime, MatrixType::ColsAtCompileTime> RealMatrixType;
|
||||
|
||||
Reference in New Issue
Block a user