mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
fix a couple of warnings in the unit tests
This commit is contained in:
parent
cdd3e85060
commit
478de03bd8
@ -112,4 +112,4 @@
|
||||
#undef Hyperplane
|
||||
#undef ParametrizedLine
|
||||
|
||||
#endif // EIGEN2_GEOMETRY_MODULE_H
|
||||
#endif // EIGEN2_GEOMETRY_MODULE_H
|
||||
|
@ -60,11 +60,8 @@ template<typename MatrixType> void cwiseops(const MatrixType& m)
|
||||
mzero = MatrixType::Zero(rows, cols),
|
||||
mones = MatrixType::Ones(rows, cols),
|
||||
identity = Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime>
|
||||
::Identity(rows, rows),
|
||||
square = Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime>::Random(rows, rows);
|
||||
VectorType v1 = VectorType::Random(rows),
|
||||
v2 = VectorType::Random(rows),
|
||||
vzero = VectorType::Zero(rows),
|
||||
::Identity(rows, rows);
|
||||
VectorType vzero = VectorType::Zero(rows),
|
||||
vones = VectorType::Ones(rows),
|
||||
v3(rows);
|
||||
|
||||
|
@ -35,7 +35,6 @@ template<typename MatrixType> void eigen2support(const MatrixType& m)
|
||||
Index cols = m.cols();
|
||||
|
||||
MatrixType m1 = MatrixType::Random(rows, cols),
|
||||
m2 = MatrixType::Random(rows, cols),
|
||||
m3(rows, cols);
|
||||
|
||||
Scalar s1 = internal::random<Scalar>(),
|
||||
|
@ -42,7 +42,6 @@ template<typename Scalar> void eulerangles(void)
|
||||
|
||||
#define VERIFY_EULER(I,J,K, X,Y,Z) { \
|
||||
Vector3 ea = m.eulerAngles(I,J,K); \
|
||||
Matrix3 m1 = Matrix3(AngleAxisx(ea[0], Vector3::Unit##X()) * AngleAxisx(ea[1], Vector3::Unit##Y()) * AngleAxisx(ea[2], Vector3::Unit##Z())); \
|
||||
VERIFY_IS_APPROX(m, Matrix3(AngleAxisx(ea[0], Vector3::Unit##X()) * AngleAxisx(ea[1], Vector3::Unit##Y()) * AngleAxisx(ea[2], Vector3::Unit##Z()))); \
|
||||
}
|
||||
VERIFY_EULER(0,1,2, X,Y,Z);
|
||||
|
@ -42,17 +42,13 @@ template<typename Scalar,int Size> void homogeneous(void)
|
||||
typedef Matrix<Scalar,Size+1,Size> T3MatrixType;
|
||||
|
||||
VectorType v0 = VectorType::Random(),
|
||||
v1 = VectorType::Random(),
|
||||
ones = VectorType::Ones();
|
||||
|
||||
HVectorType hv0 = HVectorType::Random(),
|
||||
hv1 = HVectorType::Random();
|
||||
HVectorType hv0 = HVectorType::Random();
|
||||
|
||||
MatrixType m0 = MatrixType::Random(),
|
||||
m1 = MatrixType::Random();
|
||||
MatrixType m0 = MatrixType::Random();
|
||||
|
||||
HMatrixType hm0 = HMatrixType::Random(),
|
||||
hm1 = HMatrixType::Random();
|
||||
HMatrixType hm0 = HMatrixType::Random();
|
||||
|
||||
hv0 << v0, 1;
|
||||
VERIFY_IS_APPROX(v0.homogeneous(), hv0);
|
||||
|
@ -88,9 +88,7 @@ template<typename Scalar, int Size> void orthomethods(int size=Size)
|
||||
typedef Matrix<Scalar,Size,3> MatrixN3;
|
||||
typedef Matrix<Scalar,3,1> Vector3;
|
||||
|
||||
VectorType v0 = VectorType::Random(size),
|
||||
v1 = VectorType::Random(size),
|
||||
v2 = VectorType::Random(size);
|
||||
VectorType v0 = VectorType::Random(size);
|
||||
|
||||
// unitOrthogonal
|
||||
VERIFY_IS_MUCH_SMALLER_THAN(v0.unitOrthogonal().dot(v0), Scalar(1));
|
||||
|
@ -556,7 +556,7 @@ int mspace_mallopt(int, int);
|
||||
#endif /* MSPACES */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}; /* end of extern "C" */
|
||||
} /* end of extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* MALLOC_280_H */
|
||||
|
Loading…
x
Reference in New Issue
Block a user