MRPT
2.0.4
|
A compile-time fixed-size numeric matrix container.
It uses a RowMajor element memory layout.
Definition at line 33 of file CMatrixFixed.h.
#include <mrpt/math/CMatrixFixed.h>
Public Member Functions | |
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 |
Static Public Member Functions | |
static CMatrixFixed< T, ROWS, COLS > | Identity () |
static CMatrixFixed< T, ROWS, COLS > | Identity (const std::size_t N) |
Private Types | |
using | vec_t = std::array< T, ROWS *COLS > |
RowMajor matrix data. More... | |
Private Attributes | |
vec_t | m_data |
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 > |
constexpr static int | RowsAtCompileTime = ROWS |
constexpr static int | ColsAtCompileTime = COLS |
constexpr static int | SizeAtCompileTime = ROWS * COLS |
constexpr static int | is_mrpt_type = 1 |
constexpr static int | StorageOrder |
Iterators interface | |
using | iterator = typename vec_t::iterator |
using | const_iterator = typename vec_t::const_iterator |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
const_iterator | cbegin () const |
const_iterator | cend () const |
Constructors, assignment operators, initializers | |
CMatrixFixed () | |
Default constructor, initializes all elements to zero. More... | |
CMatrixFixed (TConstructorFlags_Matrices) | |
Constructor which leaves the matrix uninitialized. More... | |
template<size_t N> | |
CMatrixFixed (const T(&vals)[N]) | |
Initializes from a C array with RowMajor values. More... | |
CMatrixFixed (const T *data) | |
Initializes from a plain buffer with RowMajor values. More... | |
template<class Derived > | |
CMatrixFixed (const Eigen::MatrixBase< Derived > &m) | |
Convert from Eigen matrix. More... | |
template<typename _Lhs , typename _Rhs , int Option> | |
CMatrixFixed (const Eigen::Product< _Lhs, _Rhs, Option > &p) | |
Convert from Eigen product. More... | |
template<typename Op , typename Lhs , typename Rhs > | |
CMatrixFixed (const Eigen::CwiseBinaryOp< Op, Lhs, Rhs > &p) | |
Convert from Eigen binary op. More... | |
template<typename VectorType , int Size> | |
CMatrixFixed (const Eigen::VectorBlock< VectorType, Size > &m) | |
Convert from Eigen block. More... | |
CMatrixFixed (const size_type rows, const size_type cols) | |
Convenient ctor from size: in this class, it throws if size does not match compile-time size. More... | |
template<class MAT > | |
void | setFromMatrixLike (const MAT &m) |
template<class Derived > | |
CMatrixFixed & | operator= (const Eigen::MatrixBase< Derived > &m) |
Assignment from an Eigen matrix. More... | |
template<typename VectorType , int Size> | |
CMatrixFixed & | operator= (const Eigen::VectorBlock< VectorType, Size > &m) |
Assignment from an Eigen vector block. More... | |
template<typename U > | |
CMatrixFixed & | operator= (const CMatrixDynamic< U > &m) |
Assignment from a Dynamic matrix. More... | |
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... | |
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) |
Standalone operations (do NOT require <tt>\#include \<Eigen/Dense\></tt>) | |
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 |
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[ ||\mathbf{v}||_\infnty $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) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
bool | operator== (const OTHERMATVEC &o) const |
bool | operator!= (const OTHERMATVEC &o) const |
CMatrixFixed< T, ROWS, COLS > | impl_op_add (const CMatrixFixed< T, ROWS, COLS > &m2) const |
void | impl_op_selfadd (const CMatrixFixed< T, ROWS, COLS > &m2) |
CMatrixFixed< T, ROWS, COLS > | impl_op_subs (const CMatrixFixed< T, ROWS, COLS > &m2) const |
void | impl_op_selfsubs (const CMatrixFixed< T, ROWS, COLS > &m2) |
using mrpt::math::CMatrixFixed< T, ROWS, COLS >::const_iterator = typename vec_t::const_iterator |
Definition at line 63 of file CMatrixFixed.h.
using mrpt::math::CMatrixFixed< T, ROWS, COLS >::const_reference = const T& |
Definition at line 48 of file CMatrixFixed.h.
using mrpt::math::CMatrixFixed< T, ROWS, COLS >::difference_type = std::ptrdiff_t |
Definition at line 50 of file CMatrixFixed.h.
using mrpt::math::CMatrixFixed< T, ROWS, COLS >::eigen_t = Eigen::Matrix<T, ROWS, COLS, StorageOrder, ROWS, COLS> |
Definition at line 57 of file CMatrixFixed.h.
using mrpt::math::CMatrixFixed< T, ROWS, COLS >::Index = int |
Definition at line 46 of file CMatrixFixed.h.
using mrpt::math::CMatrixFixed< T, ROWS, COLS >::iterator = typename vec_t::iterator |
Definition at line 62 of file CMatrixFixed.h.
using mrpt::math::CMatrixFixed< T, ROWS, COLS >::reference = T& |
Definition at line 47 of file CMatrixFixed.h.
using mrpt::math::CMatrixFixed< T, ROWS, COLS >::Scalar = T |
Definition at line 45 of file CMatrixFixed.h.
using mrpt::math::CMatrixFixed< T, ROWS, COLS >::size_type = int |
Definition at line 49 of file CMatrixFixed.h.
using mrpt::math::CMatrixFixed< T, ROWS, COLS >::value_type = T |
The type of the matrix elements.
Definition at line 44 of file CMatrixFixed.h.
|
private |
RowMajor matrix data.
Definition at line 37 of file CMatrixFixed.h.
|
inline |
Default constructor, initializes all elements to zero.
Definition at line 76 of file CMatrixFixed.h.
|
inline |
Constructor which leaves the matrix uninitialized.
Example of usage: CMatrixFixed<double,3,2> M(mrpt::math::UNINITIALIZED_MATRIX);
Definition at line 82 of file CMatrixFixed.h.
|
inlineexplicit |
Initializes from a C array with RowMajor values.
Definition at line 86 of file CMatrixFixed.h.
|
inlineexplicit |
Initializes from a plain buffer with RowMajor values.
Definition at line 92 of file CMatrixFixed.h.
|
inlineexplicit |
Convert from Eigen matrix.
Definition at line 96 of file CMatrixFixed.h.
|
inlineexplicit |
Convert from Eigen product.
Definition at line 102 of file CMatrixFixed.h.
|
inlineexplicit |
Convert from Eigen binary op.
Definition at line 108 of file CMatrixFixed.h.
|
inlineexplicit |
Convert from Eigen block.
Definition at line 115 of file CMatrixFixed.h.
|
inline |
Convenient ctor from size: in this class, it throws if size does not match compile-time size.
It is provided for the sake of offering a uniform API with CMatrixDynamic.
Definition at line 123 of file CMatrixFixed.h.
|
inlineinherited |
Definition at line 170 of file MatrixVectorBase.h.
|
inlineinherited |
Definition at line 175 of file MatrixVectorBase.h.
|
inline |
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< T, ROWS, COLS >::cast_double(), mrpt::math::CMatrixFixed< T, ROWS, COLS >::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< T, ROWS, COLS >::llt_solve(), mrpt::math::CMatrixFixed< T, ROWS, COLS >::lu_solve(), mrpt::poses::CPoint2DPDFGaussian::mahalanobisDistanceTo(), mrpt::poses::CPoint2DPDFGaussian::mahalanobisDistanceToPoint(), mrpt::math::MATLAB_plotCovariance2D(), 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< VEH_SIZE, OBS_SIZE, FEAT_SIZE, ACT_SIZE, KFTYPE >::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().
|
inline |
Definition at line 266 of file CMatrixFixed.h.
|
inlineinherited |
Definition at line 106 of file MatrixVectorBase.h.
|
inherited |
Returns a string representation of the vector/matrix, using Eigen's default settings.
Definition at line 368 of file MatrixVectorBase_impl.h.
|
inline |
Definition at line 64 of file CMatrixFixed.h.
|
inline |
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.
|
inlineinherited |
Definition at line 145 of file MatrixVectorBase.h.
|
inlineinherited |
Definition at line 151 of file MatrixVectorBase.h.
|
inlineinherited |
const blockCopy(): Returns a copy of the given block (non templated version, dynamic sizes)
Definition at line 240 of file MatrixBase.h.
|
inlineinherited |
const blockCopy(): Returns a copy of the given block
Definition at line 233 of file MatrixBase.h.
CMatrixFixed< double, ROWS, COLS > mrpt::math::CMatrixFixed< T, ROWS, COLS >::cast_double |
Definition at line 25 of file CMatrixFixed_impl.h.
References mrpt::math::CMatrixFixed< T, ROWS, COLS >::asEigen().
Referenced by mrpt::slam::CICP::ICP_Method_LM(), mrpt::poses::CPointPDFGaussian::serializeFrom(), mrpt::poses::CPosePDFGaussian::serializeFrom(), and mrpt::poses::CPosePDFSOG::serializeFrom().
CMatrixFixed< float, ROWS, COLS > mrpt::math::CMatrixFixed< T, ROWS, COLS >::cast_float |
Definition at line 17 of file CMatrixFixed_impl.h.
References mrpt::math::CMatrixFixed< T, ROWS, COLS >::asEigen().
Referenced by mrpt::vision::CDifodo::computeWeights(), mrpt::vision::CDifodo::filterLevelSolution(), mrpt::vision::CDifodo::poseUpdate(), and mrpt::obs::detail::unprojectInto().
|
inline |
Definition at line 68 of file CMatrixFixed.h.
|
inline |
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 164 of file MatrixBase_impl.h.
|
inlineinherited |
Definition at line 244 of file MatrixVectorBase.h.
|
inlineinherited |
Definition at line 243 of file MatrixVectorBase.h.
|
inlineinherited |
Definition at line 89 of file MatrixBase.h.
|
inlineinherited |
Definition at line 94 of file MatrixBase.h.
|
inlineconstexpr |
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(), quat_vs_YPR(), mrpt::poses::CPose3DQuatPDFGaussianInf::serializeFrom(), mrpt::poses::CPose3DQuatPDFGaussianInf::serializeTo(), mrpt::math::CMatrixFixed< double, ObsDim, PointDof >::setFromMatrixLike(), and TEST().
|
inline |
Definition at line 202 of file CMatrixFixed.h.
|
inlinestaticinherited |
Definition at line 89 of file MatrixVectorBase.h.
|
inlinestaticinherited |
Definition at line 99 of file MatrixVectorBase.h.
|
inline |
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.
|
inline |
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().
|
inline |
Definition at line 200 of file CMatrixFixed.h.
|
inline |
Definition at line 201 of file CMatrixFixed.h.
|
inherited |
Determinant of matrix.
Definition at line 148 of file MatrixBase_impl.h.
|
inherited |
dot product of this \cdot v
Definition at line 349 of file MatrixVectorBase_impl.h.
|
inherited |
Definition at line 350 of file MatrixVectorBase_impl.h.
|
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 177 of file MatrixBase_impl.h.
|
inherited |
Read: eig()
Definition at line 182 of file MatrixBase_impl.h.
|
inlineinherited |
returns true if matrix/vector has size=0
Definition at line 260 of file MatrixVectorBase.h.
|
inline |
Definition at line 65 of file CMatrixFixed.h.
|
inline |
Definition at line 67 of file CMatrixFixed.h.
|
inlineinherited |
Definition at line 136 of file MatrixBase.h.
|
inlineinherited |
Definition at line 128 of file MatrixBase.h.
|
inlineinherited |
Definition at line 260 of file MatrixBase.h.
|
inlineinherited |
Definition at line 247 of file MatrixBase.h.
|
inlineinherited |
Definition at line 120 of file MatrixBase.h.
|
inlineinherited |
Definition at line 112 of file MatrixBase.h.
|
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.
|
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 '\t'. Commas ',' between elements are NOT allowed.
This format is also used for CConfigFile::read_matrix.
Definition at line 382 of file MatrixVectorBase_impl.h.
|
inlineinherited |
Definition at line 232 of file MatrixVectorBase.h.
|
inlinestaticinherited |
Definition at line 64 of file MatrixBase.h.
|
inlinestaticinherited |
Definition at line 74 of file MatrixBase.h.
|
privateinherited |
Definition at line 342 of file MatrixVectorBase_impl.h.
|
privateinherited |
Definition at line 343 of file MatrixVectorBase_impl.h.
|
privateinherited |
Definition at line 345 of file MatrixVectorBase_impl.h.
|
privateinherited |
Definition at line 344 of file MatrixVectorBase_impl.h.
|
inherited |
Exports the matrix as a string compatible with Matlab/Octave.
Definition at line 389 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.
|
inlineinherited |
Like insertMatrix(), but inserts ‘submat’` (transposed)
Definition at line 221 of file MatrixBase.h.
|
inherited |
Returns the inverse of a general matrix using LU.
Definition at line 151 of file MatrixBase_impl.h.
|
inherited |
Returns the inverse of a symmetric matrix using LLt.
Definition at line 154 of file MatrixBase_impl.h.
|
inlineinherited |
returns true if matrix is NxN
Definition at line 257 of file MatrixVectorBase.h.
CMatrixFixed< T, ROWS, 1 > mrpt::math::CMatrixFixed< T, ROWS, COLS >::llt_solve | ( | const CMatrixFixed< T, ROWS, 1 > & | b | ) | const |
Solves the linear system Ax=b, returns x, with A this symmetric matrix.
Definition at line 34 of file CMatrixFixed_impl.h.
References mrpt::math::CMatrixFixed< T, ROWS, COLS >::asEigen().
|
inline |
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().
|
inline |
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 |
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 419 of file MatrixVectorBase_impl.h.
|
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 416 of file MatrixVectorBase_impl.h.
CMatrixFixed< T, ROWS, 1 > mrpt::math::CMatrixFixed< T, ROWS, COLS >::lu_solve | ( | const CMatrixFixed< T, ROWS, 1 > & | b | ) | const |
Solves the linear system Ax=b, returns x, with A this asymmetric matrix.
Definition at line 49 of file CMatrixFixed_impl.h.
References mrpt::math::CMatrixFixed< T, ROWS, COLS >::asEigen().
Referenced by mrpt::nav::CPTG_Holo_Blend::inverseMap_WS2TP().
|
inlineinherited |
Definition at line 276 of file MatrixBase.h.
|
inherited |
this = A * b , with A
and b
a dynamic matrix & vector
Definition at line 353 of file MatrixVectorBase_impl.h.
|
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 84 of file MatrixBase_impl.h.
|
inlineinherited |
Definition at line 295 of file MatrixBase.h.
|
inherited |
this = AT * b , with A
and b
a dynamic matrix & vector
Definition at line 357 of file MatrixVectorBase_impl.h.
|
inherited |
Maximum value in the matrix/vector.
Definition at line 252 of file MatrixVectorBase_impl.h.
|
inherited |
Definition at line 253 of file MatrixVectorBase_impl.h.
|
inherited |
Definition at line 254 of file MatrixVectorBase_impl.h.
|
inherited |
Returns the maximum value in the diagonal.
Definition at line 186 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 247 of file MatrixVectorBase_impl.h.
|
inherited |
Definition at line 248 of file MatrixVectorBase_impl.h.
|
inherited |
Definition at line 249 of file MatrixVectorBase_impl.h.
|
inherited |
Returns the minimum value in the diagonal.
Definition at line 188 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 271 of file MatrixVectorBase_impl.h.
|
inherited |
Compute the norm-infinite of a vector ($f[ ||\mathbf{v}||_\infnty $f]), ie the maximum absolute value of the elements.
Definition at line 267 of file MatrixVectorBase_impl.h.
|
inlineinherited |
Definition at line 432 of file MatrixVectorBase.h.
|
inline |
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.
|
inline |
Definition at line 313 of file CMatrixFixed.h.
|
inline |
Access (row,col), without out-of-bounds check (except in Debug builds)
Definition at line 292 of file CMatrixFixed.h.
|
inline |
Definition at line 298 of file CMatrixFixed.h.
|
inherited |
Definition at line 277 of file MatrixVectorBase_impl.h.
|
inherited |
Definition at line 339 of file MatrixVectorBase_impl.h.
|
inlineinherited |
Definition at line 214 of file MatrixVectorBase.h.
|
inlineinherited |
Definition at line 219 of file MatrixVectorBase.h.
|
inherited |
Definition at line 275 of file MatrixVectorBase_impl.h.
|
inlineinherited |
Definition at line 279 of file MatrixVectorBase.h.
|
inlineinherited |
Definition at line 188 of file MatrixVectorBase.h.
|
inlineinherited |
Definition at line 294 of file MatrixVectorBase.h.
|
inlineinherited |
Definition at line 194 of file MatrixVectorBase.h.
|
inherited |
Definition at line 273 of file MatrixVectorBase_impl.h.
|
inlineinherited |
Definition at line 181 of file MatrixVectorBase.h.
|
inlineinherited |
Definition at line 309 of file MatrixVectorBase.h.
|
inlineinherited |
Definition at line 201 of file MatrixVectorBase.h.
|
inlineinherited |
Definition at line 324 of file MatrixVectorBase.h.
|
inlineinherited |
Definition at line 207 of file MatrixVectorBase.h.
|
inherited |
Definition at line 274 of file MatrixVectorBase_impl.h.
|
inline |
Assignment from a Dynamic matrix.
Definition at line 162 of file CMatrixFixed.h.
|
inline |
Assignment from an Eigen matrix.
Definition at line 143 of file CMatrixFixed.h.
|
inline |
Assignment from an Eigen vector block.
Definition at line 152 of file CMatrixFixed.h.
|
inlineinherited |
Definition at line 422 of file MatrixVectorBase.h.
|
inline |
Access the [i-th] element (for 1xN or Nx1 matrices)
Definition at line 320 of file CMatrixFixed.h.
|
inline |
Definition at line 326 of file CMatrixFixed.h.
|
inherited |
Finds the rank of the matrix via LU decomposition.
Uses Eigen's default threshold unless threshold>0
.
Definition at line 158 of file MatrixBase_impl.h.
|
inherited |
Removes columns of the matrix.
Indices may be unsorted and duplicated
Definition at line 198 of file MatrixBase_impl.h.
|
inherited |
Removes rows of the matrix.
Indices may be unsorted and duplicated
Definition at line 205 of file MatrixBase_impl.h.
|
inline |
Throws if size does not match with the fixed matrix size.
Definition at line 215 of file CMatrixFixed.h.
|
inline |
Definition at line 204 of file CMatrixFixed.h.
Referenced by mrpt::math::CMatrixFixed< double, ObsDim, PointDof >::resize().
|
inline |
Definition at line 220 of file CMatrixFixed.h.
|
inlineinherited |
Definition at line 100 of file MatrixBase.h.
|
inlineinherited |
Definition at line 105 of file MatrixBase.h.
|
inlineconstexpr |
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(), quat_vs_YPR(), mrpt::poses::CPose3DQuatPDFGaussianInf::serializeFrom(), mrpt::poses::CPose3DQuatPDFGaussianInf::serializeTo(), mrpt::math::CMatrixFixed< double, ObsDim, PointDof >::setFromMatrixLike(), and TEST().
|
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 403 of file MatrixVectorBase_impl.h.
|
inlineinherited |
Definition at line 75 of file MatrixVectorBase.h.
|
inlineinherited |
Definition at line 81 of file MatrixVectorBase.h.
|
inlineinherited |
Definition at line 76 of file MatrixVectorBase.h.
|
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.
|
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.
|
inlineinherited |
Set all entries to zero, except the main diagonal which is set to value
Definition at line 43 of file MatrixBase.h.
|
inline |
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.
|
inlineinherited |
Definition at line 62 of file MatrixBase.h.
|
inline |
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.
|
inlineinherited |
Definition at line 117 of file MatrixVectorBase.h.
|
inlineinherited |
Definition at line 113 of file MatrixVectorBase.h.
|
inlineconstexpr |
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(), and mrpt::obs::CObservationGPS::serializeFrom().
|
inherited |
Sum of all elements in matrix/vector.
Definition at line 361 of file MatrixVectorBase_impl.h.
|
inherited |
Sum of the absolute value of all elements in matrix/vector.
Definition at line 364 of file MatrixVectorBase_impl.h.
|
inline |
this += AT
Definition at line 345 of file CMatrixFixed.h.
|
inline |
Definition at line 197 of file CMatrixFixed.h.
Referenced by mrpt::poses::CPose3DQuat::swap().
|
inlineinherited |
Definition at line 226 of file MatrixVectorBase.h.
|
inherited |
Returns the trace of the matrix (not necessarily square).
Definition at line 191 of file MatrixBase_impl.h.
|
inlineinherited |
Definition at line 159 of file MatrixVectorBase.h.
|
inlineinherited |
Definition at line 164 of file MatrixVectorBase.h.
|
inherited |
Removes columns of the matrix.
This "unsafe" version assumes indices sorted in ascending order.
Definition at line 195 of file MatrixBase_impl.h.
|
inherited |
Removes rows of the matrix.
This "unsafe" version assumes indices sorted in ascending order.
Definition at line 202 of file MatrixBase_impl.h.
|
inlinestaticinherited |
Definition at line 125 of file MatrixVectorBase.h.
|
inlinestaticinherited |
Definition at line 126 of file MatrixVectorBase.h.
|
staticconstexpr |
Definition at line 52 of file CMatrixFixed.h.
|
staticconstexpr |
Definition at line 54 of file CMatrixFixed.h.
|
private |
Definition at line 38 of file CMatrixFixed.h.
Referenced by mrpt::math::CMatrixFixed< double, ObsDim, PointDof >::asEigen(), mrpt::math::CMatrixFixed< double, ObsDim, PointDof >::begin(), mrpt::math::CMatrixFixed< double, ObsDim, PointDof >::cbegin(), mrpt::math::CMatrixFixed< double, ObsDim, PointDof >::cend(), mrpt::math::CMatrixFixed< double, ObsDim, PointDof >::CMatrixFixed(), mrpt::math::CMatrixFixed< double, ObsDim, PointDof >::data(), mrpt::math::CMatrixFixed< double, ObsDim, PointDof >::end(), mrpt::math::CMatrixFixed< double, ObsDim, PointDof >::loadFromArray(), mrpt::math::CMatrixFixed< double, ObsDim, PointDof >::loadFromRawPointer(), mrpt::math::CMatrixFixed< double, ObsDim, PointDof >::operator()(), mrpt::math::CMatrixFixed< double, ObsDim, PointDof >::operator[](), and mrpt::math::CMatrixFixed< double, ObsDim, PointDof >::swap().
|
staticconstexpr |
Definition at line 51 of file CMatrixFixed.h.
|
staticconstexpr |
Definition at line 53 of file CMatrixFixed.h.
|
staticconstexpr |
Definition at line 55 of file CMatrixFixed.h.
Page generated by Doxygen 1.8.18 for MRPT 2.0.4 at Thu Sep 24 07:14:18 UTC 2020 |