11 #define EIGEN_WORK_AROUND_QT_BUG_CALLING_WRONG_OPERATOR_NEW_FIXED_IN_QT_4_5 14 #include <QtCore/QVector> 15 #include <Eigen/Geometry> 16 #include <Eigen/QtAlignedMalloc> 18 template<
typename MatrixType>
23 MatrixType x = MatrixType::Random(rows,cols),
y = MatrixType::Random(rows,cols);
25 for(
int i = 0;
i < 20;
i++)
33 for(
int i = 0;
i < 20;
i++)
50 for(
int i=0;
i<30 || ((ref==&w[0]) &&
i<300); ++
i)
51 v.push_back(w[
i%w.size()]);
52 for(
int i=23;
i<
v.size(); ++
i)
58 template<
typename TransformType>
62 TransformType
x(MatrixType::Random()),
y(MatrixType::Random());
63 QVector<TransformType>
v(10),
w(20, y);
68 for(
int i = 0;
i < 20;
i++)
80 VERIFY((
size_t)&(
v[22]) == (
size_t)&(
v[21]) +
sizeof(TransformType));
84 TransformType*
ref = &w[0];
85 for(
int i=0;
i<30 || ((ref==&w[0]) &&
i<300); ++
i)
86 v.push_back(w[
i%w.size()]);
87 for(
unsigned int i=23;
int(
i)<
v.size(); ++
i)
93 template<
typename QuaternionType>
96 typedef typename QuaternionType::Coefficients Coefficients;
97 QuaternionType
x(Coefficients::Random()),
y(Coefficients::Random());
98 QVector<QuaternionType>
v(10),
w(20, y);
103 for(
int i = 0;
i < 20;
i++)
115 VERIFY((
size_t)&(
v[22]) == (
size_t)&(
v[21]) +
sizeof(QuaternionType));
119 QuaternionType*
ref = &w[0];
120 for(
int i=0;
i<30 || ((ref==&w[0]) &&
i<300); ++
i)
121 v.push_back(w[
i%w.size()]);
122 for(
unsigned int i=23;
int(
i)<
v.size(); ++
i)
124 VERIFY(
v[
i].coeffs()==w[(
i-23)%w.size()].coeffs());
Transform< float, 3, Affine > Affine3f
EIGEN_DECLARE_TEST(qtvector)
void check_qtvector_transform(const TransformType &)
#define VERIFY_IS_APPROX(a, b)
void check_qtvector_matrix(const MatrixType &m)
Transform< double, 3, Affine > Affine3d
void check_qtvector_quaternion(const QuaternionType &)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Array< int, Dynamic, 1 > v
Reference counting helper.
Transform< float, 2, Affine > Affine2f
#define CALL_SUBTEST(FUNC)
Map< Matrix< T, Dynamic, Dynamic, ColMajor >, 0, OuterStride<> > matrix(T *data, int rows, int cols, int stride)
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x
Quaternion< float > Quaternionf