9 #ifndef CMatrixTemplateNumeric_H 10 #define CMatrixTemplateNumeric_H 38 :
public Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic,
42 Eigen::AutoAlign | Eigen::RowMajor>
45 typedef Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic,
46 Eigen::AutoAlign | Eigen::RowMajor>
81 Base::coeffRef(i, j) =
static_cast<T
>(m.
get_unsafe(i, j));
86 template <
typename Derived>
87 inline CMatrixTemplateNumeric<T>& operator=(
88 const Eigen::MatrixBase<Derived>& m)
const 103 template <
typename V,
size_t N>
120 template <
typename Derived>
121 inline bool operator==(
const Eigen::MatrixBase<Derived>& m2)
const 123 return Base::cols() == m2.cols() && Base::rows() == m2.rows() &&
124 Base::cwiseEqual(m2).all();
129 template <
typename Derived>
130 inline bool operator!=(
const Eigen::MatrixBase<Derived>& m2)
const 132 return !((*this) == m2);
154 #ifdef HAVE_LONG_DOUBLE 173 template <
typename T>
185 mat.get_unsafe(
r,
c) =
t;
195 template <
typename T>
#define ASSERT_EQUAL_(__A, __B)
const T & get_unsafe(size_t row, size_t col) const
Fast but unsafe method to read a value from the matrix.
bool operator==(const TPoint2D &p1, const TPoint2D &p2)
Exact comparison between 2D points.
TConstructorFlags_Matrices
For usage in one of the constructors of CMatrixFixedNumeric or CMatrixTemplate (and derived classes)...
#define MRPT_EIGEN_DERIVED_CLASS_CTOR_OPERATOR_EQUAL(_CLASS_)
A template to obtain the type of its argument as a string at compile time.
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::AutoAlign|Eigen::RowMajor > Base
bool operator!=(const TPoint2D &p1, const TPoint2D &p2)
Exact comparison between 2D points.
static void insertInContainer(CMatrixTemplateNumeric< T > &mat, size_t r, size_t c, const T &t)
CMatrixTemplateNumeric< T > mrpt_autotype
EIGEN_STRONG_INLINE size_t getColCount() const
Get number of columns.
The purpose of this class is to model traits for containers, so that they can be used as return value...
CMatrixTemplateNumeric< double > CMatrixDouble
Declares a matrix of double numbers (non serializable).
#define MRPT_MATRIX_CONSTRUCTORS_FROM_POSES(_CLASS_)
CMatrixTemplateNumeric< float > CMatrixFloat
Declares a matrix of float numbers (non serializable).
GLsizei const GLchar ** string
This template class provides the basic functionality for a general 2D any-size, resizable container o...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
CMatrixTemplateNumeric< unsigned int > CMatrixUInt
Declares a matrix of unsigned ints (non serializable).
GLdouble GLdouble GLdouble r
GLenum GLenum GLvoid * row
size_t getColCount() const
Number of columns in the matrix.
A matrix of dynamic size.
size_t getRowCount() const
Number of rows in the matrix.
CMatrixTemplateNumeric< double > CMatrixLongDouble
Declares a matrix of "long doubles" (non serializable), or of "doubles" if the compiler does not supp...
EIGEN_STRONG_INLINE size_t getRowCount() const
Get number of rows.
CMatrixTemplateNumeric(TConstructorFlags_Matrices)
Constructor that builds a 0x0 matrix (that is, uninitialized), for usage in places where efficiency i...
CMatrixTemplateNumeric(size_t row, size_t col)
Constructor, creates a matrix of the given size, filled with zeros.
CMatrixTemplateNumeric()
Default constructor, builds a 1x1 matrix.
GLsizei GLsizei GLenum GLenum const GLvoid * data
static void initialize(CMatrixTemplateNumeric< T > &mat, size_t N)
void memcpy(void *dest, size_t destSize, const void *src, size_t copyCount) noexcept
An OS and compiler independent version of "memcpy".