3 #include <Eigen/Geometry> 24 template<
typename Transformation,
typename Data>
32 template<
typename Scalar,
typename Data>
36 for(
int i=0;
i<data.cols();++
i)
37 data.col(
i) = t * data.col(
i);
49 template<
typename QType,
typename Data>
57 template<
typename Scalar,
int Dim,
typename Data>
60 data = (t * data.colwise().homogeneous()).
template block<Dim,Data::ColsAtCompileTime>(0,0);
63 template<
typename T>
struct get_dim {
enum { Dim = T::Dim }; };
64 template<
typename S,
int R,
int C,
int O,
int MR,
int MC>
67 template<
typename Transformation,
int N>
78 cout << timer.
best() <<
" ";
83 template<
typename Transformation>
89 template<
typename Transformation>
97 int main(
int argc,
char ** argv)
118 bench(
"matrix 3x3", mat33);
119 bench(
"quaternion", quat);
120 bench(
"quat-mat ", quatmat);
121 bench(
"isometry3 ", iso3);
122 bench(
"affine3 ", aff3);
123 bench(
"c affine3 ", caff3);
124 bench(
"proj3 ", proj3);
Matrix< SCALARB, Dynamic, Dynamic, opt_B > B
static noiseModel::Isotropic::shared_ptr iso3
Matrix< RealScalar, Dynamic, Dynamic > M
Rot2 R(Rot2::fromAngle(0.1))
Namespace containing all symbols from the Eigen library.
#define EIGEN_ASM_COMMENT(X)
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
Matrix< SCALARA, Dynamic, Dynamic, opt_A > A
#define EIGEN_DONT_INLINE
int main(int argc, char **argv)
double best(int TIMER=CPU_TIMER) const
EIGEN_DONT_INLINE void transform(const Transformation &t, Data &data)
EIGEN_DONT_INLINE void bench(const std::string &msg, const Transformation &t)
EIGEN_DEVICE_FUNC QuaternionBase & setIdentity()
ToRotationMatrixWrapper(const T &o)
static EIGEN_DONT_INLINE void run(const Transformation &t)
The quaternion class used to represent 3D orientations and rotations.
NumTraits< Scalar >::Real RealScalar
#define BENCH(TIMER, TRIES, REP, CODE)
The matrix class, also used for vectors and row-vectors.
Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > & setRandom(Index size)
Matrix< Scalar, Dynamic, Dynamic > C