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