mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Clean source code and unit tests with respect to -Wunused-local-typedefs
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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>();
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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>();
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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) );
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user