13 #include <Eigen/StdList> 14 #include <Eigen/Geometry> 28 template <class Container, class Position>
31 typename Container::iterator it = c.begin();
32 std::advance(it, position);
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);
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());
90 std::list<TransformType>
v(10),
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());
130 std::list<QuaternionType>
v(10),
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 &)
Transform< float, 3, Affine > Affine3f
void test_stdlist_overload()
Quaternion< double > Quaterniond
#define VERIFY_IS_APPROX(a, b)
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.
void check_stdlist_transform(const TransformType &)
Transform< float, 2, Affine > Affine2f
The quaternion class used to represent 3D orientations and rotations.
Container::iterator get(Container &c, Position position)
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
Point3 position(const NavState &X, OptionalJacobian< 3, 9 > H)
Quaternion< float > Quaternionf