Go to the documentation of this file.
9 #ifndef CMatrixFixedNumeric_H
10 #define CMatrixFixedNumeric_H
33 template <
typename T,
size_t NROWS,
size_t NCOLS>
41 ( (NCOLS==1 && NROWS!=1) ? Eigen::ColMajor : Eigen::RowMajor )
45 typedef Eigen::Matrix<T,NROWS,NCOLS, Eigen::AutoAlign | ( (NCOLS==1 && NROWS!=1) ? Eigen::ColMajor : Eigen::RowMajor ) >
Base;
62 template<
size_t N,
typename ReturnType>
inline ReturnType
getVicinity(
size_t c,
size_t r)
const {
73 template <
typename Derived>
74 inline bool operator ==(
const Eigen::MatrixBase<Derived>& m2)
const
76 return Base::cols()==m2.cols() &&
77 Base::rows()==m2.rows() &&
78 Base::cwiseEqual(m2).all();
81 template <
typename Derived>
82 inline bool operator !=(
const Eigen::MatrixBase<Derived>& m2)
const {
return !((*this)==m2); }
99 mat.get_unsafe(r,c)=
t;
This huge template encapsulates a function to get the vicinity of an element, with maximum genericity...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
static void insertInContainer(CMatrixFixedNumeric< T, D, D > &mat, size_t r, size_t c, const T &t)
bool operator!=(const Eigen::MatrixBase< Derived > &m2) const
!= comparison of two matrices; it differs from default Eigen operator in that returns true if matrice...
const EIGEN_STRONG_INLINE AdjointReturnType t() const
Transpose.
CMatrixFixedNumeric< T, NROWS, NCOLS > mrpt_autotype
void loadFromArray(const T *vals)
The purpose of this class is to model traits for containers, so that they can be used as return value...
MRPT_EIGEN_DERIVED_CLASS_CTOR_OPERATOR_EQUAL(CMatrixFixedNumeric) inline CMatrixFixedNumeric()
Default constructor, initializes all elements to zero.
TConstructorFlags_Matrices
For usage in one of the constructors of CMatrixFixedNumeric or CMatrixTemplate (and derived classes),...
Eigen::Matrix< T, NROWS, NCOLS, Eigen::AutoAlign|((NCOLS==1 &&NROWS!=1) ? Eigen::ColMajor :Eigen::RowMajor) > Base
A numeric matrix of compile-time fixed size.
static void initialize(CMatrixFixedNumeric< T, D, D > &mat, size_t N)
bool operator==(const Eigen::MatrixBase< Derived > &m2) const
== comparison of two matrices; it differs from default Eigen operator in that returns false if matric...
#define MRPT_MATRIX_CONSTRUCTORS_FROM_POSES(_CLASS_)
CMatrixFixedNumeric(const T *vals)
Constructor from an array in row major.
std::string BASE_IMPEXP format(const char *fmt,...) MRPT_printf_format_check(1
A std::string version of C sprintf.
A template to obtain the type of its argument as a string at compile time.
CMatrixFixedNumeric(TConstructorFlags_Matrices)
Constructor which leaves the matrix uninitialized.
ReturnType getVicinity(size_t c, size_t r) const
Page generated by Doxygen 1.8.16 for MRPT 1.4.0 SVN: at Mon Oct 14 22:32:58 UTC 2019 | | |