13 #include <Eigen/StdList> 14 #include <Eigen/Geometry> 28 template <
class Container,
class Position>
29 typename Container::iterator
get(Container &
c, Position
position)
31 typename Container::iterator it =
c.begin();
36 template <
class Container,
class Position,
class Value>
39 typename Container::iterator it =
c.begin();
44 template<
typename MatrixType>
49 MatrixType x = MatrixType::Random(rows,cols),
y = MatrixType::Random(rows,cols);
50 std::list<MatrixType>
v(10, MatrixType::Zero(rows,cols)),
w(20,
y);
51 typename std::list<MatrixType>::iterator itv =
get(
v, 5);
52 typename std::list<MatrixType>::iterator itw =
get(
w, 6);
59 for(
int i = 0;
i < 20;
i++)
77 for(
int i=0;
i<30 || ((ref==&(*
get(
w, 0))) &&
i<300); ++
i)
78 v.push_back(*
get(w,
i%w.size()));
79 for(
unsigned int i=23;
i<
v.size(); ++
i)
81 VERIFY((*
get(
v,
i))==(*
get(w, (
i-23)%w.size())));
85 template<
typename TransformType>
89 TransformType
x(MatrixType::Random()),
y(MatrixType::Random()), ti=TransformType::Identity();
90 std::list<TransformType>
v(10,ti),
w(20,
y);
91 typename std::list<TransformType>::iterator itv =
get(
v, 5);
92 typename std::list<TransformType>::iterator itw =
get(
w, 6);
99 for(
int i = 0;
i < 20;
i++)
116 TransformType*
ref = &(*
get(
w, 0));
117 for(
int i=0;
i<30 || ((ref==&(*
get(
w, 0))) &&
i<300); ++
i)
118 v.push_back(*
get(w,
i%w.size()));
119 for(
unsigned int i=23;
i<
v.size(); ++
i)
125 template<
typename QuaternionType>
128 typedef typename QuaternionType::Coefficients Coefficients;
129 QuaternionType
x(Coefficients::Random()),
y(Coefficients::Random()), qi=QuaternionType::Identity();
130 std::list<QuaternionType>
v(10,qi),
w(20,
y);
131 typename std::list<QuaternionType>::iterator itv =
get(
v, 5);
132 typename std::list<QuaternionType>::iterator itw =
get(
w, 6);
139 for(
int i = 0;
i < 20;
i++)
156 QuaternionType*
ref = &(*
get(
w, 0));
157 for(
int i=0;
i<30 || ((ref==&(*
get(
w, 0))) &&
i<300); ++
i)
158 v.push_back(*
get(w,
i%w.size()));
159 for(
unsigned int i=23;
i<
v.size(); ++
i)
161 VERIFY(
get(
v,
i)->coeffs()==
get(w, (
i-23)%w.size())->coeffs());
void check_stdlist_quaternion(const QuaternionType &)
#define CALL_SUBTEST_4(FUNC)
Transform< float, 3, Affine > Affine3f
#define CALL_SUBTEST_3(FUNC)
Quaternion< double > Quaterniond
#define VERIFY_IS_APPROX(a, b)
#define CALL_SUBTEST_1(FUNC)
void check_stdlist_matrix(const MatrixType &m)
Transform< double, 3, Affine > Affine3d
#define EIGEN_DEFINE_STL_LIST_SPECIALIZATION(...)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Array< int, Dynamic, 1 > v
void check_stdlist_transform(const TransformType &)
Reference counting helper.
Transform< float, 2, Affine > Affine2f
#define CALL_SUBTEST_5(FUNC)
The quaternion class used to represent 3D orientations and rotations.
#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
EIGEN_DECLARE_TEST(stdlist_overload)
Point3 position(const NavState &X, OptionalJacobian< 3, 9 > H)
Quaternion< float > Quaternionf