MRPT  2.0.4
List of all members | Public Member Functions | Static Public Member Functions | Private Types
mrpt::math::CQuaternion< T > Class Template Reference

Detailed Description

template<class T>
class mrpt::math::CQuaternion< T >

A quaternion, which can represent a 3D rotation as pair $ (r,\mathbf{u}) *$, with a real part "r" and a 3D vector $ \mathbf{u} = (x,y,z) $, or alternatively, q = r + ix + jy + kz.

The elements of the quaternion can be accessed by either:

Users will usually employ the type CQuaternionDouble instead of this template.

For more information about quaternions, see:

See also
mrpt::poses::CPose3D

Definition at line 44 of file CQuaternion.h.

#include <mrpt/math/CQuaternion.h>

Inheritance diagram for mrpt::math::CQuaternion< T >:

Public Member Functions

void ensurePositiveRealPart ()
 Adhere to the convention of w>=0 to avoid ambiguity of quaternion double cover of SO(3) More...
 
r () const
 Return r (real part) coordinate of the quaternion. More...
 
w () const
 Return w (real part) coordinate of the quaternion. More...
 
x () const
 Return x coordinate of the quaternion. More...
 
y () const
 Return y coordinate of the quaternion. More...
 
z () const
 Return z coordinate of the quaternion. More...
 
void r (const T r)
 Set r (real part) coordinate of the quaternion. More...
 
void w (const T w)
 Set w (real part) coordinate of the quaternion. More...
 
void x (const T x)
 Set x coordinate of the quaternion. More...
 
void y (const T y)
 Set y coordinate of the quaternion. More...
 
void z (const T z)
 Set z coordinate of the quaternion. More...
 
T & r ()
 
T & x ()
 
T & y ()
 
T & z ()
 
template<class ARRAYLIKE3 >
void fromRodriguesVector (const ARRAYLIKE3 &v)
 Set this quaternion to the rotation described by a 3D (Rodrigues) rotation vector $ \mathbf{v} $: If $ \mathbf{v}=0 $, then the quaternion is $ \mathbf{q} = [1 ~ 0 ~ 0 ~ 0]^\top $, otherwise:

\[ \mathbf{q} = \left[ \begin{array}{c} \cos(\frac{\theta}{2}) \\ v_x \frac{\sin(\frac{\theta}{2})}{\theta} \\ v_y \frac{\sin(\frac{\theta}{2})}{\theta} \\ v_z \frac{\sin(\frac{\theta}{2})}{\theta} \end{array} \right] \]

where $ \theta = |\mathbf{v}| = \sqrt{v_x^2+v_y^2+v_z^2} $. More...

 
void crossProduct (const CQuaternion &q1, const CQuaternion &q2)
 Calculate the "cross" product (or "composed rotation") of two quaternion: this = q1 x q2 After the operation, "this" will represent the composed rotations of q1 and q2 (q2 applied "after" q1). More...
 
void rotatePoint (const double lx, const double ly, const double lz, double &gx, double &gy, double &gz) const
 Rotate a 3D point (lx,ly,lz) -> (gx,gy,gz) as described by this quaternion. More...
 
void inverseRotatePoint (const double lx, const double ly, const double lz, double &gx, double &gy, double &gz) const
 Rotate a 3D point (lx,ly,lz) -> (gx,gy,gz) as described by the inverse (conjugate) of this quaternion. More...
 
double normSqr () const
 Return the squared norm of the quaternion. More...
 
void normalize ()
 Normalize this quaternion, so its norm becomes the unitity. More...
 
template<class MATRIXLIKE >
void normalizationJacobian (MATRIXLIKE &J) const
 Calculate the 4x4 Jacobian of the normalization operation of this quaternion. More...
 
template<class MATRIXLIKE >
void rotationJacobian (MATRIXLIKE &J) const
 Compute the Jacobian of the rotation composition operation $ p = f(\cdot) = q_{this} \times r $, that is the 4x4 matrix $ \frac{\partial f}{\partial q_{this} } $. More...
 
template<class MATRIXLIKE >
void rotationMatrix (MATRIXLIKE &M) const
 Calculate the 3x3 rotation matrix associated to this quaternion:

\[ \mathbf{R} = \left( \begin{array}{ccc} q_r^2+q_x^2-q_y^2-q_z^2 & 2(q_x q_y - q_r q_z) & 2(q_z q_x+q_r q_y) \\ 2(q_x q_y+q_r q_z) & q_r^2-q_x^2+q_y^2-q_z^2 & 2(q_y q_z-q_r q_x) \\ 2(q_z q_x-q_r q_y) & 2(q_y q_z+q_r q_x) & q_r^2- q_x^2 - q_y^2 + q_z^2 \end{array} \right)\]

. More...

 
template<class MATRIXLIKE >
MATRIXLIKE rotationMatrix () const
 
template<class MATRIXLIKE >
void rotationMatrixNoResize (MATRIXLIKE &M) const
 Fill out the top-left 3x3 block of the given matrix with the rotation matrix associated to this quaternion (does not resize the matrix, for that, see rotationMatrix). More...
 
void conj (CQuaternion &q_out) const
 Return the conjugate quaternion. More...
 
CQuaternion conj () const
 Return the conjugate quaternion. More...
 
void rpy (T &roll, T &pitch, T &yaw) const
 Return the yaw, pitch & roll angles associated to quaternion. More...
 
template<class MATRIXLIKE >
void rpy_and_jacobian (T &roll, T &pitch, T &yaw, MATRIXLIKE *out_dr_dq=nullptr, bool resize_out_dr_dq_to3x4=true) const
 Return the yaw, pitch & roll angles associated to quaternion, and (optionally) the 3x4 Jacobian of the transformation. More...
 
CQuaternion operator* (const T &factor)
 
CMatrixFixed< T, ROWS, COLS > & mbDerived ()
 
const CMatrixFixed< T, ROWS, COLS > & mbDerived () const
 
void setDiagonal (const std::size_t N, const T value)
 Resize to NxN, set all entries to zero, except the main diagonal which is set to value More...
 
void setDiagonal (const T value)
 Set all entries to zero, except the main diagonal which is set to value More...
 
void setDiagonal (const std::vector< T > &diags)
 Resizes to NxN, with N the length of the input vector, set all entries to zero, except the main diagonal which is set to values in the vector. More...
 
void setIdentity ()
 
void setIdentity (const std::size_t N)
 
void matProductOf_AB (const CMatrixFixed< T, ROWS, COLS > &A, const CMatrixFixed< T, ROWS, COLS > &B)
 this = A*B, with A & B of the same type of this. More...
 
CMatrixFixed< T, ROWS, COLS > & mvbDerived ()
 
const CMatrixFixed< T, ROWS, COLS > & mvbDerived () const
 
 CQuaternion (TConstructorFlags_Quaternions)
 Can be used with UNINITIALIZED_QUATERNION as argument, does not initialize the 4 elements of the quaternion (use this constructor when speed is critical). More...
 
 CQuaternion ()
 Default constructor: construct a (1, (0,0,0) ) quaternion representing no rotation. More...
 
 CQuaternion (const T R, const T X, const T Y, const T Z)
 Construct a quaternion from its parameters 'r', 'x', 'y', 'z', with q = r + ix + jy + kz. More...
 
Constructors, assignment operators, initializers
template<class MAT >
void setFromMatrixLike (const MAT &m)
 
template<typename VECTOR >
void loadFromArray (const VECTOR &vals)
 
void loadFromRawPointer (const T *data)
 Initializes from a plain buffer with RowMajor values. More...
 
void setSize (size_t row, size_t col, [[maybe_unused]] bool zeroNewElements=false)
 Throws if size does not match with the fixed matrix size. More...
 
void swap (CMatrixFixed &o)
 
CMatrixFixedderived ()
 
const CMatrixFixedderived () const
 
void conservativeResize (size_t row, size_t col)
 
void resize (size_t n)
 
void resize (const matrix_size_t &siz, [[maybe_unused]] bool zeroNewElements=false)
 Throws if size does not match with the fixed matrix size. More...
 
void resize (size_t row, size_t col)
 
constexpr size_type rows () const
 Number of rows in the matrix. More...
 
constexpr size_type cols () const
 Number of columns in the matrix. More...
 
constexpr matrix_size_t size () const
 Get a 2-vector with [NROWS NCOLS] (as in MATLAB command size(x)) More...
 
Matrix element access & modifiers
template<typename EIGEN_MATRIX = eigen_t, typename EIGEN_MAP = Eigen::Map< EIGEN_MATRIX, MRPT_MAX_STATIC_ALIGN_BYTES, Eigen::InnerStride<1>>>
EIGEN_MAP asEigen ()
 Get as an Eigen-compatible Eigen::Map object. More...
 
template<typename EIGEN_MATRIX = eigen_t, typename EIGEN_MAP = Eigen::Map< const EIGEN_MATRIX, MRPT_MAX_STATIC_ALIGN_BYTES, Eigen::InnerStride<1>>>
EIGEN_MAP asEigen () const
 
const T * data () const
 Return raw pointer to row-major data buffer. More...
 
T * data ()
 
T & operator() (int row, int col)
 Access (row,col), without out-of-bounds check (except in Debug builds) More...
 
const T & operator() (int row, int col) const
 
T & operator() (int i)
 Access the i-th element, Row-Major order, without out-of-bounds check (except in Debug builds) More...
 
const T & operator() (int i) const
 
T & operator[] (int i)
 Access the [i-th] element (for 1xN or Nx1 matrices) More...
 
const T & operator[] (int i) const
 
CMatrixFixed< float, ROWS, COLS > cast_float () const
 
CMatrixFixed< double, ROWS, COLS > cast_double () const
 
CMatrixFixed< T, ROWS, 1 > llt_solve (const CMatrixFixed< T, ROWS, 1 > &b) const
 Solves the linear system Ax=b, returns x, with A this symmetric matrix. More...
 
CMatrixFixed< T, ROWS, 1 > lu_solve (const CMatrixFixed< T, ROWS, 1 > &b) const
 Solves the linear system Ax=b, returns x, with A this asymmetric matrix. More...
 
void sum_At (const CMatrixFixed< Scalar, ROWS, COLS > &A)
 this += AT More...
 
Operations that DO require `#include <Eigen/Dense>` in user code
auto col (int colIdx)
 
auto col (int colIdx) const
 
auto row (int rowIdx)
 
auto row (int rowIdx) const
 
void extractRow (int rowIdx, VECTOR_LIKE &v) const
 
VECTOR_LIKE extractRow (int rowIdx) const
 
void extractColumn (int colIdx, VECTOR_LIKE &v) const
 
VECTOR_LIKE extractColumn (int colIdx) const
 
Standalone operations (do NOT require `#include <Eigen/Dense>`)
det () const
 Determinant of matrix. More...
 
CMatrixFixed< T, ROWS, COLS > inverse () const
 Returns the inverse of a general matrix using LU. More...
 
CMatrixFixed< T, ROWS, COLS > inverse_LLt () const
 Returns the inverse of a symmetric matrix using LLt. More...
 
int rank (T threshold=0) const
 Finds the rank of the matrix via LU decomposition. More...
 
bool chol (CMatrixFixed< T, ROWS, COLS > &U) const
 Cholesky M=UT * U decomposition for symmetric matrix (upper-half of the matrix is actually ignored. More...
 
bool eig (CMatrixFixed< T, ROWS, COLS > &eVecs, std::vector< T > &eVals, bool sorted=true) const
 Computes the eigenvectors and eigenvalues for a square, general matrix. More...
 
bool eig_symmetric (CMatrixFixed< T, ROWS, COLS > &eVecs, std::vector< T > &eVals, bool sorted=true) const
 Read: eig() More...
 
maximumDiagonal () const
 Returns the maximum value in the diagonal. More...
 
minimumDiagonal () const
 Returns the minimum value in the diagonal. More...
 
trace () const
 Returns the trace of the matrix (not necessarily square). More...
 
void unsafeRemoveColumns (const std::vector< std::size_t > &idxs)
 Removes columns of the matrix. More...
 
void removeColumns (const std::vector< std::size_t > &idxsToRemove)
 Removes columns of the matrix. More...
 
void unsafeRemoveRows (const std::vector< std::size_t > &idxs)
 Removes rows of the matrix. More...
 
void removeRows (const std::vector< std::size_t > &idxsToRemove)
 Removes rows of the matrix. More...
 
void insertMatrix (const int row_start, const int col_start, const OTHERMATVEC &submat)
 Copies the given input submatrix/vector into this matrix/vector, starting at the given top-left coordinates. More...
 
void insertMatrixTransposed (const int row_start, const int col_start, const OTHERMATVEC &submat)
 Like insertMatrix(), but inserts ‘submat’` (transposed) More...
 
CMatrixFixed< T, BLOCK_ROWS, BLOCK_COLS > blockCopy (int start_row=0, int start_col=0) const
 const blockCopy(): Returns a copy of the given block More...
 
CMatrixDynamic< T > blockCopy (int start_row, int start_col, int BLOCK_ROWS, int BLOCK_COLS) const
 const blockCopy(): Returns a copy of the given block (non templated version, dynamic sizes) More...
 
CMatrixFixed< T, BLOCK_ROWS, BLOCK_COLS > extractMatrix (const int start_row=0, const int start_col=0) const
 
CMatrixDynamic< T > extractMatrix (const int BLOCK_ROWS, const int BLOCK_COLS, const int start_row, const int start_col) const
 
void matProductOf_AAt (const MAT_A &A)
 this = A * AT More...
 
void matProductOf_AtA (const MAT_A &A)
 this = AT * A More...
 
Operations that DO require `#include <Eigen/Dense>` in user code
auto block (int start_row, int start_col)
 non-const block(): Returns an Eigen::Block reference to the block More...
 
auto block (int start_row, int start_col, int BLOCK_ROWS, int BLOCK_COLS)
 
auto block (int start_row, int start_col, int BLOCK_ROWS, int BLOCK_COLS) const
 
auto transpose ()
 
auto transpose () const
 
auto array ()
 
auto array () const
 
auto operator- () const
 
auto operator- (const MatrixVectorBase< S2, D2 > &m2) const
 
auto operator+ (const MatrixVectorBase< S2, D2 > &m2) const
 
void operator+= (const MatrixVectorBase< S2, D2 > &m2)
 
void operator-= (const MatrixVectorBase< S2, D2 > &m2)
 
auto operator* (const MatrixVectorBase< S2, D2 > &m2) const
 
auto operator* (const T s) const
 
CMatrixFixed< T, N, 1 > tail () const
 
CMatrixFixed< T, N, 1 > head () const
 
Standalone operations (do NOT require `#include <Eigen/Dense>`)
CMatrixFixed< T, ROWS, COLS > operator- (const CMatrixFixed< T, ROWS, COLS > &m2) const
 
CMatrixFixed< T, ROWS, COLS > operator+ (const CMatrixFixed< T, ROWS, COLS > &m2) const
 
void operator+= (T s)
 
void operator+= (const CMatrixFixed< T, ROWS, COLS > &m2)
 
void operator-= (T s)
 
void operator-= (const CMatrixFixed< T, ROWS, COLS > &m2)
 
CMatrixDynamic< T > operator* (const CMatrixDynamic< T > &v)
 
CMatrixFixed< T, ROWS, COLS > operator* (const CMatrixFixed< T, ROWS, COLS > &m2) const
 
T & coeffRef (int r, int c)
 
const T & coeff (int r, int c) const
 
minCoeff () const
 Minimum value in the matrix/vector. More...
 
minCoeff (std::size_t &outIndexOfMin) const
 
minCoeff (std::size_t &rowIdx, std::size_t &colIdx) const
 
maxCoeff () const
 Maximum value in the matrix/vector. More...
 
maxCoeff (std::size_t &outIndexOfMax) const
 
maxCoeff (std::size_t &rowIdx, std::size_t &colIdx) const
 
bool isSquare () const
 returns true if matrix is NxN More...
 
bool empty () const
 returns true if matrix/vector has size=0 More...
 
norm_inf () const
 Compute the norm-infinite of a vector ($f[ ||{v}||_ $f]), ie the maximum absolute value of the elements. More...
 
norm () const
 Compute the L2 norm of a vector/array/matrix (the Euclidean distance to the origin, taking all the elements as a single vector). More...
 
void operator*= (T s)
 
dot (const CVectorDynamic< T > &v) const
 dot product of this \cdot v More...
 
dot (const MatrixVectorBase< T, CMatrixFixed< T, ROWS, COLS > > &v) const
 
void matProductOf_Ab (const CMatrixDynamic< T > &A, const CVectorDynamic< T > &b)
 this = A * b , with A and b a dynamic matrix & vector More...
 
void matProductOf_Atb (const CMatrixDynamic< T > &A, const CVectorDynamic< T > &b)
 this = AT * b , with A and b a dynamic matrix & vector More...
 
sum () const
 Sum of all elements in matrix/vector. More...
 
sum_abs () const
 Sum of the absolute value of all elements in matrix/vector. More...
 
std::string asString () const
 Returns a string representation of the vector/matrix, using Eigen's default settings. More...
 
bool fromMatlabStringFormat (const std::string &s, mrpt::optional_ref< std::ostream > dump_errors_here=std::nullopt)
 Reads a matrix from a string in Matlab-like format, for example: "[1 0 2; 0 4 -1]" The string must start with '[' and end with ']'. More...
 
std::string inMatlabFormat (const std::size_t decimal_digits=6) const
 Exports the matrix as a string compatible with Matlab/Octave. More...
 
void saveToTextFile (const std::string &file, mrpt::math::TMatrixTextFileFormat fileFormat=mrpt::math::MATRIX_FORMAT_ENG, bool appendMRPTHeader=false, const std::string &userHeader=std::string()) const
 Saves the vector/matrix to a file compatible with MATLAB/Octave text format. More...
 
void loadFromTextFile (std::istream &f)
 Loads a vector/matrix from a text file, compatible with MATLAB text format. More...
 
void loadFromTextFile (const std::string &file)
 
bool operator== (const OTHERMATVEC &o) const
 
bool operator!= (const OTHERMATVEC &o) const
 

Static Public Member Functions

static CMatrixFixed< T, ROWS, COLS > Identity ()
 
static CMatrixFixed< T, ROWS, COLS > Identity (const std::size_t N)
 

Private Types

using Base = CVectorFixed< T, 4 >
 

Matrix type definitions

using value_type = T
 The type of the matrix elements. More...
 
using Scalar = T
 
using Index = int
 
using reference = T &
 
using const_reference = const T &
 
using size_type = int
 
using difference_type = std::ptrdiff_t
 
using eigen_t = Eigen::Matrix< T, ROWS, COLS, StorageOrder, ROWS, COLS >
 
static constexpr int RowsAtCompileTime = ROWS
 
static constexpr int ColsAtCompileTime = COLS
 
static constexpr int SizeAtCompileTime = ROWS * COLS
 
static constexpr int is_mrpt_type = 1
 
static constexpr int StorageOrder
 

Iterators interface

iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
using iterator = typename vec_t::iterator
 
using const_iterator = typename vec_t::const_iterator
 

Lie Algebra methods

template<class ARRAYLIKE3 >
void ln (ARRAYLIKE3 &out_ln) const
 Logarithm of the 3x3 matrix defined by this pose, generating the corresponding vector in the SO(3) Lie Algebra, which coincides with the so-called "rotation vector" (I don't have space here for the proof ;-). More...
 
template<class ARRAYLIKE3 >
ARRAYLIKE3 ln () const
 overload that returns by value More...
 
template<class ARRAYLIKE3 >
void ln_noresize (ARRAYLIKE3 &out_ln) const
 Like ln() but does not try to resize the output vector. More...
 
template<class ARRAYLIKE3 >
static CQuaternion< T > exp (const ARRAYLIKE3 &v)
 Exponential map from the SO(3) Lie Algebra to unit quaternions. More...
 
template<class ARRAYLIKE3 >
static void exp (const ARRAYLIKE3 &v, CQuaternion< T > &out_quat)
 

Initialization methods

void fill (const T &val)
 
void setConstant (const T value)
 
void setConstant (size_t nrows, size_t ncols, const T value)
 
void setConstant (size_t nrows, const T value)
 
void assign (const std::size_t N, const T value)
 
void setZero ()
 
void setZero (size_t nrows, size_t ncols)
 
void setZero (size_t nrows)
 
static CMatrixFixed< T, ROWS, COLS > Constant (const T value)
 
static CMatrixFixed< T, ROWS, COLS > Constant (size_t nrows, size_t ncols, const T value)
 
static CMatrixFixed< T, ROWS, COLS > Zero ()
 
static CMatrixFixed< T, ROWS, COLS > Zero (size_t nrows, size_t ncols)
 

Member Typedef Documentation

◆ Base

template<class T>
using mrpt::math::CQuaternion< T >::Base = CVectorFixed<T, 4>
private

Definition at line 46 of file CQuaternion.h.

◆ const_iterator

template<typename T, std::size_t ROWS, std::size_t COLS>
using mrpt::math::CMatrixFixed< T, ROWS, COLS >::const_iterator = typename vec_t::const_iterator
inherited

Definition at line 63 of file CMatrixFixed.h.

◆ const_reference

template<typename T, std::size_t ROWS, std::size_t COLS>
using mrpt::math::CMatrixFixed< T, ROWS, COLS >::const_reference = const T&
inherited

Definition at line 48 of file CMatrixFixed.h.

◆ difference_type

template<typename T, std::size_t ROWS, std::size_t COLS>
using mrpt::math::CMatrixFixed< T, ROWS, COLS >::difference_type = std::ptrdiff_t
inherited

Definition at line 50 of file CMatrixFixed.h.

◆ eigen_t

template<typename T, std::size_t ROWS, std::size_t COLS>
using mrpt::math::CMatrixFixed< T, ROWS, COLS >::eigen_t = Eigen::Matrix<T, ROWS, COLS, StorageOrder, ROWS, COLS>
inherited

Definition at line 57 of file CMatrixFixed.h.

◆ Index

template<typename T, std::size_t ROWS, std::size_t COLS>
using mrpt::math::CMatrixFixed< T, ROWS, COLS >::Index = int
inherited

Definition at line 46 of file CMatrixFixed.h.

◆ iterator

template<typename T, std::size_t ROWS, std::size_t COLS>
using mrpt::math::CMatrixFixed< T, ROWS, COLS >::iterator = typename vec_t::iterator
inherited

Definition at line 62 of file CMatrixFixed.h.

◆ reference

template<typename T, std::size_t ROWS, std::size_t COLS>
using mrpt::math::CMatrixFixed< T, ROWS, COLS >::reference = T&
inherited

Definition at line 47 of file CMatrixFixed.h.

◆ Scalar

template<typename T, std::size_t ROWS, std::size_t COLS>
using mrpt::math::CMatrixFixed< T, ROWS, COLS >::Scalar = T
inherited

Definition at line 45 of file CMatrixFixed.h.

◆ size_type

template<typename T, std::size_t ROWS, std::size_t COLS>
using mrpt::math::CMatrixFixed< T, ROWS, COLS >::size_type = int
inherited

Definition at line 49 of file CMatrixFixed.h.

◆ value_type

template<typename T, std::size_t ROWS, std::size_t COLS>
using mrpt::math::CMatrixFixed< T, ROWS, COLS >::value_type = T
inherited

The type of the matrix elements.

Definition at line 44 of file CMatrixFixed.h.

Constructor & Destructor Documentation

◆ CQuaternion() [1/3]

Can be used with UNINITIALIZED_QUATERNION as argument, does not initialize the 4 elements of the quaternion (use this constructor when speed is critical).

Definition at line 55 of file CQuaternion.h.

◆ CQuaternion() [2/3]

template<class T>
mrpt::math::CQuaternion< T >::CQuaternion ( )
inline

Default constructor: construct a (1, (0,0,0) ) quaternion representing no rotation.

Definition at line 58 of file CQuaternion.h.

References mrpt::math::CQuaternion< T >::r(), mrpt::math::CQuaternion< T >::x(), mrpt::math::CQuaternion< T >::y(), and mrpt::math::CQuaternion< T >::z().

Here is the call graph for this function:

◆ CQuaternion() [3/3]

template<class T>
mrpt::math::CQuaternion< T >::CQuaternion ( const T  R,
const T  X,
const T  Y,
const T  Z 
)
inline

Construct a quaternion from its parameters 'r', 'x', 'y', 'z', with q = r + ix + jy + kz.

Definition at line 68 of file CQuaternion.h.

References ASSERTMSG_, mrpt::math::CQuaternion< T >::ensurePositiveRealPart(), mrpt::format(), mrpt::math::CQuaternion< T >::normSqr(), mrpt::math::CQuaternion< T >::r(), R, mrpt::math::CQuaternion< T >::x(), mrpt::math::CQuaternion< T >::y(), and mrpt::math::CQuaternion< T >::z().

Here is the call graph for this function:

Member Function Documentation

◆ array() [1/2]

auto mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::array ( )
inlineinherited

◆ array() [2/2]

auto mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::array ( ) const
inlineinherited

◆ asEigen() [1/2]

template<typename T, std::size_t ROWS, std::size_t COLS>
template<typename EIGEN_MATRIX = eigen_t, typename EIGEN_MAP = Eigen::Map< EIGEN_MATRIX, MRPT_MAX_STATIC_ALIGN_BYTES, Eigen::InnerStride<1>>>
EIGEN_MAP mrpt::math::CMatrixFixed< T, ROWS, COLS >::asEigen ( )
inlineinherited

Get as an Eigen-compatible Eigen::Map object.

Definition at line 251 of file CMatrixFixed.h.

Referenced by mrpt::opengl::TRenderMatrices::applyLookAt(), mrpt::poses::CPoint2DPDFGaussian::bayesianFusion(), mrpt::poses::CPointPDFGaussian::bayesianFusion(), mrpt::poses::CPosePDFGaussian::bayesianFusion(), mrpt::poses::CPointPDFSOG::bayesianFusion(), mrpt::poses::CPosePDFSOG::bayesianFusion(), mrpt::math::CMatrixFixed< double, ObsDim, PointDof >::cast_double(), mrpt::math::CMatrixFixed< double, ObsDim, PointDof >::cast_float(), mrpt::poses::CPoint2DPDFGaussian::changeCoordinatesReference(), mrpt::poses::CPointPDFGaussian::changeCoordinatesReference(), Pose3DTests::check_jacob_expe_e_at_0(), mrpt::poses::CPose3DQuat::composePoint(), mrpt::math::TPose3D::composePose(), mrpt::poses::CPose3DPDFGaussian::copyFrom(), mrpt::img::CCanvas::ellipseGaussian(), mrpt::opengl::enqueForRendering(), mrpt::vision::CDifodo::filterLevelSolution(), SE_traits_tests< POSE_TYPE >::func_numeric_DinvP1InvP2(), mrpt::poses::CPose3D::getHomogeneousMatrix(), mrpt::slam::CICP::ICP_Method_LM(), mrpt::maps::CBeaconMap::internal_computeObservationLikelihood(), mrpt::maps::CBeaconMap::internal_insertObservation(), mrpt::poses::CPose3DQuatPDFGaussian::inverse(), mrpt::poses::CPosePDFGaussian::inverse(), mrpt::poses::CPosePDFGaussianInf::inverse(), mrpt::poses::CPosePDFGaussian::inverseComposition(), mrpt::poses::CPose3DPDF::jacobiansPoseComposition(), mrpt::math::CMatrixFixed< double, ObsDim, PointDof >::llt_solve(), mrpt::math::CMatrixFixed< double, ObsDim, PointDof >::lu_solve(), mrpt::poses::CPoint2DPDFGaussian::mahalanobisDistanceTo(), mrpt::poses::CPosePDFGaussian::mahalanobisDistanceTo(), mrpt::poses::CPosePDFGaussianInf::mahalanobisDistanceTo(), mrpt::poses::CPoint2DPDFGaussian::mahalanobisDistanceToPoint(), mrpt::math::MATLAB_plotCovariance2D(), mrpt::poses::CPosePDFSOG::mergeModes(), mrpt::math::operator-(), mrpt::vision::CDifodo::poseUpdate(), mrpt::obs::CActionRobotMovement2D::prepareFastDrawSingleSample_modelGaussian(), mrpt::poses::CPoint2DPDFGaussian::productIntegralWith(), mrpt::poses::CPointPDFGaussian::productIntegralWith(), mrpt::poses::CPointPDFGaussian::productIntegralWith2D(), mrpt::opengl::TRenderMatrices::projectPoint(), quat_vs_YPR(), mrpt::vision::recompute_errors_and_Jacobians(), mrpt::poses::CPosePDFGaussian::rotateCov(), mrpt::poses::CPosePDFGaussianInf::rotateCov(), mrpt::bayes::CKalmanFilterCapable< 7, 3, 3, 7 >::runOneKalmanIteration(), mrpt::maps::CLandmarksMap::saveToMATLABScript2D(), mrpt::poses::CPoseRandomSampler::setPosePDF(), TEST(), Pose3DQuatTests::test_composePointJacob(), Pose3DTests::test_composePointJacob(), Pose3DTests::test_composePointJacob_se3(), Pose3DQuatTests::test_invComposePointJacob(), Pose3DTests::test_invComposePointJacob(), Pose3DTests::test_invComposePointJacob_se3(), Pose3DQuatTests::test_normalizeJacob(), and Pose3DQuatTests::test_sphericalCoords().

Here is the caller graph for this function:

◆ asEigen() [2/2]

template<typename T, std::size_t ROWS, std::size_t COLS>
template<typename EIGEN_MATRIX = eigen_t, typename EIGEN_MAP = Eigen::Map< const EIGEN_MATRIX, MRPT_MAX_STATIC_ALIGN_BYTES, Eigen::InnerStride<1>>>
EIGEN_MAP mrpt::math::CMatrixFixed< T, ROWS, COLS >::asEigen ( ) const
inlineinherited

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 266 of file CMatrixFixed.h.

◆ assign()

void mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::assign ( const std::size_t  N,
const T  value 
)
inlineinherited

◆ asString()

std::string mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::asString ( ) const
inherited

Returns a string representation of the vector/matrix, using Eigen's default settings.

Definition at line 337 of file MatrixVectorBase_impl.h.

Referenced by TEST().

◆ begin() [1/2]

template<typename T, std::size_t ROWS, std::size_t COLS>
iterator mrpt::math::CMatrixFixed< T, ROWS, COLS >::begin ( )
inlineinherited

Definition at line 64 of file CMatrixFixed.h.

◆ begin() [2/2]

template<typename T, std::size_t ROWS, std::size_t COLS>
const_iterator mrpt::math::CMatrixFixed< T, ROWS, COLS >::begin ( ) const
inlineinherited

Definition at line 66 of file CMatrixFixed.h.

◆ block() [1/3]

auto mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::block ( int  start_row,
int  start_col 
)
inlineinherited

non-const block(): Returns an Eigen::Block reference to the block

Definition at line 138 of file MatrixVectorBase.h.

References mrpt::math::MatrixVectorBase< Scalar, Derived >::mvbDerived().

Referenced by jacob_deps_D_p_deps().

◆ block() [2/3]

auto mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::block ( int  start_row,
int  start_col,
int  BLOCK_ROWS,
int  BLOCK_COLS 
)
inlineinherited

◆ block() [3/3]

auto mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::block ( int  start_row,
int  start_col,
int  BLOCK_ROWS,
int  BLOCK_COLS 
) const
inlineinherited

◆ blockCopy() [1/2]

CMatrixFixed<T , BLOCK_ROWS, BLOCK_COLS> mrpt::math::MatrixBase< T , CMatrixFixed< T, ROWS, COLS > >::blockCopy ( int  start_row = 0,
int  start_col = 0 
) const
inlineinherited

const blockCopy(): Returns a copy of the given block

Definition at line 233 of file MatrixBase.h.

◆ blockCopy() [2/2]

CMatrixDynamic<T > mrpt::math::MatrixBase< T , CMatrixFixed< T, ROWS, COLS > >::blockCopy ( int  start_row,
int  start_col,
int  BLOCK_ROWS,
int  BLOCK_COLS 
) const
inlineinherited

const blockCopy(): Returns a copy of the given block (non templated version, dynamic sizes)

Definition at line 240 of file MatrixBase.h.

References mrpt::math::MatrixBase< Scalar, Derived >::extractMatrix().

◆ cast_double()

template<typename T , std::size_t ROWS, std::size_t COLS>
CMatrixFixed< double, ROWS, COLS > mrpt::math::CMatrixFixed< T, ROWS, COLS >::cast_double ( ) const
inherited

Definition at line 25 of file CMatrixFixed_impl.h.

Referenced by mrpt::slam::CICP::ICP_Method_LM(), mrpt::poses::CPointPDFGaussian::serializeFrom(), mrpt::poses::CPosePDFGaussian::serializeFrom(), and mrpt::poses::CPosePDFSOG::serializeFrom().

Here is the caller graph for this function:

◆ cast_float()

template<typename T , std::size_t ROWS, std::size_t COLS>
CMatrixFixed< float, ROWS, COLS > mrpt::math::CMatrixFixed< T, ROWS, COLS >::cast_float ( ) const
inherited

Definition at line 17 of file CMatrixFixed_impl.h.

Referenced by mrpt::vision::CDifodo::computeWeights(), mrpt::vision::CDifodo::filterLevelSolution(), mrpt::vision::CDifodo::poseUpdate(), and mrpt::obs::detail::unprojectInto().

Here is the caller graph for this function:

◆ cbegin()

template<typename T, std::size_t ROWS, std::size_t COLS>
const_iterator mrpt::math::CMatrixFixed< T, ROWS, COLS >::cbegin ( ) const
inlineinherited

Definition at line 68 of file CMatrixFixed.h.

◆ cend()

template<typename T, std::size_t ROWS, std::size_t COLS>
const_iterator mrpt::math::CMatrixFixed< T, ROWS, COLS >::cend ( ) const
inlineinherited

Definition at line 69 of file CMatrixFixed.h.

◆ chol()

bool mrpt::math::MatrixBase< T , CMatrixFixed< T, ROWS, COLS > >::chol ( CMatrixFixed< T, ROWS, COLS > &  U) const
inherited

Cholesky M=UT * U decomposition for symmetric matrix (upper-half of the matrix is actually ignored.

Returns
false if Cholesky fails

Definition at line 165 of file MatrixBase_impl.h.

◆ coeff()

const T & mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::coeff ( int  r,
int  c 
) const
inlineinherited

◆ coeffRef()

T & mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::coeffRef ( int  r,
int  c 
)
inlineinherited

◆ col() [1/2]

auto mrpt::math::MatrixBase< T , CMatrixFixed< T, ROWS, COLS > >::col ( int  colIdx)
inlineinherited

◆ col() [2/2]

auto mrpt::math::MatrixBase< T , CMatrixFixed< T, ROWS, COLS > >::col ( int  colIdx) const
inlineinherited

◆ cols()

template<typename T, std::size_t ROWS, std::size_t COLS>
constexpr size_type mrpt::math::CMatrixFixed< T, ROWS, COLS >::cols ( ) const
inlineinherited

◆ conj() [1/2]

template<class T>
void mrpt::math::CQuaternion< T >::conj ( CQuaternion< T > &  q_out) const
inline

Return the conjugate quaternion.

Definition at line 412 of file CQuaternion.h.

References mrpt::math::CQuaternion< T >::r(), mrpt::math::CQuaternion< T >::x(), mrpt::math::CQuaternion< T >::y(), and mrpt::math::CQuaternion< T >::z().

Referenced by mrpt::poses::CPose3DQuatPDFGaussianInf::inverse(), and mrpt::poses::CPose3DQuatPDFGaussian::inverse().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ conj() [2/2]

template<class T>
CQuaternion mrpt::math::CQuaternion< T >::conj ( ) const
inline

Return the conjugate quaternion.

Definition at line 421 of file CQuaternion.h.

◆ conservativeResize()

template<typename T, std::size_t ROWS, std::size_t COLS>
void mrpt::math::CMatrixFixed< T, ROWS, COLS >::conservativeResize ( size_t  row,
size_t  col 
)
inlineinherited

Definition at line 202 of file CMatrixFixed.h.

◆ Constant() [1/2]

static CMatrixFixed< T, ROWS, COLS > mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::Constant ( const T  value)
inlinestaticinherited

Definition at line 89 of file MatrixVectorBase.h.

References ASSERTMSG_.

◆ Constant() [2/2]

static CMatrixFixed< T, ROWS, COLS > mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::Constant ( size_t  nrows,
size_t  ncols,
const T  value 
)
inlinestaticinherited

Definition at line 99 of file MatrixVectorBase.h.

◆ crossProduct()

template<class T>
void mrpt::math::CQuaternion< T >::crossProduct ( const CQuaternion< T > &  q1,
const CQuaternion< T > &  q2 
)
inline

Calculate the "cross" product (or "composed rotation") of two quaternion: this = q1 x q2 After the operation, "this" will represent the composed rotations of q1 and q2 (q2 applied "after" q1).

Definition at line 231 of file CQuaternion.h.

References mrpt::math::CQuaternion< T >::normalize(), mrpt::math::CQuaternion< T >::r(), mrpt::math::CQuaternion< T >::x(), mrpt::math::CQuaternion< T >::y(), and mrpt::math::CQuaternion< T >::z().

Referenced by mrpt::poses::CPose3DQuat::composeFrom(), mrpt::poses::CPose3DQuat::inverseComposeFrom(), mrpt::poses::CPose3DPDF::jacobiansPoseComposition(), and TEST_F().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ data() [1/2]

template<typename T, std::size_t ROWS, std::size_t COLS>
const T* mrpt::math::CMatrixFixed< T, ROWS, COLS >::data ( ) const
inlineinherited

Return raw pointer to row-major data buffer.

All matrix cells can be assumed to be stored contiguously in memory, i.e. row stride = column count.

Definition at line 278 of file CMatrixFixed.h.

Referenced by mrpt::math::CMatrixFixed< double, ObsDim, PointDof >::loadFromRawPointer(), mrpt::opengl::processRenderQueue(), and TEST().

Here is the caller graph for this function:

◆ data() [2/2]

template<typename T, std::size_t ROWS, std::size_t COLS>
T* mrpt::math::CMatrixFixed< T, ROWS, COLS >::data ( )
inlineinherited

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 284 of file CMatrixFixed.h.

◆ derived() [1/2]

template<typename T, std::size_t ROWS, std::size_t COLS>
CMatrixFixed& mrpt::math::CMatrixFixed< T, ROWS, COLS >::derived ( )
inlineinherited

Definition at line 200 of file CMatrixFixed.h.

◆ derived() [2/2]

template<typename T, std::size_t ROWS, std::size_t COLS>
const CMatrixFixed& mrpt::math::CMatrixFixed< T, ROWS, COLS >::derived ( ) const
inlineinherited

Definition at line 201 of file CMatrixFixed.h.

◆ det()

T mrpt::math::MatrixBase< T , CMatrixFixed< T, ROWS, COLS > >::det ( ) const
inherited

Determinant of matrix.

Definition at line 76 of file MatrixBase_impl.h.

Referenced by mrpt::math::productIntegralTwoGaussians().

◆ dot() [1/2]

T mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::dot ( const CVectorDynamic< T > &  v) const
inherited

dot product of this \cdot v

Definition at line 511 of file MatrixVectorBase_impl.h.

References ASSERTMSG_, and mrpt::math::MatrixVectorBase< T, CVectorDynamic< T > >::mvbDerived().

◆ dot() [2/2]

T mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::dot ( const MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > > &  v) const
inherited

◆ eig()

bool mrpt::math::MatrixBase< T , CMatrixFixed< T, ROWS, COLS > >::eig ( CMatrixFixed< T, ROWS, COLS > &  eVecs,
std::vector< T > &  eVals,
bool  sorted = true 
) const
inherited

Computes the eigenvectors and eigenvalues for a square, general matrix.

Use eig_symmetric() for symmetric matrices for better accuracy and performance. Eigenvectors are the columns of the returned matrix, and their order matches that of returned eigenvalues.

Parameters
[in]sortedIf true, eigenvalues (and eigenvectors) will be sorted in ascending order.
[out]eVecsThe container where eigenvectors will be stored.
[out]eValsThe container where eigenvalues will be stored.
Returns
false if eigenvalues could not be determined.

Definition at line 107 of file MatrixBase_impl.h.

References ASSERT_EQUAL_, and mrpt::math::detail::sortEigResults().

Referenced by mrpt::img::CCanvas::ellipseGaussian().

◆ eig_symmetric()

bool mrpt::math::MatrixBase< T , CMatrixFixed< T, ROWS, COLS > >::eig_symmetric ( CMatrixFixed< T, ROWS, COLS > &  eVecs,
std::vector< T > &  eVals,
bool  sorted = true 
) const
inherited

Read: eig()

Note
This only uses the lower-triangular part of the matrix

Definition at line 131 of file MatrixBase_impl.h.

References ASSERT_EQUAL_, and mrpt::math::detail::sortEigResults().

◆ empty()

bool mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::empty ( ) const
inlineinherited

returns true if matrix/vector has size=0

Definition at line 260 of file MatrixVectorBase.h.

References mrpt::math::MatrixVectorBase< Scalar, Derived >::mvbDerived().

◆ end() [1/2]

template<typename T, std::size_t ROWS, std::size_t COLS>
iterator mrpt::math::CMatrixFixed< T, ROWS, COLS >::end ( )
inlineinherited

Definition at line 65 of file CMatrixFixed.h.

◆ end() [2/2]

template<typename T, std::size_t ROWS, std::size_t COLS>
const_iterator mrpt::math::CMatrixFixed< T, ROWS, COLS >::end ( ) const
inlineinherited

Definition at line 67 of file CMatrixFixed.h.

◆ ensurePositiveRealPart()

template<class T>
void mrpt::math::CQuaternion< T >::ensurePositiveRealPart ( )
inline

Adhere to the convention of w>=0 to avoid ambiguity of quaternion double cover of SO(3)

Definition at line 88 of file CQuaternion.h.

References mrpt::math::CQuaternion< T >::r(), mrpt::math::CQuaternion< T >::x(), mrpt::math::CQuaternion< T >::y(), and mrpt::math::CQuaternion< T >::z().

Referenced by mrpt::math::CQuaternion< T >::CQuaternion(), and mrpt::math::CQuaternion< T >::normalize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ exp() [1/2]

template<class T>
template<class ARRAYLIKE3 >
static CQuaternion<T> mrpt::math::CQuaternion< T >::exp ( const ARRAYLIKE3 &  v)
inlinestatic

Exponential map from the SO(3) Lie Algebra to unit quaternions.

See also
ln, mrpt::poses::SE_traits

Definition at line 211 of file CQuaternion.h.

References mrpt::math::CQuaternion< T >::fromRodriguesVector(), and mrpt::math::UNINITIALIZED_QUATERNION.

Here is the call graph for this function:

◆ exp() [2/2]

template<class T>
template<class ARRAYLIKE3 >
static void mrpt::math::CQuaternion< T >::exp ( const ARRAYLIKE3 &  v,
CQuaternion< T > &  out_quat 
)
inlinestatic

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 219 of file CQuaternion.h.

References mrpt::math::CQuaternion< T >::fromRodriguesVector().

Here is the call graph for this function:

◆ extractColumn() [1/2]

void mrpt::math::MatrixBase< T , CMatrixFixed< T, ROWS, COLS > >::extractColumn ( int  colIdx,
VECTOR_LIKE &  v 
) const
inlineinherited

◆ extractColumn() [2/2]

VECTOR_LIKE mrpt::math::MatrixBase< T , CMatrixFixed< T, ROWS, COLS > >::extractColumn ( int  colIdx) const
inlineinherited

◆ extractMatrix() [1/2]

CMatrixFixed<T , BLOCK_ROWS, BLOCK_COLS> mrpt::math::MatrixBase< T , CMatrixFixed< T, ROWS, COLS > >::extractMatrix ( const int  start_row = 0,
const int  start_col = 0 
) const
inlineinherited

◆ extractMatrix() [2/2]

CMatrixDynamic<T > mrpt::math::MatrixBase< T , CMatrixFixed< T, ROWS, COLS > >::extractMatrix ( const int  BLOCK_ROWS,
const int  BLOCK_COLS,
const int  start_row,
const int  start_col 
) const
inlineinherited

◆ extractRow() [1/2]

void mrpt::math::MatrixBase< T , CMatrixFixed< T, ROWS, COLS > >::extractRow ( int  rowIdx,
VECTOR_LIKE &  v 
) const
inlineinherited

◆ extractRow() [2/2]

VECTOR_LIKE mrpt::math::MatrixBase< T , CMatrixFixed< T, ROWS, COLS > >::extractRow ( int  rowIdx) const
inlineinherited

◆ fill()

void mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::fill ( const T &  val)
inlineinherited

◆ fromMatlabStringFormat()

bool mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::fromMatlabStringFormat ( const std::string &  s,
mrpt::optional_ref< std::ostream >  dump_errors_here = std::nullopt 
)
inherited

Reads a matrix from a string in Matlab-like format, for example: "[1 0 2; 0 4 -1]" The string must start with '[' and end with ']'.

Rows are separated by semicolons ';' and columns in each row by one or more whitespaces ' ' or tabs ''. Commas ',' between elements are NOT allowed.

This format is also used for CConfigFile::read_matrix.

Returns
true on success. false if the string is malformed, and then the matrix will be resized to 0x0.
See also
inMatlabFormat, CConfigFile::read_matrix

Definition at line 24 of file MatrixVectorBase_impl.h.

References mrpt::containers::end(), and val.

Referenced by TEST().

◆ fromRodriguesVector()

template<class T>
template<class ARRAYLIKE3 >
void mrpt::math::CQuaternion< T >::fromRodriguesVector ( const ARRAYLIKE3 &  v)
inline

Set this quaternion to the rotation described by a 3D (Rodrigues) rotation vector $ \mathbf{v} $: If $ \mathbf{v}=0 $, then the quaternion is $ \mathbf{q} = [1 ~ 0 ~ 0 ~ 0]^\top $, otherwise:

\[ \mathbf{q} = \left[ \begin{array}{c} \cos(\frac{\theta}{2}) \\ v_x \frac{\sin(\frac{\theta}{2})}{\theta} \\ v_y \frac{\sin(\frac{\theta}{2})}{\theta} \\ v_z \frac{\sin(\frac{\theta}{2})}{\theta} \end{array} \right] \]

where $ \theta = |\mathbf{v}| = \sqrt{v_x^2+v_y^2+v_z^2} $.

See also
"Representing Attitude: Euler Angles, Unit Quaternions, and Rotation Vectors (2006)", James Diebel.

Definition at line 141 of file CQuaternion.h.

References ASSERT_, ASSERTMSG_, mrpt::format(), MRPT_END, MRPT_START, mrpt::math::CQuaternion< T >::normSqr(), mrpt::math::CQuaternion< T >::r(), mrpt::math::CQuaternion< T >::x(), mrpt::math::CQuaternion< T >::y(), and mrpt::math::CQuaternion< T >::z().

Referenced by mrpt::math::CQuaternion< T >::exp().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ head()

CMatrixFixed<T , N, 1> mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::head ( ) const
inlineinherited

◆ Identity() [1/2]

static CMatrixFixed< T, ROWS, COLS > mrpt::math::MatrixBase< T , CMatrixFixed< T, ROWS, COLS > >::Identity ( )
inlinestaticinherited

Definition at line 64 of file MatrixBase.h.

References ASSERTMSG_.

◆ Identity() [2/2]

static CMatrixFixed< T, ROWS, COLS > mrpt::math::MatrixBase< T , CMatrixFixed< T, ROWS, COLS > >::Identity ( const std::size_t  N)
inlinestaticinherited

Definition at line 74 of file MatrixBase.h.

◆ inMatlabFormat()

std::string mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::inMatlabFormat ( const std::size_t  decimal_digits = 6) const
inherited

Exports the matrix as a string compatible with Matlab/Octave.

See also
fromMatlabStringFormat()

Definition at line 141 of file MatrixVectorBase_impl.h.

◆ insertMatrix()

void mrpt::math::MatrixBase< T , CMatrixFixed< T, ROWS, COLS > >::insertMatrix ( const int  row_start,
const int  col_start,
const OTHERMATVEC &  submat 
)
inlineinherited

◆ insertMatrixTransposed()

void mrpt::math::MatrixBase< T , CMatrixFixed< T, ROWS, COLS > >::insertMatrixTransposed ( const int  row_start,
const int  col_start,
const OTHERMATVEC &  submat 
)
inlineinherited

Like insertMatrix(), but inserts ‘submat’` (transposed)

Definition at line 221 of file MatrixBase.h.

References ASSERT_BELOWEQ_, and mrpt::math::MatrixBase< Scalar, Derived >::mbDerived().

◆ inverse()

CMatrixFixed< T, ROWS, COLS > mrpt::math::MatrixBase< T , CMatrixFixed< T, ROWS, COLS > >::inverse ( ) const
inherited

Returns the inverse of a general matrix using LU.

Definition at line 183 of file MatrixBase_impl.h.

References ASSERT_EQUAL_, and mrpt::math::UNINITIALIZED_MATRIX.

◆ inverse_LLt()

CMatrixFixed< T, ROWS, COLS > mrpt::math::MatrixBase< T , CMatrixFixed< T, ROWS, COLS > >::inverse_LLt ( ) const
inherited

Returns the inverse of a symmetric matrix using LLt.

Definition at line 195 of file MatrixBase_impl.h.

References ASSERT_EQUAL_, and mrpt::math::UNINITIALIZED_MATRIX.

Referenced by mrpt::slam::CICP::ICP_Method_LM().

◆ inverseRotatePoint()

template<class T>
void mrpt::math::CQuaternion< T >::inverseRotatePoint ( const double  lx,
const double  ly,
const double  lz,
double &  gx,
double &  gy,
double &  gz 
) const
inline

Rotate a 3D point (lx,ly,lz) -> (gx,gy,gz) as described by the inverse (conjugate) of this quaternion.

Definition at line 274 of file CQuaternion.h.

References mrpt::math::CQuaternion< T >::r(), mrpt::math::CQuaternion< T >::x(), mrpt::math::CQuaternion< T >::y(), and mrpt::math::CQuaternion< T >::z().

Referenced by mrpt::poses::CPose3DQuat::inverseComposePoint().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isSquare()

bool mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::isSquare ( ) const
inlineinherited

returns true if matrix is NxN

Definition at line 257 of file MatrixVectorBase.h.

References mrpt::math::MatrixVectorBase< Scalar, Derived >::mvbDerived().

◆ llt_solve()

template<typename T, std::size_t ROWS, std::size_t COLS>
CMatrixFixed< T, ROWS, 1 > mrpt::math::CMatrixFixed< T, ROWS, COLS >::llt_solve ( const CMatrixFixed< T, ROWS, 1 > &  b) const
inherited

Solves the linear system Ax=b, returns x, with A this symmetric matrix.

See also
lu_solve()

Definition at line 34 of file CMatrixFixed_impl.h.

◆ ln() [1/2]

template<class T>
template<class ARRAYLIKE3 >
void mrpt::math::CQuaternion< T >::ln ( ARRAYLIKE3 &  out_ln) const
inline

Logarithm of the 3x3 matrix defined by this pose, generating the corresponding vector in the SO(3) Lie Algebra, which coincides with the so-called "rotation vector" (I don't have space here for the proof ;-).

Parameters
[out]out_lnThe target vector, which can be: std::vector<>, or mrpt::math::CVectorDouble or any row or column Eigen::Matrix<>.
See also
exp, mrpt::poses::SE_traits

Definition at line 183 of file CQuaternion.h.

References mrpt::math::CQuaternion< T >::ln_noresize().

Referenced by QuaternionTests::test_ExpAndLnMatches(), and QuaternionTests::test_lnAndExpMatches().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ln() [2/2]

template<class T>
template<class ARRAYLIKE3 >
ARRAYLIKE3 mrpt::math::CQuaternion< T >::ln ( ) const
inline

overload that returns by value

Definition at line 190 of file CQuaternion.h.

◆ ln_noresize()

template<class T>
template<class ARRAYLIKE3 >
void mrpt::math::CQuaternion< T >::ln_noresize ( ARRAYLIKE3 &  out_ln) const
inline

Like ln() but does not try to resize the output vector.

Definition at line 198 of file CQuaternion.h.

References mrpt::math::CQuaternion< T >::r(), mrpt::square(), mrpt::math::CQuaternion< T >::x(), mrpt::math::CQuaternion< T >::y(), and mrpt::math::CQuaternion< T >::z().

Referenced by mrpt::math::CQuaternion< T >::ln().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadFromArray()

template<typename T, std::size_t ROWS, std::size_t COLS>
template<typename VECTOR >
void mrpt::math::CMatrixFixed< T, ROWS, COLS >::loadFromArray ( const VECTOR &  vals)
inlineinherited

Definition at line 171 of file CMatrixFixed.h.

Referenced by mrpt::math::CMatrixFixed< double, ObsDim, PointDof >::CMatrixFixed(), mrpt::poses::CPose3DQuat::composePoint(), mrpt::vision::frameJac(), mrpt::math::TPose3D::getAsQuaternion(), mrpt::poses::CPose3DQuat::inverseComposePoint(), TEST(), and mrpt::hwdrivers::CRovio::TOptions::TOptions().

Here is the caller graph for this function:

◆ loadFromRawPointer()

template<typename T, std::size_t ROWS, std::size_t COLS>
void mrpt::math::CMatrixFixed< T, ROWS, COLS >::loadFromRawPointer ( const T *  data)
inlineinherited

Initializes from a plain buffer with RowMajor values.

Unsafe, prefer loadFromArray() wherever possible, to ensure buffer length checks.

Definition at line 183 of file CMatrixFixed.h.

Referenced by mrpt::math::CMatrixFixed< double, ObsDim, PointDof >::CMatrixFixed().

Here is the caller graph for this function:

◆ loadFromTextFile() [1/2]

void mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::loadFromTextFile ( std::istream &  f)
inherited

Loads a vector/matrix from a text file, compatible with MATLAB text format.

Lines starting with '' or '#' are interpreted as comments and ignored.

Exceptions
std::runtime_errorOn format error.
See also
saveToTextFile, fromMatlabStringFormat

Definition at line 238 of file MatrixVectorBase_impl.h.

◆ loadFromTextFile() [2/2]

void mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::loadFromTextFile ( const std::string &  file)
inherited

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 326 of file MatrixVectorBase_impl.h.

◆ lu_solve()

template<typename T, std::size_t ROWS, std::size_t COLS>
CMatrixFixed< T, ROWS, 1 > mrpt::math::CMatrixFixed< T, ROWS, COLS >::lu_solve ( const CMatrixFixed< T, ROWS, 1 > &  b) const
inherited

Solves the linear system Ax=b, returns x, with A this asymmetric matrix.

See also
llt_solve()

Definition at line 49 of file CMatrixFixed_impl.h.

Referenced by mrpt::nav::CPTG_Holo_Blend::inverseMap_WS2TP().

Here is the caller graph for this function:

◆ matProductOf_AAt()

void mrpt::math::MatrixBase< T , CMatrixFixed< T, ROWS, COLS > >::matProductOf_AAt ( const MAT_A &  A)
inlineinherited

this = A * AT

Definition at line 276 of file MatrixBase.h.

References mrpt::math::MatrixBase< Scalar, Derived >::mbDerived().

◆ matProductOf_AB()

void mrpt::math::MatrixBase< T , CMatrixFixed< T, ROWS, COLS > >::matProductOf_AB ( const CMatrixFixed< T, ROWS, COLS > &  A,
const CMatrixFixed< T, ROWS, COLS > &  B 
)
inherited

this = A*B, with A & B of the same type of this.

For products of different matrix types, use the regular * operator (which requires the <Eigen/Dense> header)

Definition at line 175 of file MatrixBase_impl.h.

◆ matProductOf_Ab()

void mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::matProductOf_Ab ( const CMatrixDynamic< T > &  A,
const CVectorDynamic< T > &  b 
)
inherited

this = A * b , with A and b a dynamic matrix & vector

Definition at line 485 of file MatrixVectorBase_impl.h.

References mrpt::math::CVectorDynamic< T >::asEigen().

◆ matProductOf_AtA()

void mrpt::math::MatrixBase< T , CMatrixFixed< T, ROWS, COLS > >::matProductOf_AtA ( const MAT_A &  A)
inlineinherited

this = AT * A

Definition at line 295 of file MatrixBase.h.

References mrpt::math::MatrixBase< Scalar, Derived >::mbDerived().

◆ matProductOf_Atb()

void mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::matProductOf_Atb ( const CMatrixDynamic< T > &  A,
const CVectorDynamic< T > &  b 
)
inherited

this = AT * b , with A and b a dynamic matrix & vector

Definition at line 492 of file MatrixVectorBase_impl.h.

References mrpt::math::CVectorDynamic< T >::asEigen().

◆ maxCoeff() [1/3]

T mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::maxCoeff ( ) const
inherited

Maximum value in the matrix/vector.

Definition at line 363 of file MatrixVectorBase_impl.h.

◆ maxCoeff() [2/3]

T mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::maxCoeff ( std::size_t &  outIndexOfMax) const
inherited

Definition at line 384 of file MatrixVectorBase_impl.h.

◆ maxCoeff() [3/3]

T mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::maxCoeff ( std::size_t &  rowIdx,
std::size_t &  colIdx 
) const
inherited

Definition at line 409 of file MatrixVectorBase_impl.h.

◆ maximumDiagonal()

T mrpt::math::MatrixBase< T , CMatrixFixed< T, ROWS, COLS > >::maximumDiagonal ( ) const
inherited

Returns the maximum value in the diagonal.

Definition at line 207 of file MatrixBase_impl.h.

◆ mbDerived() [1/2]

CMatrixFixed< T, ROWS, COLS > & mrpt::math::MatrixBase< T , CMatrixFixed< T, ROWS, COLS > >::mbDerived ( )
inlineinherited

Definition at line 26 of file MatrixBase.h.

◆ mbDerived() [2/2]

const CMatrixFixed< T, ROWS, COLS > & mrpt::math::MatrixBase< T , CMatrixFixed< T, ROWS, COLS > >::mbDerived ( ) const
inlineinherited

Definition at line 27 of file MatrixBase.h.

◆ minCoeff() [1/3]

T mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::minCoeff ( ) const
inherited

Minimum value in the matrix/vector.

Definition at line 357 of file MatrixVectorBase_impl.h.

◆ minCoeff() [2/3]

T mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::minCoeff ( std::size_t &  outIndexOfMin) const
inherited

Definition at line 369 of file MatrixVectorBase_impl.h.

◆ minCoeff() [3/3]

T mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::minCoeff ( std::size_t &  rowIdx,
std::size_t &  colIdx 
) const
inherited

Definition at line 398 of file MatrixVectorBase_impl.h.

◆ minimumDiagonal()

T mrpt::math::MatrixBase< T , CMatrixFixed< T, ROWS, COLS > >::minimumDiagonal ( ) const
inherited

Returns the minimum value in the diagonal.

Definition at line 213 of file MatrixBase_impl.h.

◆ mvbDerived() [1/2]

CMatrixFixed< T, ROWS, COLS > & mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::mvbDerived ( )
inlineinherited

Definition at line 59 of file MatrixVectorBase.h.

◆ mvbDerived() [2/2]

const CMatrixFixed< T, ROWS, COLS > & mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::mvbDerived ( ) const
inlineinherited

Definition at line 60 of file MatrixVectorBase.h.

◆ norm()

T mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::norm ( ) const
inherited

Compute the L2 norm of a vector/array/matrix (the Euclidean distance to the origin, taking all the elements as a single vector).

See also
norm

Definition at line 505 of file MatrixVectorBase_impl.h.

Referenced by mrpt::nav::CPTG_Holo_Blend::inverseMap_WS2TP().

◆ norm_inf()

T mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::norm_inf ( ) const
inherited

Compute the norm-infinite of a vector ($f[ ||{v}||_ $f]), ie the maximum absolute value of the elements.

Definition at line 499 of file MatrixVectorBase_impl.h.

◆ normalizationJacobian()

template<class T>
template<class MATRIXLIKE >
void mrpt::math::CQuaternion< T >::normalizationJacobian ( MATRIXLIKE &  J) const
inline

Calculate the 4x4 Jacobian of the normalization operation of this quaternion.

The output matrix can be a dynamic or fixed size (4x4) matrix.

Definition at line 313 of file CQuaternion.h.

References mrpt::math::CQuaternion< T >::normSqr(), mrpt::math::CQuaternion< T >::r(), mrpt::math::CQuaternion< T >::x(), mrpt::math::CQuaternion< T >::y(), and mrpt::math::CQuaternion< T >::z().

Referenced by mrpt::poses::CPose3DQuat::composePoint(), mrpt::poses::CPose3DPDFGaussian::copyFrom(), mrpt::poses::CPose3DQuatPDFGaussian::inverse(), mrpt::poses::CPose3DQuat::inverseComposePoint(), mrpt::poses::CPose3DQuatPDF::jacobiansPoseComposition(), mrpt::poses::CPose3DPDF::jacobiansPoseComposition(), and Pose3DQuatTests::test_normalizeJacob().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ normalize()

template<class T>
void mrpt::math::CQuaternion< T >::normalize ( )
inline

Normalize this quaternion, so its norm becomes the unitity.

Definition at line 301 of file CQuaternion.h.

References mrpt::math::CQuaternion< T >::ensurePositiveRealPart(), and mrpt::math::CQuaternion< T >::normSqr().

Referenced by aux_posequat2poseypr(), mrpt::poses::CPose3DQuat::CPose3DQuat(), mrpt::math::CQuaternion< T >::crossProduct(), Pose3DQuatTests::func_compose_point(), Pose3DQuatPDFGaussTests::func_inv_compose(), Pose3DQuatTests::func_inv_compose_point(), Pose3DQuatPDFGaussTests::func_inverse(), Pose3DQuatTests::func_normalizeJacob(), and Pose3DQuatTests::func_spherical_coords().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ normSqr()

template<class T>
double mrpt::math::CQuaternion< T >::normSqr ( ) const
inline

Return the squared norm of the quaternion.

Definition at line 293 of file CQuaternion.h.

References mrpt::math::CQuaternion< T >::r(), mrpt::square(), mrpt::math::CQuaternion< T >::x(), mrpt::math::CQuaternion< T >::y(), and mrpt::math::CQuaternion< T >::z().

Referenced by mrpt::math::CQuaternion< T >::CQuaternion(), mrpt::math::CQuaternion< T >::fromRodriguesVector(), mrpt::math::CQuaternion< T >::normalizationJacobian(), and mrpt::math::CQuaternion< T >::normalize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator!=()

bool mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::operator!= ( const OTHERMATVEC &  o) const
inlineinherited

Definition at line 432 of file MatrixVectorBase.h.

◆ operator()() [1/4]

template<typename T, std::size_t ROWS, std::size_t COLS>
T& mrpt::math::CMatrixFixed< T, ROWS, COLS >::operator() ( int  row,
int  col 
)
inlineinherited

Access (row,col), without out-of-bounds check (except in Debug builds)

Definition at line 292 of file CMatrixFixed.h.

◆ operator()() [2/4]

template<typename T, std::size_t ROWS, std::size_t COLS>
const T& mrpt::math::CMatrixFixed< T, ROWS, COLS >::operator() ( int  row,
int  col 
) const
inlineinherited

Definition at line 298 of file CMatrixFixed.h.

◆ operator()() [3/4]

template<typename T, std::size_t ROWS, std::size_t COLS>
T& mrpt::math::CMatrixFixed< T, ROWS, COLS >::operator() ( int  i)
inlineinherited

Access the i-th element, Row-Major order, without out-of-bounds check (except in Debug builds)

Definition at line 308 of file CMatrixFixed.h.

◆ operator()() [4/4]

template<typename T, std::size_t ROWS, std::size_t COLS>
const T& mrpt::math::CMatrixFixed< T, ROWS, COLS >::operator() ( int  i) const
inlineinherited

Definition at line 313 of file CMatrixFixed.h.

◆ operator*() [1/5]

auto mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::operator* ( const MatrixVectorBase< S2, D2 > &  m2) const
inlineinherited

◆ operator*() [2/5]

auto mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::operator* ( const T  s) const
inlineinherited

◆ operator*() [3/5]

CMatrixDynamic< T > mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::operator* ( const CMatrixDynamic< T > &  v)
inherited

◆ operator*() [4/5]

CMatrixFixed< T, ROWS, COLS > mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::operator* ( const CMatrixFixed< T, ROWS, COLS > &  m2) const
inherited

Definition at line 470 of file MatrixVectorBase_impl.h.

References ASSERTMSG_.

◆ operator*() [5/5]

template<class T>
CQuaternion mrpt::math::CQuaternion< T >::operator* ( const T &  factor)
inline

Definition at line 529 of file CQuaternion.h.

◆ operator*=()

void mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::operator*= ( s)
inherited

Definition at line 432 of file MatrixVectorBase_impl.h.

◆ operator+() [1/2]

auto mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::operator+ ( const MatrixVectorBase< S2, D2 > &  m2) const
inlineinherited

◆ operator+() [2/2]

CMatrixFixed< T, ROWS, COLS > mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::operator+ ( const CMatrixFixed< T, ROWS, COLS > &  m2) const
inlineinherited

◆ operator+=() [1/3]

void mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::operator+= ( const MatrixVectorBase< S2, D2 > &  m2)
inlineinherited

◆ operator+=() [2/3]

void mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::operator+= ( s)
inherited

Definition at line 420 of file MatrixVectorBase_impl.h.

◆ operator+=() [3/3]

void mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::operator+= ( const CMatrixFixed< T, ROWS, COLS > &  m2)
inlineinherited

◆ operator-() [1/3]

auto mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::operator- ( ) const
inlineinherited

◆ operator-() [2/3]

auto mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::operator- ( const MatrixVectorBase< S2, D2 > &  m2) const
inlineinherited

◆ operator-() [3/3]

CMatrixFixed< T, ROWS, COLS > mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::operator- ( const CMatrixFixed< T, ROWS, COLS > &  m2) const
inlineinherited

◆ operator-=() [1/3]

void mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::operator-= ( const MatrixVectorBase< S2, D2 > &  m2)
inlineinherited

◆ operator-=() [2/3]

void mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::operator-= ( s)
inherited

Definition at line 426 of file MatrixVectorBase_impl.h.

◆ operator-=() [3/3]

void mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::operator-= ( const CMatrixFixed< T, ROWS, COLS > &  m2)
inlineinherited

◆ operator==()

bool mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::operator== ( const OTHERMATVEC &  o) const
inlineinherited

◆ operator[]() [1/2]

template<typename T, std::size_t ROWS, std::size_t COLS>
T& mrpt::math::CMatrixFixed< T, ROWS, COLS >::operator[] ( int  i)
inlineinherited

Access the [i-th] element (for 1xN or Nx1 matrices)

Definition at line 320 of file CMatrixFixed.h.

◆ operator[]() [2/2]

template<typename T, std::size_t ROWS, std::size_t COLS>
const T& mrpt::math::CMatrixFixed< T, ROWS, COLS >::operator[] ( int  i) const
inlineinherited

Definition at line 326 of file CMatrixFixed.h.

◆ r() [1/3]

template<class T>
T mrpt::math::CQuaternion< T >::r ( ) const
inline

Return r (real part) coordinate of the quaternion.

Definition at line 101 of file CQuaternion.h.

Referenced by mrpt::poses::CPose3DQuat::asTPose(), check_CPose3D_tofrom_ROS(), mrpt::vision::checkerBoardStereoCalibration(), mrpt::poses::CPose3DQuat::composePoint(), mrpt::math::CQuaternion< T >::conj(), mrpt::math::CQuaternion< T >::CQuaternion(), mrpt::math::CQuaternion< T >::crossProduct(), mrpt::math::CQuaternion< T >::ensurePositiveRealPart(), mrpt::math::CQuaternion< T >::fromRodriguesVector(), mrpt::ros1bridge::fromROS(), mrpt::hwdrivers::CImageGrabber_FlyCapture2::getObservation(), mrpt::poses::internal::getPoseFromString(), mrpt::poses::CPose3DQuat::inverseComposeFrom(), mrpt::poses::CPose3DQuat::inverseComposePoint(), mrpt::math::CQuaternion< T >::inverseRotatePoint(), mrpt::poses::CPose3DQuatPDF::jacobiansPoseComposition(), mrpt::math::CQuaternion< T >::ln_noresize(), mrpt::math::CQuaternion< T >::normalizationJacobian(), mrpt::math::CQuaternion< T >::normSqr(), mrpt::topography::path_from_rtk_gps(), mrpt::math::CQuaternion< T >::r(), mrpt::graphslam::CGraphSlamEngine< GRAPH_T >::readGTFileRGBD_TUM(), mrpt::math::CQuaternion< T >::rotatePoint(), mrpt::math::CQuaternion< T >::rotationJacobian(), mrpt::math::CQuaternion< T >::rotationMatrixNoResize(), mrpt::math::CQuaternion< T >::rpy_and_jacobian(), Pose3DQuatTests::test_invComposePointJacob(), mrpt::ros1bridge::toROS(), and mrpt::ros1bridge::toROS_Pose().

Here is the caller graph for this function:

◆ r() [2/3]

template<class T>
void mrpt::math::CQuaternion< T >::r ( const T  r)
inline

Set r (real part) coordinate of the quaternion.

Definition at line 111 of file CQuaternion.h.

References mrpt::math::CQuaternion< T >::r().

Here is the call graph for this function:

◆ r() [3/3]

template<class T>
T& mrpt::math::CQuaternion< T >::r ( )
inline

Definition at line 121 of file CQuaternion.h.

◆ rank()

int mrpt::math::MatrixBase< T , CMatrixFixed< T, ROWS, COLS > >::rank ( threshold = 0) const
inherited

Finds the rank of the matrix via LU decomposition.

Uses Eigen's default threshold unless threshold>0.

Definition at line 156 of file MatrixBase_impl.h.

◆ removeColumns()

void mrpt::math::MatrixBase< T , CMatrixFixed< T, ROWS, COLS > >::removeColumns ( const std::vector< std::size_t > &  idxsToRemove)
inherited

Removes columns of the matrix.

Indices may be unsorted and duplicated

Definition at line 38 of file MatrixBase_impl.h.

◆ removeRows()

void mrpt::math::MatrixBase< T , CMatrixFixed< T, ROWS, COLS > >::removeRows ( const std::vector< std::size_t > &  idxsToRemove)
inherited

Removes rows of the matrix.

Indices may be unsorted and duplicated

Definition at line 65 of file MatrixBase_impl.h.

◆ resize() [1/3]

template<typename T, std::size_t ROWS, std::size_t COLS>
void mrpt::math::CMatrixFixed< T, ROWS, COLS >::resize ( size_t  n)
inlineinherited

Definition at line 204 of file CMatrixFixed.h.

Referenced by mrpt::math::CMatrixFixed< double, ObsDim, PointDof >::resize().

Here is the caller graph for this function:

◆ resize() [2/3]

template<typename T, std::size_t ROWS, std::size_t COLS>
void mrpt::math::CMatrixFixed< T, ROWS, COLS >::resize ( const matrix_size_t siz,
[[maybe_unused] ] bool  zeroNewElements = false 
)
inlineinherited

Throws if size does not match with the fixed matrix size.

Definition at line 215 of file CMatrixFixed.h.

◆ resize() [3/3]

template<typename T, std::size_t ROWS, std::size_t COLS>
void mrpt::math::CMatrixFixed< T, ROWS, COLS >::resize ( size_t  row,
size_t  col 
)
inlineinherited

Definition at line 220 of file CMatrixFixed.h.

◆ rotatePoint()

template<class T>
void mrpt::math::CQuaternion< T >::rotatePoint ( const double  lx,
const double  ly,
const double  lz,
double &  gx,
double &  gy,
double &  gz 
) const
inline

Rotate a 3D point (lx,ly,lz) -> (gx,gy,gz) as described by this quaternion.

Definition at line 253 of file CQuaternion.h.

References mrpt::math::CQuaternion< T >::r(), mrpt::math::CQuaternion< T >::x(), mrpt::math::CQuaternion< T >::y(), and mrpt::math::CQuaternion< T >::z().

Referenced by mrpt::poses::CPose3DQuat::composePoint(), and mrpt::poses::CPose3DQuat::inverseComposeFrom().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rotationJacobian()

template<class T>
template<class MATRIXLIKE >
void mrpt::math::CQuaternion< T >::rotationJacobian ( MATRIXLIKE &  J) const
inline

Compute the Jacobian of the rotation composition operation $ p = f(\cdot) = q_{this} \times r $, that is the 4x4 matrix $ \frac{\partial f}{\partial q_{this} } $.

The output matrix can be a dynamic or fixed size (4x4) matrix.

Definition at line 345 of file CQuaternion.h.

References mrpt::math::CQuaternion< T >::r(), mrpt::math::CQuaternion< T >::x(), mrpt::math::CQuaternion< T >::y(), and mrpt::math::CQuaternion< T >::z().

Here is the call graph for this function:

◆ rotationMatrix() [1/2]

template<class T>
template<class MATRIXLIKE >
void mrpt::math::CQuaternion< T >::rotationMatrix ( MATRIXLIKE &  M) const
inline

Calculate the 3x3 rotation matrix associated to this quaternion:

\[ \mathbf{R} = \left( \begin{array}{ccc} q_r^2+q_x^2-q_y^2-q_z^2 & 2(q_x q_y - q_r q_z) & 2(q_z q_x+q_r q_y) \\ 2(q_x q_y+q_r q_z) & q_r^2-q_x^2+q_y^2-q_z^2 & 2(q_y q_z-q_r q_x) \\ 2(q_z q_x-q_r q_y) & 2(q_y q_z+q_r q_x) & q_r^2- q_x^2 - q_y^2 + q_z^2 \end{array} \right)\]

.

Definition at line 380 of file CQuaternion.h.

References mrpt::math::CQuaternion< T >::rotationMatrixNoResize().

Referenced by quat_vs_YPR().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rotationMatrix() [2/2]

template<class T>
template<class MATRIXLIKE >
MATRIXLIKE mrpt::math::CQuaternion< T >::rotationMatrix ( ) const
inline

Definition at line 387 of file CQuaternion.h.

References mrpt::math::CQuaternion< T >::rotationMatrixNoResize().

Here is the call graph for this function:

◆ rotationMatrixNoResize()

template<class T>
template<class MATRIXLIKE >
void mrpt::math::CQuaternion< T >::rotationMatrixNoResize ( MATRIXLIKE &  M) const
inline

Fill out the top-left 3x3 block of the given matrix with the rotation matrix associated to this quaternion (does not resize the matrix, for that, see rotationMatrix).

Definition at line 398 of file CQuaternion.h.

References mrpt::math::CQuaternion< T >::r(), mrpt::math::CQuaternion< T >::x(), mrpt::math::CQuaternion< T >::y(), and mrpt::math::CQuaternion< T >::z().

Referenced by mrpt::poses::CPose3D::CPose3D(), mrpt::poses::CPose3DQuat::getHomogeneousMatrix(), and mrpt::math::CQuaternion< T >::rotationMatrix().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ row() [1/2]

auto mrpt::math::MatrixBase< T , CMatrixFixed< T, ROWS, COLS > >::row ( int  rowIdx)
inlineinherited

◆ row() [2/2]

auto mrpt::math::MatrixBase< T , CMatrixFixed< T, ROWS, COLS > >::row ( int  rowIdx) const
inlineinherited

◆ rows()

template<typename T, std::size_t ROWS, std::size_t COLS>
constexpr size_type mrpt::math::CMatrixFixed< T, ROWS, COLS >::rows ( ) const
inlineinherited

◆ rpy()

template<class T>
void mrpt::math::CQuaternion< T >::rpy ( T &  roll,
T &  pitch,
T &  yaw 
) const
inline

Return the yaw, pitch & roll angles associated to quaternion.

See also
For the equations, see The MRPT Book, or see http://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToEuler/Quaternions.pdf
rpy_and_jacobian

Definition at line 433 of file CQuaternion.h.

References mrpt::obs::gnss::pitch, mrpt::obs::gnss::roll, and mrpt::math::CQuaternion< T >::rpy_and_jacobian().

Referenced by aux_posequat2poseypr(), mrpt::poses::CPose3D::CPose3D(), mrpt::poses::internal::getPoseFromString(), mrpt::math::slerp(), and mrpt::math::slerp_ypr().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rpy_and_jacobian()

template<class T>
template<class MATRIXLIKE >
void mrpt::math::CQuaternion< T >::rpy_and_jacobian ( T &  roll,
T &  pitch,
T &  yaw,
MATRIXLIKE *  out_dr_dq = nullptr,
bool  resize_out_dr_dq_to3x4 = true 
) const
inline

Return the yaw, pitch & roll angles associated to quaternion, and (optionally) the 3x4 Jacobian of the transformation.

Note that both the angles and the Jacobian have one set of normal equations, plus other special formulas for the degenerated cases of |pitch|=90 degrees.

See also
For the equations, see The MRPT Book, or http://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToEuler/Quaternions.pdf
rpy

Definition at line 449 of file CQuaternion.h.

References M_PI, mrpt::obs::gnss::pitch, mrpt::math::CQuaternion< T >::r(), mrpt::obs::gnss::roll, mrpt::square(), mrpt::math::CQuaternion< T >::x(), mrpt::math::CQuaternion< T >::y(), and mrpt::math::CQuaternion< T >::z().

Referenced by mrpt::poses::CPose3DPDFGaussian::copyFrom(), mrpt::poses::CPose3DPDF::jacobiansPoseComposition(), and mrpt::math::CQuaternion< T >::rpy().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ saveToTextFile()

void mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::saveToTextFile ( const std::string &  file,
mrpt::math::TMatrixTextFileFormat  fileFormat = mrpt::math::MATRIX_FORMAT_ENG,
bool  appendMRPTHeader = false,
const std::string &  userHeader = std::string() 
) const
inherited

Saves the vector/matrix to a file compatible with MATLAB/Octave text format.

Parameters
fileThe target filename.
fileFormatSee TMatrixTextFileFormat. The format of the numbers in the text file.
appendMRPTHeaderInsert this header to the file "% File generated by MRPT. Load with MATLAB with: VAR=load(FILENAME);"
userHeaderAdditional text to be written at the head of the file. Typically MALAB comments "% This file blah blah". Final end-of-line is not needed.
See also
loadFromTextFile, CMatrixDynamic::inMatlabFormat, SAVE_MATRIX

Definition at line 159 of file MatrixVectorBase_impl.h.

References mrpt::system::os::fclose(), mrpt::system::os::fopen(), mrpt::system::os::fprintf(), mrpt::math::MATRIX_FORMAT_ENG, mrpt::math::MATRIX_FORMAT_FIXED, and mrpt::math::MATRIX_FORMAT_INT.

◆ setConstant() [1/3]

void mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::setConstant ( const T  value)
inlineinherited

◆ setConstant() [2/3]

void mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::setConstant ( size_t  nrows,
size_t  ncols,
const T  value 
)
inlineinherited

◆ setConstant() [3/3]

void mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::setConstant ( size_t  nrows,
const T  value 
)
inlineinherited

◆ setDiagonal() [1/3]

void mrpt::math::MatrixBase< T , CMatrixFixed< T, ROWS, COLS > >::setDiagonal ( const std::size_t  N,
const T  value 
)
inlineinherited

Resize to NxN, set all entries to zero, except the main diagonal which is set to value

Definition at line 34 of file MatrixBase.h.

References mrpt::math::MatrixBase< Scalar, Derived >::mbDerived().

Referenced by mrpt::img::CCanvas::ellipseGaussian(), and mrpt::math::MATLAB_plotCovariance2D().

◆ setDiagonal() [2/3]

void mrpt::math::MatrixBase< T , CMatrixFixed< T, ROWS, COLS > >::setDiagonal ( const T  value)
inlineinherited

Set all entries to zero, except the main diagonal which is set to value

Definition at line 43 of file MatrixBase.h.

References ASSERT_EQUAL_, mrpt::math::MatrixBase< Scalar, Derived >::mbDerived(), and mrpt::math::MatrixBase< Scalar, Derived >::setDiagonal().

◆ setDiagonal() [3/3]

void mrpt::math::MatrixBase< T , CMatrixFixed< T, ROWS, COLS > >::setDiagonal ( const std::vector< T > &  diags)
inlineinherited

Resizes to NxN, with N the length of the input vector, set all entries to zero, except the main diagonal which is set to values in the vector.

Definition at line 51 of file MatrixBase.h.

References mrpt::math::MatrixBase< Scalar, Derived >::mbDerived().

◆ setFromMatrixLike()

template<typename T, std::size_t ROWS, std::size_t COLS>
template<class MAT >
void mrpt::math::CMatrixFixed< T, ROWS, COLS >::setFromMatrixLike ( const MAT &  m)
inlineinherited

Definition at line 132 of file CMatrixFixed.h.

Referenced by mrpt::vision::CDifodo::computeWeights(), and mrpt::math::CMatrixFixed< double, ObsDim, PointDof >::operator=().

Here is the caller graph for this function:

◆ setIdentity() [1/2]

void mrpt::math::MatrixBase< T , CMatrixFixed< T, ROWS, COLS > >::setIdentity ( )
inlineinherited

◆ setIdentity() [2/2]

void mrpt::math::MatrixBase< T , CMatrixFixed< T, ROWS, COLS > >::setIdentity ( const std::size_t  N)
inlineinherited

◆ setSize()

template<typename T, std::size_t ROWS, std::size_t COLS>
void mrpt::math::CMatrixFixed< T, ROWS, COLS >::setSize ( size_t  row,
size_t  col,
[[maybe_unused] ] bool  zeroNewElements = false 
)
inlineinherited

Throws if size does not match with the fixed matrix size.

Definition at line 190 of file CMatrixFixed.h.

Referenced by mrpt::math::CMatrixFixed< double, ObsDim, PointDof >::conservativeResize(), and mrpt::math::CMatrixFixed< double, ObsDim, PointDof >::setFromMatrixLike().

Here is the caller graph for this function:

◆ setZero() [1/3]

void mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::setZero ( )
inlineinherited

◆ setZero() [2/3]

void mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::setZero ( size_t  nrows,
size_t  ncols 
)
inlineinherited

◆ setZero() [3/3]

void mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::setZero ( size_t  nrows)
inlineinherited

◆ size()

template<typename T, std::size_t ROWS, std::size_t COLS>
constexpr matrix_size_t mrpt::math::CMatrixFixed< T, ROWS, COLS >::size ( ) const
inlineinherited

Get a 2-vector with [NROWS NCOLS] (as in MATLAB command size(x))

Definition at line 233 of file CMatrixFixed.h.

Referenced by mrpt::obs::CObservation3DRangeScan::getDescriptionAsText(), mrpt::img::TCamera::getDistortionParamsVector(), mrpt::obs::CObservationGPS::serializeFrom(), and mrpt::obs::detail::unprojectInto().

Here is the caller graph for this function:

◆ sum()

T mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::sum ( ) const
inherited

Sum of all elements in matrix/vector.

Definition at line 345 of file MatrixVectorBase_impl.h.

◆ sum_abs()

T mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::sum_abs ( ) const
inherited

Sum of the absolute value of all elements in matrix/vector.

Definition at line 351 of file MatrixVectorBase_impl.h.

◆ sum_At()

template<typename T, std::size_t ROWS, std::size_t COLS>
void mrpt::math::CMatrixFixed< T, ROWS, COLS >::sum_At ( const CMatrixFixed< Scalar, ROWS, COLS > &  A)
inlineinherited

this += AT

Definition at line 345 of file CMatrixFixed.h.

◆ swap()

template<typename T, std::size_t ROWS, std::size_t COLS>
void mrpt::math::CMatrixFixed< T, ROWS, COLS >::swap ( CMatrixFixed< T, ROWS, COLS > &  o)
inlineinherited

Definition at line 197 of file CMatrixFixed.h.

Referenced by mrpt::poses::CPose3DQuat::swap().

Here is the caller graph for this function:

◆ tail()

CMatrixFixed<T , N, 1> mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::tail ( ) const
inlineinherited

◆ trace()

T mrpt::math::MatrixBase< T , CMatrixFixed< T, ROWS, COLS > >::trace ( ) const
inherited

Returns the trace of the matrix (not necessarily square).

Definition at line 219 of file MatrixBase_impl.h.

◆ transpose() [1/2]

auto mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::transpose ( )
inlineinherited

◆ transpose() [2/2]

auto mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::transpose ( ) const
inlineinherited

◆ unsafeRemoveColumns()

void mrpt::math::MatrixBase< T , CMatrixFixed< T, ROWS, COLS > >::unsafeRemoveColumns ( const std::vector< std::size_t > &  idxs)
inherited

Removes columns of the matrix.

This "unsafe" version assumes indices sorted in ascending order.

Definition at line 22 of file MatrixBase_impl.h.

◆ unsafeRemoveRows()

void mrpt::math::MatrixBase< T , CMatrixFixed< T, ROWS, COLS > >::unsafeRemoveRows ( const std::vector< std::size_t > &  idxs)
inherited

Removes rows of the matrix.

This "unsafe" version assumes indices sorted in ascending order.

Definition at line 49 of file MatrixBase_impl.h.

◆ w() [1/2]

template<class T>
T mrpt::math::CQuaternion< T >::w ( ) const
inline

Return w (real part) coordinate of the quaternion.

Alias of r()

Definition at line 103 of file CQuaternion.h.

Referenced by mrpt::math::TPose3D::getAsQuaternion(), quat_vs_YPR(), and mrpt::math::CQuaternion< T >::w().

Here is the caller graph for this function:

◆ w() [2/2]

template<class T>
void mrpt::math::CQuaternion< T >::w ( const T  w)
inline

Set w (real part) coordinate of the quaternion.

Alias of r()

Definition at line 113 of file CQuaternion.h.

References mrpt::math::CQuaternion< T >::w().

Here is the call graph for this function:

◆ x() [1/3]

template<class T>
T mrpt::math::CQuaternion< T >::x ( ) const
inline

Return x coordinate of the quaternion.

Definition at line 105 of file CQuaternion.h.

Referenced by mrpt::poses::CPose3DQuat::asTPose(), check_CPose3D_tofrom_ROS(), mrpt::vision::checkerBoardStereoCalibration(), mrpt::poses::CPose3DQuat::composePoint(), mrpt::math::CQuaternion< T >::conj(), mrpt::math::CQuaternion< T >::CQuaternion(), mrpt::math::CQuaternion< T >::crossProduct(), mrpt::math::CQuaternion< T >::ensurePositiveRealPart(), mrpt::math::CQuaternion< T >::fromRodriguesVector(), mrpt::ros1bridge::fromROS(), mrpt::math::TPose3D::getAsQuaternion(), mrpt::hwdrivers::CImageGrabber_FlyCapture2::getObservation(), mrpt::poses::internal::getPoseFromString(), mrpt::poses::CPose3DQuat::inverseComposeFrom(), mrpt::poses::CPose3DQuat::inverseComposePoint(), mrpt::math::CQuaternion< T >::inverseRotatePoint(), mrpt::poses::CPose3DQuatPDF::jacobiansPoseComposition(), mrpt::math::CQuaternion< T >::ln_noresize(), mrpt::math::CQuaternion< T >::normalizationJacobian(), mrpt::math::CQuaternion< T >::normSqr(), mrpt::topography::path_from_rtk_gps(), quat_vs_YPR(), mrpt::math::CQuaternion< T >::rotatePoint(), mrpt::math::CQuaternion< T >::rotationJacobian(), mrpt::math::CQuaternion< T >::rotationMatrixNoResize(), mrpt::math::CQuaternion< T >::rpy_and_jacobian(), Pose3DQuatTests::test_invComposePointJacob(), mrpt::ros1bridge::toROS(), mrpt::ros1bridge::toROS_Pose(), and mrpt::math::CQuaternion< T >::x().

Here is the caller graph for this function:

◆ x() [2/3]

template<class T>
void mrpt::math::CQuaternion< T >::x ( const T  x)
inline

Set x coordinate of the quaternion.

Definition at line 115 of file CQuaternion.h.

References mrpt::math::CQuaternion< T >::x().

Here is the call graph for this function:

◆ x() [3/3]

template<class T>
T& mrpt::math::CQuaternion< T >::x ( )
inline

Definition at line 122 of file CQuaternion.h.

◆ y() [1/3]

template<class T>
T mrpt::math::CQuaternion< T >::y ( ) const
inline

Return y coordinate of the quaternion.

Definition at line 107 of file CQuaternion.h.

Referenced by mrpt::poses::CPose3DQuat::asTPose(), check_CPose3D_tofrom_ROS(), mrpt::vision::checkerBoardStereoCalibration(), mrpt::poses::CPose3DQuat::composePoint(), mrpt::math::CQuaternion< T >::conj(), mrpt::math::CQuaternion< T >::CQuaternion(), mrpt::math::CQuaternion< T >::crossProduct(), mrpt::math::CQuaternion< T >::ensurePositiveRealPart(), mrpt::math::CQuaternion< T >::fromRodriguesVector(), mrpt::ros1bridge::fromROS(), mrpt::math::TPose3D::getAsQuaternion(), mrpt::hwdrivers::CImageGrabber_FlyCapture2::getObservation(), mrpt::poses::internal::getPoseFromString(), mrpt::poses::CPose3DQuat::inverseComposeFrom(), mrpt::poses::CPose3DQuat::inverseComposePoint(), mrpt::math::CQuaternion< T >::inverseRotatePoint(), mrpt::poses::CPose3DQuatPDF::jacobiansPoseComposition(), mrpt::math::CQuaternion< T >::ln_noresize(), mrpt::math::CQuaternion< T >::normalizationJacobian(), mrpt::math::CQuaternion< T >::normSqr(), mrpt::topography::path_from_rtk_gps(), quat_vs_YPR(), mrpt::math::CQuaternion< T >::rotatePoint(), mrpt::math::CQuaternion< T >::rotationJacobian(), mrpt::math::CQuaternion< T >::rotationMatrixNoResize(), mrpt::math::CQuaternion< T >::rpy_and_jacobian(), Pose3DQuatTests::test_invComposePointJacob(), mrpt::ros1bridge::toROS(), mrpt::ros1bridge::toROS_Pose(), and mrpt::math::CQuaternion< T >::y().

Here is the caller graph for this function:

◆ y() [2/3]

template<class T>
void mrpt::math::CQuaternion< T >::y ( const T  y)
inline

Set y coordinate of the quaternion.

Definition at line 117 of file CQuaternion.h.

References mrpt::math::CQuaternion< T >::y().

Here is the call graph for this function:

◆ y() [3/3]

template<class T>
T& mrpt::math::CQuaternion< T >::y ( )
inline

Definition at line 123 of file CQuaternion.h.

◆ z() [1/3]

template<class T>
T mrpt::math::CQuaternion< T >::z ( ) const
inline

Return z coordinate of the quaternion.

Definition at line 109 of file CQuaternion.h.

Referenced by mrpt::poses::CPose3DQuat::asTPose(), check_CPose3D_tofrom_ROS(), mrpt::vision::checkerBoardStereoCalibration(), mrpt::poses::CPose3DQuat::composePoint(), mrpt::math::CQuaternion< T >::conj(), mrpt::math::CQuaternion< T >::CQuaternion(), mrpt::math::CQuaternion< T >::crossProduct(), mrpt::math::CQuaternion< T >::ensurePositiveRealPart(), mrpt::math::CQuaternion< T >::fromRodriguesVector(), mrpt::ros1bridge::fromROS(), mrpt::math::TPose3D::getAsQuaternion(), mrpt::hwdrivers::CImageGrabber_FlyCapture2::getObservation(), mrpt::poses::internal::getPoseFromString(), mrpt::poses::CPose3DQuat::inverseComposeFrom(), mrpt::poses::CPose3DQuat::inverseComposePoint(), mrpt::math::CQuaternion< T >::inverseRotatePoint(), mrpt::poses::CPose3DQuatPDF::jacobiansPoseComposition(), mrpt::math::CQuaternion< T >::ln_noresize(), mrpt::math::CQuaternion< T >::normalizationJacobian(), mrpt::math::CQuaternion< T >::normSqr(), mrpt::topography::path_from_rtk_gps(), quat_vs_YPR(), mrpt::math::CQuaternion< T >::rotatePoint(), mrpt::math::CQuaternion< T >::rotationJacobian(), mrpt::math::CQuaternion< T >::rotationMatrixNoResize(), mrpt::math::CQuaternion< T >::rpy_and_jacobian(), Pose3DQuatTests::test_invComposePointJacob(), mrpt::ros1bridge::toROS(), mrpt::ros1bridge::toROS_Pose(), and mrpt::math::CQuaternion< T >::z().

Here is the caller graph for this function:

◆ z() [2/3]

template<class T>
void mrpt::math::CQuaternion< T >::z ( const T  z)
inline

Set z coordinate of the quaternion.

Definition at line 119 of file CQuaternion.h.

References mrpt::math::CQuaternion< T >::z().

Here is the call graph for this function:

◆ z() [3/3]

template<class T>
T& mrpt::math::CQuaternion< T >::z ( )
inline

Definition at line 124 of file CQuaternion.h.

◆ Zero() [1/2]

static CMatrixFixed< T, ROWS, COLS > mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::Zero ( )
inlinestaticinherited

◆ Zero() [2/2]

static CMatrixFixed< T, ROWS, COLS > mrpt::math::MatrixVectorBase< T , CMatrixFixed< T, ROWS, COLS > >::Zero ( size_t  nrows,
size_t  ncols 
)
inlinestaticinherited

Member Data Documentation

◆ ColsAtCompileTime

template<typename T, std::size_t ROWS, std::size_t COLS>
constexpr int mrpt::math::CMatrixFixed< T, ROWS, COLS >::ColsAtCompileTime = COLS
staticinherited

Definition at line 52 of file CMatrixFixed.h.

◆ is_mrpt_type

template<typename T, std::size_t ROWS, std::size_t COLS>
constexpr int mrpt::math::CMatrixFixed< T, ROWS, COLS >::is_mrpt_type = 1
staticinherited

Definition at line 54 of file CMatrixFixed.h.

◆ RowsAtCompileTime

template<typename T, std::size_t ROWS, std::size_t COLS>
constexpr int mrpt::math::CMatrixFixed< T, ROWS, COLS >::RowsAtCompileTime = ROWS
staticinherited

Definition at line 51 of file CMatrixFixed.h.

◆ SizeAtCompileTime

template<typename T, std::size_t ROWS, std::size_t COLS>
constexpr int mrpt::math::CMatrixFixed< T, ROWS, COLS >::SizeAtCompileTime = ROWS * COLS
staticinherited

Definition at line 53 of file CMatrixFixed.h.

◆ StorageOrder

template<typename T, std::size_t ROWS, std::size_t COLS>
constexpr int mrpt::math::CMatrixFixed< T, ROWS, COLS >::StorageOrder
staticinherited
Initial value:
=
(ROWS != 1 && COLS == 1) ? 0 : 1

Definition at line 55 of file CMatrixFixed.h.




Page generated by Doxygen 1.8.14 for MRPT 2.0.4 Git: 33de1d0ad Sat Jun 20 11:02:42 2020 +0200 at sáb jun 20 17:35:17 CEST 2020