39 template <
typename T,
size_t NROWS,
size_t NCOLS>
41 :
public Eigen::Matrix<
46 ((NCOLS == 1 && NROWS != 1) ? Eigen::ColMajor : Eigen::RowMajor)>
49 using Base = Eigen::Matrix<
52 ((NCOLS == 1 && NROWS != 1) ? Eigen::ColMajor : Eigen::RowMajor)>;
68 template <
size_t N,
typename ReturnType>
85 template <
typename Derived>
88 return Base::cols() == m2.cols() && Base::rows() == m2.rows() &&
89 Base::cwiseEqual(m2).all();
94 template <
typename Derived>
97 return !((*this) == m2);
107 template <
typename T,
size_t D>
119 mat.get_unsafe(
r,
c) =
t;
129 template <
typename T,
size_t N,
size_t M>
132 constexpr
static auto get()
A numeric matrix of compile-time fixed size.
Eigen::Matrix< T, NROWS, NCOLS, Eigen::AutoAlign|((NCOLS==1 &&NROWS !=1) ? Eigen::ColMajor :Eigen::RowMajor)> Base
CMatrixFixedNumeric(TConstructorFlags_Matrices)
Constructor which leaves the matrix uninitialized.
void loadFromArray(const T *vals)
CMatrixFixedNumeric(const T *vals)
Constructor from an array in row major.
MRPT_EIGEN_DERIVED_CLASS_CTOR_OPERATOR_EQUAL(CMatrixFixedNumeric) inline CMatrixFixedNumeric()
Default constructor, initializes all elements to zero.
bool operator!=(const Eigen::MatrixBase< Derived > &m2) const
!= comparison of two matrices; it differs from default Eigen operator in that returns true if matrice...
bool operator==(const Eigen::MatrixBase< Derived > &m2) const
== comparison of two matrices; it differs from default Eigen operator in that returns false if matric...
ReturnType getVicinity(size_t c, size_t r) const
static void initialize(CMatrixFixedNumeric< T, D, D > &mat, size_t N)
static void insertInContainer(CMatrixFixedNumeric< T, D, D > &mat, size_t r, size_t c, const T &t)
The purpose of this class is to model traits for containers, so that they can be used as return value...
#define ASSERT_(f)
Defines an assertion mechanism.
GLdouble GLdouble GLdouble r
#define MRPT_MATRIX_CONSTRUCTORS_FROM_POSES(_CLASS_)
TConstructorFlags_Matrices
For usage in one of the constructors of CMatrixFixedNumeric or CMatrixTemplate (and derived classes),...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
This huge template encapsulates a function to get the vicinity of an element, with maximum genericity...