mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-01-12 14:25:16 +08:00
Remove unused variables in eigen2support.
This commit is contained in:
parent
15bff016d1
commit
58725ff08c
@ -147,7 +147,6 @@ void fitHyperplane(int numPoints,
|
||||
|
||||
// compute the covariance matrix
|
||||
CovMatrixType covMat = CovMatrixType::Zero(size, size);
|
||||
VectorType remean = VectorType::Zero(size);
|
||||
for(int i = 0; i < numPoints; ++i)
|
||||
{
|
||||
VectorType diff = (*(points[i]) - mean).conjugate();
|
||||
|
@ -29,8 +29,6 @@ template<typename MatrixType> void adjoint(const MatrixType& m)
|
||||
MatrixType m1 = MatrixType::Random(rows, cols),
|
||||
m2 = MatrixType::Random(rows, cols),
|
||||
m3(rows, cols),
|
||||
mzero = MatrixType::Zero(rows, cols),
|
||||
identity = SquareMatrixType::Identity(rows, rows),
|
||||
square = SquareMatrixType::Random(rows, rows);
|
||||
VectorType v1 = VectorType::Random(rows),
|
||||
v2 = VectorType::Random(rows),
|
||||
|
@ -23,11 +23,8 @@ template<typename MatrixType> void basicStuff(const MatrixType& m)
|
||||
m2 = MatrixType::Random(rows, cols),
|
||||
m3(rows, cols),
|
||||
mzero = MatrixType::Zero(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);
|
||||
|
||||
Scalar x = ei_random<Scalar>();
|
||||
|
@ -35,11 +35,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);
|
||||
|
||||
|
@ -392,6 +392,7 @@ template<typename Scalar> void geometry(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, m1); \
|
||||
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);
|
||||
|
@ -394,6 +394,7 @@ template<typename Scalar> void geometry(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, m1); \
|
||||
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);
|
||||
|
@ -25,7 +25,6 @@ template<typename MatrixType> void inverse(const MatrixType& m)
|
||||
|
||||
MatrixType m1 = MatrixType::Random(rows, cols),
|
||||
m2(rows, cols),
|
||||
mzero = MatrixType::Zero(rows, cols),
|
||||
identity = MatrixType::Identity(rows, rows);
|
||||
|
||||
while(ei_abs(m1.determinant()) < RealScalar(0.1) && rows <= 8)
|
||||
|
@ -25,8 +25,7 @@ template<typename MatrixType> void linearStructure(const MatrixType& m)
|
||||
// to test it, hence I consider that we will have tested Random.h
|
||||
MatrixType m1 = MatrixType::Random(rows, cols),
|
||||
m2 = MatrixType::Random(rows, cols),
|
||||
m3(rows, cols),
|
||||
mzero = MatrixType::Zero(rows, cols);
|
||||
m3(rows, cols);
|
||||
|
||||
Scalar s1 = ei_random<Scalar>();
|
||||
while (ei_abs(s1)<1e-3) s1 = ei_random<Scalar>();
|
||||
|
@ -25,22 +25,12 @@ template<typename MatrixType> void nomalloc(const MatrixType& m)
|
||||
*/
|
||||
|
||||
typedef typename MatrixType::Scalar Scalar;
|
||||
typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType;
|
||||
|
||||
int rows = m.rows();
|
||||
int cols = m.cols();
|
||||
|
||||
MatrixType m1 = MatrixType::Random(rows, cols),
|
||||
m2 = MatrixType::Random(rows, cols),
|
||||
m3(rows, cols),
|
||||
mzero = MatrixType::Zero(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);
|
||||
m2 = MatrixType::Random(rows, cols);
|
||||
|
||||
Scalar s1 = ei_random<Scalar>();
|
||||
|
||||
|
@ -51,16 +51,10 @@ template<typename MatrixType> void submatrices(const MatrixType& m)
|
||||
MatrixType m1 = MatrixType::Random(rows, cols),
|
||||
m2 = MatrixType::Random(rows, cols),
|
||||
m3(rows, cols),
|
||||
mzero = MatrixType::Zero(rows, cols),
|
||||
ones = 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),
|
||||
v3 = VectorType::Random(rows),
|
||||
vzero = VectorType::Zero(rows);
|
||||
VectorType v1 = VectorType::Random(rows);
|
||||
|
||||
Scalar s1 = ei_random<Scalar>();
|
||||
|
||||
|
@ -13,7 +13,6 @@ template<typename MatrixType> void triangular(const MatrixType& m)
|
||||
{
|
||||
typedef typename MatrixType::Scalar Scalar;
|
||||
typedef typename NumTraits<Scalar>::Real RealScalar;
|
||||
typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType;
|
||||
|
||||
RealScalar largerEps = 10*test_precision<RealScalar>();
|
||||
|
||||
@ -25,16 +24,7 @@ template<typename MatrixType> void triangular(const MatrixType& m)
|
||||
m3(rows, cols),
|
||||
m4(rows, cols),
|
||||
r1(rows, cols),
|
||||
r2(rows, cols),
|
||||
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);
|
||||
r2(rows, cols);
|
||||
|
||||
MatrixType m1up = m1.template part<Eigen::UpperTriangular>();
|
||||
MatrixType m2up = m2.template part<Eigen::UpperTriangular>();
|
||||
|
@ -40,8 +40,7 @@ template<typename MatrixType> void product(const MatrixType& m)
|
||||
// to test it, hence I consider that we will have tested Random.h
|
||||
MatrixType m1 = MatrixType::Random(rows, cols),
|
||||
m2 = MatrixType::Random(rows, cols),
|
||||
m3(rows, cols),
|
||||
mzero = MatrixType::Zero(rows, cols);
|
||||
m3(rows, cols);
|
||||
RowSquareMatrixType
|
||||
identity = RowSquareMatrixType::Identity(rows, rows),
|
||||
square = RowSquareMatrixType::Random(rows, rows),
|
||||
@ -49,9 +48,7 @@ template<typename MatrixType> void product(const MatrixType& m)
|
||||
ColSquareMatrixType
|
||||
square2 = ColSquareMatrixType::Random(cols, cols),
|
||||
res2 = ColSquareMatrixType::Random(cols, cols);
|
||||
RowVectorType v1 = RowVectorType::Random(rows),
|
||||
v2 = RowVectorType::Random(rows),
|
||||
vzero = RowVectorType::Zero(rows);
|
||||
RowVectorType v1 = RowVectorType::Random(rows);
|
||||
ColVectorType vc2 = ColVectorType::Random(cols), vcres(cols);
|
||||
OtherMajorMatrixType tm1 = m1;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user