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(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());
90 std::vector<QuaternionType,Eigen::aligned_allocator<QuaternionType> >
v(10),
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;
void check_stdvector_transform(const TransformType &)
Quaternion< double > Quaterniond
void std_vector_gcc_warning()
void check_stdvector_matrix(const MatrixType &m)
#define VERIFY_IS_APPROX(a, b)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Eigen::Triplet< double > T
Transform< float, 2, Projective > Projective2f
Transform< float, 3, Projective > Projective3f
void check_stdvector_quaternion(const QuaternionType &)
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