19 #include <gtest/gtest.h>
28 #define CHECK_AND_RET_ERROR(_COND_,_MSG_) EXPECT_FALSE(_COND_) << _MSG_;
34 EXPECT_TRUE( (M.array() == 0).all() );
38 EXPECT_TRUE( (M.array() == 0).all() );
43 EXPECT_TRUE( (M.array() == 0).all() );
48 EXPECT_TRUE( (M.array() == 0).all() );
53 EXPECT_TRUE( (M.array() == 0).all() );
58 EXPECT_TRUE( (M.array() == 0).all() );
63 EXPECT_TRUE( (M.array() == 0).all() );
70 const double vals[] = {
72 8,9,10,11,12,13,14,15,
74 8,9,10,11,12,13,14,15,
76 8,9,10,11,12,13,14,15,
78 8,9,10,11,12,13,14,15 };
81 std::vector<size_t> vs;
86 M.extractSubmatrixSymmetricalBlocks(2,vs,E);
88 const double valsE[] = {
95 EXPECT_TRUE( E_expected == E );
102 const double vals[] = {
104 8,9,10,11,12,13,14,15,
106 8,9,10,11,12,13,14,15,
108 8,9,10,11,12,13,14,15,
110 8,9,10,11,12,13,14,15 };
113 std::vector<size_t> vs;
120 M.extractSubmatrixSymmetrical(vs,E);
122 const double valsE[] = {
129 EXPECT_TRUE( E_expected == E );
A numeric matrix of compile-time fixed size.
EIGEN_STRONG_INLINE void setSize(size_t row, size_t col)
Changes the size of matrix, maintaining its previous content as possible and padding with zeros where...
void extractSubmatrixSymmetricalBlocks(const size_t block_size, const std::vector< size_t > &block_indices, MATRIX &out) const
Get a submatrix from a square matrix, by collecting the elements M(idxs,idxs), where idxs is a sequen...
void extractSubmatrixSymmetrical(const std::vector< size_t > &indices, MATRIX &out) const
Get a submatrix from a square matrix, by collecting the elements M(idxs,idxs), where idxs is the sequ...
This base provides a set of functions for maths stuff.
A namespace of pseudo-random numbers genrators of diferent distributions.
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values,...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.