16 #include <gtest/gtest.h> 23 TEST(Matrices, loadFromArray)
26 const double nums[3 * 4] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};
31 for (
int r = 0;
r < 3;
r++)
32 for (
int c = 0;
c < 4;
c++) EXPECT_EQ(nums[4 *
r +
c], mat(
r,
c));
36 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};
38 TEST(Matrices, CMatrixFixedNumeric_loadWithEigenMap)
45 for (
int r = 0;
r < 3;
r++)
49 TEST(Matrices, EigenMatrix_loadWithEigenMap)
52 const Eigen::Matrix<double, 3, 4> mat =
55 for (
int r = 0;
r < 3;
r++)
A namespace of pseudo-random numbers generators of diferent distributions.
#define MRPT_MAX_ALIGN_BYTES
static double test_nums[3 *4]
A numeric matrix of compile-time fixed size.
This base provides a set of functions for maths stuff.
void loadFromArray(const T *vals)
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
GLdouble GLdouble GLdouble r
TEST(Matrices, loadFromArray)