11 #include <Eigen/StdVector> 12 #include <Eigen/Geometry> 14 template<
typename MatrixType>
19 MatrixType x = MatrixType::Random(rows,cols),
y = MatrixType::Random(rows,cols);
20 std::vector<MatrixType,Eigen::aligned_allocator<MatrixType> >
v(10, MatrixType::Zero(rows,cols)),
w(20,
y);
25 for(
int i = 0;
i < 20;
i++)
42 for(
int i=0;
i<30 || ((ref==&w[0]) &&
i<300); ++
i)
43 v.push_back(w[
i%w.size()]);
44 for(
unsigned int i=23;
i<
v.size(); ++
i)
50 template<
typename TransformType>
54 TransformType
x(MatrixType::Random()),
y(MatrixType::Random());
55 std::vector<TransformType,Eigen::aligned_allocator<TransformType> >
v(10),
w(20, y);
60 for(
int i = 0;
i < 20;
i++)
76 TransformType*
ref = &w[0];
77 for(
int i=0;
i<30 || ((ref==&w[0]) &&
i<300); ++
i)
78 v.push_back(w[
i%w.size()]);
79 for(
unsigned int i=23;
i<
v.size(); ++
i)
85 template<
typename QuaternionType>
88 typedef typename QuaternionType::Coefficients Coefficients;
89 QuaternionType
x(Coefficients::Random()),
y(Coefficients::Random()), qi=QuaternionType::Identity();
90 std::vector<QuaternionType,Eigen::aligned_allocator<QuaternionType> >
v(10,qi),
w(20,
y);
95 for(
int i = 0;
i < 20;
i++)
111 QuaternionType*
ref = &w[0];
112 for(
int i=0;
i<30 || ((ref==&w[0]) &&
i<300); ++
i)
113 v.push_back(w[
i%w.size()]);
114 for(
unsigned int i=23;
i<
v.size(); ++
i)
116 VERIFY(
v[
i].coeffs()==w[(
i-23)%w.size()].coeffs());
125 typedef Eigen::Vector3f
T;
126 std::vector<T, Eigen::aligned_allocator<T> >
v;
#define CALL_SUBTEST_4(FUNC)
void check_stdvector_transform(const TransformType &)
#define CALL_SUBTEST_3(FUNC)
Quaternion< double > Quaterniond
EIGEN_DECLARE_TEST(stdvector)
void std_vector_gcc_warning()
void check_stdvector_matrix(const MatrixType &m)
#define VERIFY_IS_APPROX(a, b)
#define CALL_SUBTEST_1(FUNC)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Array< int, Dynamic, 1 > v
Eigen::Triplet< double > T
Transform< float, 2, Projective > Projective2f
Reference counting helper.
Transform< float, 3, Projective > Projective3f
void check_stdvector_quaternion(const QuaternionType &)
#define CALL_SUBTEST_5(FUNC)
#define CALL_SUBTEST_2(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
Transform< double, 3, Projective > Projective3d