Go to the documentation of this file.
12 #include <Eigen/Dense>
38 T, Eigen::Dynamic, Eigen::Dynamic,
42 Eigen::AutoAlign | Eigen::RowMajor>
45 using Base = Eigen::Matrix<
46 T, Eigen::Dynamic, Eigen::Dynamic, Eigen::AutoAlign | Eigen::RowMajor>;
76 for (
size_t i = 0; i < CMatrixTemplate<T>::rows(); i++)
77 for (
size_t j = 0; j < CMatrixTemplate<T>::cols(); j++)
78 Base::coeffRef(i, j) =
static_cast<T
>(m.
get_unsafe(i, j));
83 template <
typename Derived>
84 inline CMatrixTemplateNumeric<T>& operator=(
100 template <
typename V,
size_t N>
117 template <
typename Derived>
120 return Base::cols() == m2.cols() && Base::rows() == m2.rows() &&
121 Base::cwiseEqual(m2).all();
126 template <
typename Derived>
129 return !((*this) == m2);
151 #ifdef HAVE_LONG_DOUBLE
170 template <
typename T>
182 mat.get_unsafe(
r,
c) =
t;
191 template <
typename T>
constexpr bool operator!=(const TPoint2D &p1, const TPoint2D &p2)
Exact comparison between 2D points.
#define ASSERT_EQUAL_(__A, __B)
Assert comparing two values, reporting their actual values upon failure.
const T & get_unsafe(size_t row, size_t col) const
Fast but unsafe method to read a value from the matrix.
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.
size_t rows() const
Number of rows in the matrix.
A matrix of dynamic size.
GLdouble GLdouble GLdouble r
CMatrixTemplateNumeric(TConstructorFlags_Matrices)
Constructor that builds a 0x0 matrix (that is, uninitialized), for usage in places where efficiency i...
GLsizei GLsizei GLenum GLenum const GLvoid * data
The purpose of this class is to model traits for containers, so that they can be used as return value...
TConstructorFlags_Matrices
For usage in one of the constructors of CMatrixFixedNumeric or CMatrixTemplate (and derived classes),...
static void insertInContainer(CMatrixTemplateNumeric< T > &mat, size_t r, size_t c, const T &t)
static void initialize(CMatrixTemplateNumeric< T > &mat, size_t N)
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.
#define MRPT_EIGEN_DERIVED_CLASS_CTOR_OPERATOR_EQUAL(_CLASS_)
GLenum GLenum GLvoid * row
constexpr bool operator==(const TPoint2D &p1, const TPoint2D &p2)
Exact comparison between 2D points.
size_t cols() const
Number of columns in the matrix.
#define MRPT_MATRIX_CONSTRUCTORS_FROM_POSES(_CLASS_)
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::AutoAlign|Eigen::RowMajor > Base
void memcpy(void *dest, size_t destSize, const void *src, size_t copyCount) noexcept
An OS and compiler independent version of "memcpy".
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST | |