mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
rename Block to DynBlock and rework API to make place for
upcoming fixed-size Block matrix. Also some cleanup.
This commit is contained in:
@@ -93,10 +93,10 @@ void EigenTest::testAdjoint()
|
||||
{
|
||||
REPEAT {
|
||||
adjoint(Matrix<float, 1, 1>());
|
||||
adjoint(Matrix4cd());
|
||||
adjoint(Matrix4d());
|
||||
adjoint(MatrixXcf(3, 3));
|
||||
adjoint(MatrixXi(8, 12));
|
||||
adjoint(MatrixXd(20, 20));
|
||||
adjoint(MatrixXcd(20, 20));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -140,10 +140,10 @@ void EigenTest::testBasicStuff()
|
||||
{
|
||||
REPEAT {
|
||||
basicStuff(Matrix<float, 1, 1>());
|
||||
basicStuff(Matrix4cd());
|
||||
basicStuff(Matrix4d());
|
||||
basicStuff(MatrixXcf(3, 3));
|
||||
basicStuff(MatrixXi(8, 12));
|
||||
basicStuff(MatrixXd(20, 20));
|
||||
basicStuff(MatrixXcd(20, 20));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
19
test/main.h
19
test/main.h
@@ -35,11 +35,19 @@
|
||||
#define DEFAULT_REPEAT 50
|
||||
#define REPEAT for(int repeat_iteration = 0; repeat_iteration < m_repeat; repeat_iteration++)
|
||||
|
||||
#define VERIFY(a) QVERIFY(a)
|
||||
#define VERIFY_IS_APPROX(a, b) QVERIFY(test_isApprox(a, b))
|
||||
#define VERIFY_IS_NOT_APPROX(a, b) QVERIFY(!test_isApprox(a, b))
|
||||
#define VERIFY_IS_MUCH_SMALLER_THAN(a, b) QVERIFY(test_isMuchSmallerThan(a, b))
|
||||
#define VERIFY_IS_NOT_MUCH_SMALLER_THAN(a, b) QVERIFY(!test_isMuchSmallerThan(a, b))
|
||||
#define VERIFY_IS_APPROX_OR_LESS_THAN(a, b) QVERIFY(test_isApproxOrLessThan(a, b))
|
||||
#define VERIFY_IS_NOT_APPROX_OR_LESS_THAN(a, b) QVERIFY(!test_isApproxOrLessThan(a, b))
|
||||
|
||||
namespace Eigen {
|
||||
|
||||
template<typename T> inline typename NumTraits<T>::Real test_precision();
|
||||
template<> inline int test_precision<int>() { return 0; }
|
||||
template<> inline float test_precision<float>() { return 1e-2; }
|
||||
template<> inline float test_precision<float>() { return 1e-2f; }
|
||||
template<> inline double test_precision<double>() { return 1e-5; }
|
||||
template<> inline float test_precision<std::complex<float> >() { return test_precision<float>(); }
|
||||
template<> inline double test_precision<std::complex<double> >() { return test_precision<double>(); }
|
||||
@@ -96,15 +104,6 @@ inline bool test_isMuchSmallerThan(const MatrixBase<Scalar, Derived>& m,
|
||||
return m.isMuchSmallerThan(s, test_precision<Scalar>());
|
||||
}
|
||||
|
||||
|
||||
#define VERIFY(a) QVERIFY(a)
|
||||
#define VERIFY_IS_APPROX(a, b) QVERIFY(test_isApprox(a, b))
|
||||
#define VERIFY_IS_NOT_APPROX(a, b) QVERIFY(!test_isApprox(a, b))
|
||||
#define VERIFY_IS_MUCH_SMALLER_THAN(a, b) QVERIFY(test_isMuchSmallerThan(a, b))
|
||||
#define VERIFY_IS_NOT_MUCH_SMALLER_THAN(a, b) QVERIFY(!test_isMuchSmallerThan(a, b))
|
||||
#define VERIFY_IS_APPROX_OR_LESS_THAN(a, b) QVERIFY(test_isApproxOrLessThan(a, b))
|
||||
#define VERIFY_IS_NOT_APPROX_OR_LESS_THAN(a, b) QVERIFY(!test_isApproxOrLessThan(a, b))
|
||||
|
||||
class EigenTest : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Reference in New Issue
Block a user