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:
@@ -11,7 +11,6 @@
|
||||
|
||||
template<typename MatrixType> void array_for_matrix(const MatrixType& m)
|
||||
{
|
||||
typedef typename MatrixType::Index Index;
|
||||
typedef typename MatrixType::Scalar Scalar;
|
||||
typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> ColVectorType;
|
||||
typedef Matrix<Scalar, 1, MatrixType::ColsAtCompileTime> RowVectorType;
|
||||
@@ -83,7 +82,6 @@ template<typename MatrixType> void array_for_matrix(const MatrixType& m)
|
||||
template<typename MatrixType> void comparisons(const MatrixType& m)
|
||||
{
|
||||
using std::abs;
|
||||
typedef typename MatrixType::Index Index;
|
||||
typedef typename MatrixType::Scalar Scalar;
|
||||
typedef typename NumTraits<Scalar>::Real RealScalar;
|
||||
|
||||
@@ -140,7 +138,7 @@ template<typename MatrixType> void comparisons(const MatrixType& m)
|
||||
RealScalar a = m1.cwiseAbs().mean();
|
||||
VERIFY( ((m1.array()<-a).matrix() || (m1.array()>a).matrix()).count() == (m1.cwiseAbs().array()>a).count());
|
||||
|
||||
typedef Matrix<typename MatrixType::Index, Dynamic, 1> VectorOfIndices;
|
||||
typedef Matrix<Index, Dynamic, 1> VectorOfIndices;
|
||||
|
||||
// TODO allows colwise/rowwise for array
|
||||
VERIFY_IS_APPROX(((m1.array().abs()+1)>RealScalar(0.1)).matrix().colwise().count(), VectorOfIndices::Constant(cols,rows).transpose());
|
||||
@@ -172,7 +170,6 @@ template<typename VectorType> void lpNorm(const VectorType& v)
|
||||
|
||||
template<typename MatrixType> void cwise_min_max(const MatrixType& m)
|
||||
{
|
||||
typedef typename MatrixType::Index Index;
|
||||
typedef typename MatrixType::Scalar Scalar;
|
||||
|
||||
Index rows = m.rows();
|
||||
@@ -211,7 +208,6 @@ template<typename MatrixType> void cwise_min_max(const MatrixType& m)
|
||||
|
||||
template<typename MatrixTraits> void resize(const MatrixTraits& t)
|
||||
{
|
||||
typedef typename MatrixTraits::Index Index;
|
||||
typedef typename MatrixTraits::Scalar Scalar;
|
||||
typedef Matrix<Scalar,Dynamic,Dynamic> MatrixType;
|
||||
typedef Array<Scalar,Dynamic,Dynamic> Array2DType;
|
||||
|
||||
Reference in New Issue
Block a user