MRPT
1.9.9
|
A quaternion, which can represent a 3D rotation as pair , with a real part "r" and a 3D vector , 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:
Definition at line 44 of file CQuaternion.h.
#include <mrpt/math/CQuaternion.h>
Public Member Functions | |
T | r () const |
Return r coordinate of the quaternion. More... | |
T | x () const |
Return x coordinate of the quaternion. More... | |
T | y () const |
Return y coordinate of the quaternion. More... | |
T | z () const |
Return z coordinate of the quaternion. More... | |
void | r (const T r) |
Set r 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... | |
template<class ARRAYLIKE3 > | |
void | fromRodriguesVector (const ARRAYLIKE3 &v) |
Set this quaternion to the rotation described by a 3D (Rodrigues) rotation vector : If , then the quaternion is , otherwise:
where . 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 , that is the 4x4 matrix . More... | |
template<class MATRIXLIKE > | |
void | rotationMatrix (MATRIXLIKE &M) const |
Calculate the 3x3 rotation matrix associated to this quaternion:
. More... | |
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) |
CMatrixFixed & | derived () |
const CMatrixFixed & | derived () 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 |
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>`) | |
T | 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... | |
T | maximumDiagonal () const |
Returns the maximum value in the diagonal. More... | |
T | minimumDiagonal () const |
Returns the minimum value in the diagonal. More... | |
T | 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 > | 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 |
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... | |
T | minCoeff () const |
Minimum value in the matrix/vector. More... | |
T | minCoeff (std::size_t &outIndexOfMin) const |
T | minCoeff (std::size_t &rowIdx, std::size_t &colIdx) const |
T | maxCoeff () const |
Maximum value in the matrix/vector. More... | |
T | maxCoeff (std::size_t &outIndexOfMax) const |
T | 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... | |
T | norm_inf () const |
Compute the norm-infinite of a vector ($f[ ||{v}||_ $f]), ie the maximum absolute value of the elements. More... | |
T | 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) |
T | dot (const CVectorDynamic< T > &v) const |
dot product of this \cdot v More... | |
T | 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... | |
T | sum () const |
Sum of all elements in matrix/vector. More... | |
T | 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) |
|
private |
Definition at line 46 of file CQuaternion.h.
|
inherited |
Definition at line 63 of file CMatrixFixed.h.
|
inherited |
Definition at line 48 of file CMatrixFixed.h.
|
inherited |
Definition at line 50 of file CMatrixFixed.h.
|
inherited |
Definition at line 57 of file CMatrixFixed.h.
|
inherited |
Definition at line 46 of file CMatrixFixed.h.
|
inherited |
Definition at line 62 of file CMatrixFixed.h.
|
inherited |
Definition at line 47 of file CMatrixFixed.h.
|
inherited |
Definition at line 45 of file CMatrixFixed.h.
|
inherited |
Definition at line 49 of file CMatrixFixed.h.
|
inherited |
The type of the matrix elements.
Definition at line 44 of file CMatrixFixed.h.
|
inline |
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.
|
inline |
Default constructor: construct a (1, (0,0,0) ) quaternion representing no rotation.
Definition at line 58 of file CQuaternion.h.
|
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::format(), 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().
|
inlineinherited |
Definition at line 170 of file MatrixVectorBase.h.
References mrpt::math::MatrixVectorBase< Scalar, Derived >::mvbDerived().
Referenced by mrpt::img::CCanvas::ellipseGaussian(), and TEST().
|
inlineinherited |
Definition at line 175 of file MatrixVectorBase.h.
References mrpt::math::MatrixVectorBase< Scalar, Derived >::mvbDerived().
|
inlineinherited |
Get as an Eigen-compatible Eigen::Map object.
Definition at line 251 of file CMatrixFixed.h.
Referenced by mrpt::poses::CPoint2DPDFGaussian::bayesianFusion(), mrpt::poses::CPointPDFGaussian::bayesianFusion(), mrpt::poses::CPosePDFGaussian::bayesianFusion(), mrpt::poses::CPointPDFSOG::bayesianFusion(), mrpt::poses::CPosePDFSOG::bayesianFusion(), 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::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::CPosePDFGaussian::inverse(), mrpt::poses::CPosePDFGaussianInf::inverse(), mrpt::poses::CPosePDFGaussian::inverseComposition(), mrpt::poses::CPose3DPDF::jacobiansPoseComposition(), mrpt::poses::CPoint2DPDFGaussian::mahalanobisDistanceTo(), mrpt::poses::CPosePDFGaussian::mahalanobisDistanceTo(), mrpt::poses::CPosePDFGaussianInf::mahalanobisDistanceTo(), mrpt::poses::CPoint2DPDFGaussian::mahalanobisDistanceToPoint(), 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::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().
|
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.
|
inlineinherited |
Definition at line 106 of file MatrixVectorBase.h.
References mrpt::math::MatrixVectorBase< Scalar, Derived >::fill(), and mrpt::math::MatrixVectorBase< Scalar, Derived >::mvbDerived().
|
inherited |
Returns a string representation of the vector/matrix, using Eigen's default settings.
Definition at line 335 of file MatrixVectorBase_impl.h.
Referenced by TEST().
|
inlineinherited |
Definition at line 64 of file CMatrixFixed.h.
|
inlineinherited |
Definition at line 66 of file CMatrixFixed.h.
|
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().
|
inlineinherited |
Definition at line 145 of file MatrixVectorBase.h.
References mrpt::math::MatrixVectorBase< Scalar, Derived >::mvbDerived().
|
inlineinherited |
Definition at line 151 of file MatrixVectorBase.h.
References mrpt::math::MatrixVectorBase< Scalar, Derived >::mvbDerived().
|
inlineinherited |
const blockCopy(): Returns a copy of the given block
Definition at line 248 of file MatrixVectorBase.h.
References mrpt::math::MatrixVectorBase< Scalar, Derived >::mvbDerived().
|
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().
|
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::project3DPointsFromDepthImageInto().
|
inlineinherited |
Definition at line 68 of file CMatrixFixed.h.
|
inlineinherited |
Definition at line 69 of file CMatrixFixed.h.
|
inherited |
Cholesky M=UT * U decomposition for symmetric matrix (upper-half of the matrix is actually ignored.
Definition at line 165 of file MatrixBase_impl.h.
|
inlineinherited |
Definition at line 244 of file MatrixVectorBase.h.
References mrpt::math::MatrixVectorBase< Scalar, Derived >::mvbDerived().
|
inlineinherited |
Definition at line 243 of file MatrixVectorBase.h.
References mrpt::math::MatrixVectorBase< Scalar, Derived >::mvbDerived().
|
inlineinherited |
Definition at line 89 of file MatrixBase.h.
References mrpt::math::MatrixBase< Scalar, Derived >::mbDerived().
Referenced by mrpt::math::CMatrixFixed< double, ObsDim, PointDof >::conservativeResize(), mrpt::math::CMatrixFixed< double, ObsDim, PointDof >::operator()(), mrpt::math::CMatrixFixed< double, ObsDim, PointDof >::resize(), and mrpt::math::CMatrixFixed< double, ObsDim, PointDof >::setSize().
|
inlineinherited |
Definition at line 94 of file MatrixBase.h.
References mrpt::math::MatrixBase< Scalar, Derived >::mbDerived().
|
inlineinherited |
Number of columns in the matrix.
Definition at line 230 of file CMatrixFixed.h.
Referenced by mrpt::math::CMatrixFixed< double, ObsDim, PointDof >::CMatrixFixed(), mrpt::math::operator>>(), mrpt::vision::pinhole::projectPoints_with_distortion(), mrpt::bayes::CKalmanFilterCapable< 7, 3, 3, 7 >::runOneKalmanIteration(), mrpt::poses::CPose3DQuatPDFGaussianInf::serializeFrom(), mrpt::poses::CPose3DQuatPDFGaussianInf::serializeTo(), mrpt::math::CMatrixFixed< double, ObsDim, PointDof >::setFromMatrixLike(), and TEST().
|
inline |
Return the conjugate quaternion.
Definition at line 377 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().
|
inline |
Return the conjugate quaternion.
Definition at line 386 of file CQuaternion.h.
|
inlineinherited |
Definition at line 202 of file CMatrixFixed.h.
|
inlinestaticinherited |
Definition at line 89 of file MatrixVectorBase.h.
References ASSERTMSG_.
|
inlinestaticinherited |
Definition at line 99 of file MatrixVectorBase.h.
|
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 205 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().
|
inlineinherited |
Definition at line 200 of file CMatrixFixed.h.
|
inlineinherited |
Definition at line 201 of file CMatrixFixed.h.
|
inherited |
Determinant of matrix.
Definition at line 76 of file MatrixBase_impl.h.
Referenced by mrpt::math::productIntegralTwoGaussians().
|
inherited |
dot product of this \cdot v
Definition at line 509 of file MatrixVectorBase_impl.h.
References ASSERTMSG_.
|
inherited |
Definition at line 522 of file MatrixVectorBase_impl.h.
References ASSERTMSG_.
|
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.
[in] | sorted | If true, eigenvalues (and eigenvectors) will be sorted in ascending order. |
[out] | eVecs | The container where eigenvectors will be stored. |
[out] | eVals | The container where eigenvalues will be stored. |
Definition at line 107 of file MatrixBase_impl.h.
References ASSERT_EQUAL_, and mrpt::math::detail::sortEigResults().
Referenced by mrpt::img::CCanvas::ellipseGaussian().
|
inherited |
Read: eig()
Definition at line 131 of file MatrixBase_impl.h.
References ASSERT_EQUAL_, and mrpt::math::detail::sortEigResults().
|
inlineinherited |
returns true if matrix/vector has size=0
Definition at line 269 of file MatrixVectorBase.h.
References mrpt::math::MatrixVectorBase< Scalar, Derived >::mvbDerived().
|
inlineinherited |
Definition at line 65 of file CMatrixFixed.h.
|
inlineinherited |
Definition at line 67 of file CMatrixFixed.h.
|
inlinestatic |
Exponential map from the SO(3) Lie Algebra to unit quaternions.
Definition at line 185 of file CQuaternion.h.
References mrpt::math::UNINITIALIZED_QUATERNION.
|
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 193 of file CQuaternion.h.
References mrpt::math::CQuaternion< T >::fromRodriguesVector().
|
inlineinherited |
Definition at line 128 of file MatrixBase.h.
References ASSERT_BELOW_, and mrpt::math::MatrixBase< Scalar, Derived >::mbDerived().
|
inlineinherited |
Definition at line 136 of file MatrixBase.h.
References mrpt::math::MatrixBase< Scalar, Derived >::extractColumn().
|
inlineinherited |
Definition at line 232 of file MatrixBase.h.
References ASSERT_BELOWEQ_, and mrpt::math::MatrixBase< Scalar, Derived >::mbDerived().
|
inlineinherited |
Definition at line 245 of file MatrixBase.h.
References ASSERT_BELOWEQ_, and mrpt::math::MatrixBase< Scalar, Derived >::mbDerived().
|
inlineinherited |
Definition at line 112 of file MatrixBase.h.
References ASSERT_BELOW_, and mrpt::math::MatrixBase< Scalar, Derived >::mbDerived().
|
inlineinherited |
Definition at line 120 of file MatrixBase.h.
References mrpt::math::MatrixBase< Scalar, Derived >::extractRow().
|
inlineinherited |
Fill all the elements with a given value (Note: named "fillAll" since "fill" will be used by child classes)
Definition at line 70 of file MatrixVectorBase.h.
References mrpt::containers::begin(), mrpt::math::MatrixVectorBase< Scalar, Derived >::mvbDerived(), and val.
Referenced by Pose3DTests::check_jacob_expe_e_at_0(), Pose3DTests::check_jacob_LnT_T(), Pose3DQuatTests::test_composePointJacob(), Pose3DTests::test_composePointJacob(), Pose3DTests::test_composePointJacob_se3(), Pose3DQuatTests::test_invComposePointJacob(), Pose3DTests::test_invComposePointJacob(), Pose3DTests::test_invComposePointJacob_se3(), Pose3DTests::test_Jacob_dAexpeD_de(), Pose3DTests::test_Jacob_dDexpe_de(), Pose3DTests::test_Jacob_dexpeD_de(), SE_traits_tests< POSE_TYPE >::test_jacobs_AB(), SE_traits_tests< POSE_TYPE >::test_jacobs_DinvP1InvP2(), Pose3DQuatTests::test_normalizeJacob(), Pose3DQuatTests::test_sphericalCoords(), Pose3DPDFGaussTests::testCompositionJacobian(), Pose3DQuatPDFGaussTests::testCompositionJacobian(), Pose3DQuatPDFGaussTests::testInverse(), Pose3DPDFGaussTests::testPoseComposition(), Pose3DQuatPDFGaussTests::testPoseComposition(), Pose3DPDFGaussTests::testPoseInverseComposition(), and Pose3DQuatPDFGaussTests::testPoseInverseComposition().
|
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 ' ', tabs '' or commas ','.
This format is also used for CConfigFile::read_matrix.
Definition at line 24 of file MatrixVectorBase_impl.h.
References val.
Referenced by TEST().
|
inline |
Set this quaternion to the rotation described by a 3D (Rodrigues) rotation vector : If , then the quaternion is , otherwise:
where .
Definition at line 115 of file CQuaternion.h.
References ASSERT_, ASSERTMSG_, mrpt::format(), MRPT_END, MRPT_START, mrpt::math::CQuaternion< T >::normSqr(), mrpt::math::CQuaternion< T >::r(), and mrpt::math::CQuaternion< T >::z().
Referenced by mrpt::math::CQuaternion< T >::exp().
|
inlineinherited |
Definition at line 232 of file MatrixVectorBase.h.
References mrpt::math::MatrixVectorBase< Scalar, Derived >::mvbDerived().
|
inlinestaticinherited |
Definition at line 64 of file MatrixBase.h.
References ASSERTMSG_.
|
inlinestaticinherited |
Definition at line 74 of file MatrixBase.h.
|
inherited |
Exports the matrix as a string compatible with Matlab/Octave.
Definition at line 139 of file MatrixVectorBase_impl.h.
|
inlineinherited |
Copies the given input submatrix/vector into this matrix/vector, starting at the given top-left coordinates.
Definition at line 210 of file MatrixBase.h.
References ASSERT_BELOWEQ_, and mrpt::math::MatrixBase< Scalar, Derived >::mbDerived().
Referenced by mrpt::poses::CPose3DQuatPDFGaussian::copyFrom(), mrpt::poses::CPose3DQuatPDFGaussianInf::inverse(), mrpt::poses::CPose3DQuatPDFGaussian::inverse(), mrpt::poses::CPose3DQuat::inverseComposePoint(), and mrpt::poses::CPose3DPDF::jacobiansPoseComposition().
|
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().
|
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.
|
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().
|
inline |
Rotate a 3D point (lx,ly,lz) -> (gx,gy,gz) as described by the inverse (conjugate) of this quaternion.
Definition at line 248 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().
|
inlineinherited |
returns true if matrix is NxN
Definition at line 266 of file MatrixVectorBase.h.
References mrpt::math::MatrixVectorBase< Scalar, Derived >::mvbDerived().
|
inherited |
Solves the linear system Ax=b, returns x, with A this symmetric matrix.
Definition at line 34 of file CMatrixFixed_impl.h.
|
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 ;-).
[out] | out_ln | The target vector, which can be: std::vector<>, or mrpt::math::CVectorDouble or any row or column Eigen::Matrix<>. |
Definition at line 157 of file CQuaternion.h.
References mrpt::math::CQuaternion< T >::ln_noresize().
Referenced by QuaternionTests::test_ExpAndLnMatches(), and QuaternionTests::test_lnAndExpMatches().
|
inline |
overload that returns by value
Definition at line 164 of file CQuaternion.h.
|
inline |
Like ln() but does not try to resize the output vector.
Definition at line 172 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().
|
inlineinherited |
Definition at line 171 of file CMatrixFixed.h.
Referenced by mrpt::math::CMatrixFixed< double, ObsDim, PointDof >::CMatrixFixed(), mrpt::poses::CPose3DQuat::composePoint(), mrpt::poses::CPose3D::composePoint(), mrpt::vision::frameJac(), mrpt::math::TPose3D::getAsQuaternion(), mrpt::poses::CPose3DQuat::inverseComposePoint(), mrpt::poses::CPose3D::inverseComposePoint(), TEST(), and mrpt::hwdrivers::CRovio::TOptions::TOptions().
|
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().
|
inherited |
Loads a vector/matrix from a text file, compatible with MATLAB text format.
Lines starting with '' or '#' are interpreted as comments and ignored.
std::runtime_error | On format error. |
Definition at line 236 of file MatrixVectorBase_impl.h.
|
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 324 of file MatrixVectorBase_impl.h.
|
inherited |
Solves the linear system Ax=b, returns x, with A this asymmetric matrix.
Definition at line 49 of file CMatrixFixed_impl.h.
Referenced by mrpt::nav::CPTG_Holo_Blend::inverseMap_WS2TP().
|
inlineinherited |
Definition at line 261 of file MatrixBase.h.
References mrpt::math::MatrixBase< Scalar, Derived >::mbDerived().
|
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.
|
inherited |
this = A * b , with A
and b
a dynamic matrix & vector
Definition at line 483 of file MatrixVectorBase_impl.h.
|
inlineinherited |
Definition at line 280 of file MatrixBase.h.
References mrpt::math::MatrixBase< Scalar, Derived >::mbDerived().
|
inherited |
this = AT * b , with A
and b
a dynamic matrix & vector
Definition at line 490 of file MatrixVectorBase_impl.h.
|
inherited |
Maximum value in the matrix/vector.
Definition at line 361 of file MatrixVectorBase_impl.h.
|
inherited |
Definition at line 382 of file MatrixVectorBase_impl.h.
|
inherited |
Definition at line 407 of file MatrixVectorBase_impl.h.
|
inherited |
Returns the maximum value in the diagonal.
Definition at line 207 of file MatrixBase_impl.h.
|
inlineinherited |
Definition at line 26 of file MatrixBase.h.
|
inlineinherited |
Definition at line 27 of file MatrixBase.h.
|
inherited |
Minimum value in the matrix/vector.
Definition at line 355 of file MatrixVectorBase_impl.h.
|
inherited |
Definition at line 367 of file MatrixVectorBase_impl.h.
|
inherited |
Definition at line 396 of file MatrixVectorBase_impl.h.
|
inherited |
Returns the minimum value in the diagonal.
Definition at line 213 of file MatrixBase_impl.h.
|
inlineinherited |
Definition at line 59 of file MatrixVectorBase.h.
|
inlineinherited |
Definition at line 60 of file MatrixVectorBase.h.
|
inherited |
Compute the L2 norm of a vector/array/matrix (the Euclidean distance to the origin, taking all the elements as a single vector).
Definition at line 503 of file MatrixVectorBase_impl.h.
Referenced by mrpt::nav::CPTG_Holo_Blend::inverseMap_WS2TP().
|
inherited |
Compute the norm-infinite of a vector ($f[ ||{v}||_ $f]), ie the maximum absolute value of the elements.
Definition at line 497 of file MatrixVectorBase_impl.h.
|
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 286 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::CPose3DQuat::inverseComposePoint(), mrpt::poses::CPose3DQuatPDF::jacobiansPoseComposition(), mrpt::poses::CPose3DPDF::jacobiansPoseComposition(), and Pose3DQuatTests::test_normalizeJacob().
|
inline |
Normalize this quaternion, so its norm becomes the unitity.
Definition at line 275 of file CQuaternion.h.
References mrpt::math::CQuaternion< T >::normSqr().
Referenced by mrpt::poses::CPose3DQuat::CPose3DQuat(), and mrpt::math::CQuaternion< T >::crossProduct().
|
inline |
Return the squared norm of the quaternion.
Definition at line 267 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().
|
inlineinherited |
Definition at line 441 of file MatrixVectorBase.h.
|
inlineinherited |
Access (row,col), without out-of-bounds check (except in Debug builds)
Definition at line 277 of file CMatrixFixed.h.
|
inlineinherited |
Definition at line 283 of file CMatrixFixed.h.
|
inlineinherited |
Access the i-th element, Row-Major order, without out-of-bounds check (except in Debug builds)
Definition at line 293 of file CMatrixFixed.h.
|
inlineinherited |
Definition at line 298 of file CMatrixFixed.h.
|
inlineinherited |
Definition at line 214 of file MatrixVectorBase.h.
References mrpt::math::MatrixVectorBase< Scalar, Derived >::mvbDerived().
|
inlineinherited |
Definition at line 219 of file MatrixVectorBase.h.
References mrpt::math::MatrixVectorBase< Scalar, Derived >::mvbDerived().
|
inherited |
Definition at line 436 of file MatrixVectorBase_impl.h.
|
inherited |
Definition at line 468 of file MatrixVectorBase_impl.h.
References ASSERTMSG_.
|
inline |
Definition at line 494 of file CQuaternion.h.
|
inherited |
Definition at line 430 of file MatrixVectorBase_impl.h.
|
inlineinherited |
Definition at line 188 of file MatrixVectorBase.h.
References mrpt::math::MatrixVectorBase< Scalar, Derived >::mvbDerived().
|
inlineinherited |
Definition at line 288 of file MatrixVectorBase.h.
References mrpt::math::MatrixVectorBase< Scalar, Derived >::impl_op_add().
|
inlineinherited |
Definition at line 194 of file MatrixVectorBase.h.
References mrpt::math::MatrixVectorBase< Scalar, Derived >::mvbDerived().
|
inherited |
Definition at line 418 of file MatrixVectorBase_impl.h.
|
inlineinherited |
Definition at line 303 of file MatrixVectorBase.h.
References mrpt::math::MatrixVectorBase< Scalar, Derived >::impl_op_selfadd().
|
inlineinherited |
Definition at line 181 of file MatrixVectorBase.h.
References mrpt::math::MatrixVectorBase< Scalar, Derived >::mvbDerived().
|
inlineinherited |
Definition at line 201 of file MatrixVectorBase.h.
References mrpt::math::MatrixVectorBase< Scalar, Derived >::mvbDerived().
|
inlineinherited |
Definition at line 318 of file MatrixVectorBase.h.
References mrpt::math::MatrixVectorBase< Scalar, Derived >::impl_op_subs().
|
inlineinherited |
Definition at line 207 of file MatrixVectorBase.h.
References mrpt::math::MatrixVectorBase< Scalar, Derived >::mvbDerived().
|
inherited |
Definition at line 424 of file MatrixVectorBase_impl.h.
|
inlineinherited |
Definition at line 333 of file MatrixVectorBase.h.
References mrpt::math::MatrixVectorBase< Scalar, Derived >::impl_op_selfsubs().
|
inlineinherited |
Definition at line 431 of file MatrixVectorBase.h.
References mrpt::math::MatrixVectorBase< Scalar, Derived >::mvbDerived().
|
inlineinherited |
Access the [i-th] element (for 1xN or Nx1 matrices)
Definition at line 305 of file CMatrixFixed.h.
|
inlineinherited |
Definition at line 311 of file CMatrixFixed.h.
|
inline |
Return r coordinate of the quaternion.
Definition at line 85 of file CQuaternion.h.
Referenced by mrpt::poses::CPose3DQuat::asTPose(), mrpt::poses::CPose3DQuat::composePoint(), mrpt::math::CQuaternion< T >::conj(), mrpt::math::CQuaternion< T >::CQuaternion(), mrpt::math::CQuaternion< T >::crossProduct(), mrpt::math::CQuaternion< T >::fromRodriguesVector(), 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(), and Pose3DQuatTests::test_invComposePointJacob().
|
inline |
Set r coordinate of the quaternion.
Definition at line 93 of file CQuaternion.h.
References mrpt::math::CQuaternion< T >::r().
|
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.
|
inherited |
Removes columns of the matrix.
Indices may be unsorted and duplicated
Definition at line 38 of file MatrixBase_impl.h.
|
inherited |
Removes rows of the matrix.
Indices may be unsorted and duplicated
Definition at line 65 of file MatrixBase_impl.h.
|
inlineinherited |
Definition at line 204 of file CMatrixFixed.h.
Referenced by mrpt::math::CMatrixFixed< double, ObsDim, PointDof >::resize().
|
inlineinherited |
Throws if size does not match with the fixed matrix size.
Definition at line 215 of file CMatrixFixed.h.
|
inlineinherited |
Definition at line 220 of file CMatrixFixed.h.
|
inline |
Rotate a 3D point (lx,ly,lz) -> (gx,gy,gz) as described by this quaternion.
Definition at line 227 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().
|
inline |
Compute the Jacobian of the rotation composition operation , that is the 4x4 matrix .
The output matrix can be a dynamic or fixed size (4x4) matrix.
Definition at line 318 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().
|
inline |
Calculate the 3x3 rotation matrix associated to this quaternion:
.
Definition at line 353 of file CQuaternion.h.
References mrpt::math::CQuaternion< T >::rotationMatrixNoResize().
|
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 363 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::getHomogeneousMatrix(), and mrpt::math::CQuaternion< T >::rotationMatrix().
|
inlineinherited |
Definition at line 100 of file MatrixBase.h.
References mrpt::math::MatrixBase< Scalar, Derived >::mbDerived().
|
inlineinherited |
Definition at line 105 of file MatrixBase.h.
References mrpt::math::MatrixBase< Scalar, Derived >::mbDerived().
|
inlineinherited |
Number of rows in the matrix.
Definition at line 227 of file CMatrixFixed.h.
Referenced by mrpt::math::CMatrixFixed< double, ObsDim, PointDof >::CMatrixFixed(), mrpt::poses::CPose3DPDFGaussian::enforceCovSymmetry(), mrpt::poses::CPose3DPDFGaussianInf::enforceCovSymmetry(), mrpt::poses::CPose3DQuatPDFGaussian::enforceCovSymmetry(), mrpt::math::operator>>(), mrpt::vision::pinhole::projectPoints_with_distortion(), mrpt::poses::CPose3DQuatPDFGaussianInf::serializeFrom(), mrpt::poses::CPose3DQuatPDFGaussianInf::serializeTo(), mrpt::math::CMatrixFixed< double, ObsDim, PointDof >::setFromMatrixLike(), and TEST().
|
inline |
Return the yaw, pitch & roll angles associated to quaternion.
Definition at line 398 of file CQuaternion.h.
References mrpt::obs::gnss::pitch, mrpt::obs::gnss::roll, and mrpt::math::CQuaternion< T >::rpy_and_jacobian().
Referenced by mrpt::poses::internal::getPoseFromString().
|
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.
Definition at line 414 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().
|
inherited |
Saves the vector/matrix to a file compatible with MATLAB/Octave text format.
file | The target filename. |
fileFormat | See TMatrixTextFileFormat. The format of the numbers in the text file. |
appendMRPTHeader | Insert this header to the file "% File generated by MRPT. Load with MATLAB with: VAR=load(FILENAME);" |
userHeader | Additional text to be written at the head of the file. Typically MALAB comments "% This file blah blah". Final end-of-line is not needed. |
Definition at line 157 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.
|
inlineinherited |
Definition at line 75 of file MatrixVectorBase.h.
References mrpt::math::MatrixVectorBase< Scalar, Derived >::fill().
|
inlineinherited |
Definition at line 76 of file MatrixVectorBase.h.
References mrpt::math::MatrixVectorBase< Scalar, Derived >::fill(), and mrpt::math::MatrixVectorBase< Scalar, Derived >::mvbDerived().
|
inlineinherited |
Definition at line 81 of file MatrixVectorBase.h.
References ASSERTMSG_, and mrpt::math::MatrixVectorBase< Scalar, Derived >::setConstant().
|
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().
|
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().
|
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().
|
inlineinherited |
Definition at line 132 of file CMatrixFixed.h.
Referenced by mrpt::vision::CDifodo::computeWeights(), and mrpt::math::CMatrixFixed< double, ObsDim, PointDof >::operator=().
|
inlineinherited |
Definition at line 57 of file MatrixBase.h.
References ASSERT_EQUAL_, mrpt::math::MatrixBase< Scalar, Derived >::mbDerived(), and mrpt::math::MatrixBase< Scalar, Derived >::setDiagonal().
Referenced by TEST().
|
inlineinherited |
Definition at line 62 of file MatrixBase.h.
References mrpt::math::MatrixBase< Scalar, Derived >::setDiagonal().
|
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().
|
inlineinherited |
Definition at line 112 of file MatrixVectorBase.h.
References mrpt::math::MatrixVectorBase< Scalar, Derived >::fill().
Referenced by mrpt::poses::CPose3DPDFParticles::getCovarianceAndMean(), mrpt::vision::recompute_errors_and_Jacobians(), Pose3DTests::test_Jacob_dAexpeD_de(), Pose3DTests::test_Jacob_dDexpe_de(), and Pose3DTests::test_Jacob_dexpeD_de().
|
inlineinherited |
Definition at line 113 of file MatrixVectorBase.h.
References mrpt::math::MatrixVectorBase< Scalar, Derived >::setConstant().
|
inlineinherited |
Definition at line 117 of file MatrixVectorBase.h.
References ASSERTMSG_, and mrpt::math::MatrixVectorBase< Scalar, Derived >::setConstant().
|
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::maps::COccupancyGridMap2D::internal_insertObservation().
|
inherited |
Sum of all elements in matrix/vector.
Definition at line 343 of file MatrixVectorBase_impl.h.
|
inherited |
Sum of the absolute value of all elements in matrix/vector.
Definition at line 349 of file MatrixVectorBase_impl.h.
|
inlineinherited |
this += AT
Definition at line 330 of file CMatrixFixed.h.
|
inlineinherited |
Definition at line 197 of file CMatrixFixed.h.
Referenced by mrpt::poses::CPose3DQuat::swap().
|
inlineinherited |
Definition at line 226 of file MatrixVectorBase.h.
References mrpt::math::MatrixVectorBase< Scalar, Derived >::mvbDerived().
|
inherited |
Returns the trace of the matrix (not necessarily square).
Definition at line 219 of file MatrixBase_impl.h.
|
inlineinherited |
Definition at line 159 of file MatrixVectorBase.h.
References mrpt::math::MatrixVectorBase< Scalar, Derived >::mvbDerived().
Referenced by mrpt::poses::CPose3DPDFGaussian::copyFrom(), and mrpt::img::CCanvas::ellipseGaussian().
|
inlineinherited |
Definition at line 164 of file MatrixVectorBase.h.
References mrpt::math::MatrixVectorBase< Scalar, Derived >::mvbDerived().
|
inherited |
Removes columns of the matrix.
This "unsafe" version assumes indices sorted in ascending order.
Definition at line 22 of file MatrixBase_impl.h.
|
inherited |
Removes rows of the matrix.
This "unsafe" version assumes indices sorted in ascending order.
Definition at line 49 of file MatrixBase_impl.h.
|
inline |
Return x coordinate of the quaternion.
Definition at line 87 of file CQuaternion.h.
Referenced by mrpt::poses::CPose3DQuat::asTPose(), mrpt::poses::CPose3DQuat::composePoint(), mrpt::math::CQuaternion< T >::conj(), mrpt::math::CQuaternion< T >::CQuaternion(), mrpt::math::CQuaternion< T >::crossProduct(), 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 >::rotatePoint(), mrpt::math::CQuaternion< T >::rotationJacobian(), mrpt::math::CQuaternion< T >::rotationMatrixNoResize(), mrpt::math::CQuaternion< T >::rpy_and_jacobian(), Pose3DQuatTests::test_invComposePointJacob(), and mrpt::math::CQuaternion< T >::x().
|
inline |
Set x coordinate of the quaternion.
Definition at line 95 of file CQuaternion.h.
References mrpt::math::CQuaternion< T >::x().
|
inline |
Return y coordinate of the quaternion.
Definition at line 89 of file CQuaternion.h.
Referenced by mrpt::poses::CPose3DQuat::asTPose(), mrpt::poses::CPose3DQuat::composePoint(), mrpt::math::CQuaternion< T >::conj(), mrpt::math::CQuaternion< T >::CQuaternion(), mrpt::math::CQuaternion< T >::crossProduct(), 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 >::rotatePoint(), mrpt::math::CQuaternion< T >::rotationJacobian(), mrpt::math::CQuaternion< T >::rotationMatrixNoResize(), mrpt::math::CQuaternion< T >::rpy_and_jacobian(), Pose3DQuatTests::test_invComposePointJacob(), and mrpt::math::CQuaternion< T >::y().
|
inline |
Set y coordinate of the quaternion.
Definition at line 97 of file CQuaternion.h.
References mrpt::math::CQuaternion< T >::y().
|
inline |
Return z coordinate of the quaternion.
Definition at line 91 of file CQuaternion.h.
Referenced by mrpt::poses::CPose3DQuat::asTPose(), mrpt::poses::CPose3DQuat::composePoint(), mrpt::math::CQuaternion< T >::conj(), mrpt::math::CQuaternion< T >::CQuaternion(), mrpt::math::CQuaternion< T >::crossProduct(), mrpt::math::CQuaternion< T >::fromRodriguesVector(), 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 >::rotatePoint(), mrpt::math::CQuaternion< T >::rotationJacobian(), mrpt::math::CQuaternion< T >::rotationMatrixNoResize(), mrpt::math::CQuaternion< T >::rpy_and_jacobian(), Pose3DQuatTests::test_invComposePointJacob(), and mrpt::math::CQuaternion< T >::z().
|
inline |
Set z coordinate of the quaternion.
Definition at line 99 of file CQuaternion.h.
References mrpt::math::CQuaternion< T >::z().
|
inlinestaticinherited |
Definition at line 125 of file MatrixVectorBase.h.
References mrpt::math::MatrixVectorBase< Scalar, Derived >::Constant().
|
inlinestaticinherited |
Definition at line 126 of file MatrixVectorBase.h.
References mrpt::math::MatrixVectorBase< Scalar, Derived >::Constant().
|
staticinherited |
Definition at line 52 of file CMatrixFixed.h.
|
staticinherited |
Definition at line 54 of file CMatrixFixed.h.
|
staticinherited |
Definition at line 51 of file CMatrixFixed.h.
|
staticinherited |
Definition at line 53 of file CMatrixFixed.h.
|
staticinherited |
Definition at line 55 of file CMatrixFixed.h.
Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 8fe78517f Sun Jul 14 19:43:28 2019 +0200 at lun oct 28 02:10:00 CET 2019 |