MRPT
2.0.1
|
This template class provides the basic functionality for a general 2D any-size, resizable container of numerical or non-numerical elements.
NOTES:
Eigen::Map<>
object and to access full Algebra functionality.Definition at line 39 of file CMatrixDynamic.h.
#include <mrpt/math/CMatrixDynamic.h>
Public Member Functions | |
void | swap (CMatrixDynamic< T > &o) |
Swap with another matrix very efficiently (just swaps a pointer and two integer values). More... | |
CMatrixDynamic (const CMatrixDynamic &m) | |
Constructors. More... | |
CMatrixDynamic (size_t row=0, size_t col=0) | |
template<typename U > | |
CMatrixDynamic (const CMatrixDynamic< U > &m) | |
Copy (casting from if needed) from another matrix. More... | |
template<class Derived > | |
CMatrixDynamic (const Eigen::MatrixBase< Derived > &m) | |
Convert from Eigen matrix. More... | |
template<typename _Lhs , typename _Rhs , int Option> | |
CMatrixDynamic (const Eigen::Product< _Lhs, _Rhs, Option > &p) | |
Convert from Eigen product. More... | |
template<typename Op , typename Lhs , typename Rhs > | |
CMatrixDynamic (const Eigen::CwiseBinaryOp< Op, Lhs, Rhs > &p) | |
Convert from Eigen binary op. More... | |
CMatrixDynamic (const CMatrixDynamic &m, const size_t cropRowCount, const size_t cropColCount) | |
Copy constructor & crop from another matrix. More... | |
template<std::size_t ROWS, std::size_t COLS> | |
CMatrixDynamic (const CMatrixFixed< T, ROWS, COLS > &o) | |
Constructor from fixed-size matrix: More... | |
template<typename V , size_t N> | |
CMatrixDynamic (size_t row, size_t col, V(&theArray)[N]) | |
Constructor from a given size and a C array. More... | |
template<typename V > | |
CMatrixDynamic (size_t row, size_t col, const V &theVector) | |
Constructor from a given size and a STL container (std::vector, std::list,...) with the initial values. More... | |
virtual | ~CMatrixDynamic ()=default |
template<class MAT > | |
void | setFromMatrixLike (const MAT &m) |
CMatrixDynamic & | operator= (const CMatrixDynamic< T > &m)=default |
template<typename U > | |
CMatrixDynamic & | operator= (const CMatrixDynamic< U > &m) |
Assignment operator from another matrix (possibly of a different type) More... | |
template<class Derived > | |
CMatrixDynamic & | operator= (const Eigen::MatrixBase< Derived > &m) |
Assignment from an Eigen matrix. More... | |
template<std::size_t ROWS, std::size_t COLS> | |
CMatrixDynamic & | operator= (const CMatrixFixed< T, ROWS, COLS > &m) |
Assignment from a fixed matrix. More... | |
template<typename V , size_t N> | |
CMatrixDynamic & | operator= (V(&theArray)[N]) |
Assignment operator for initializing from a C array (The matrix must be set to the correct size before invoking this asignament) More... | |
CMatrixDynamic (CMatrixDynamic &&m) | |
Move ctor. More... | |
CMatrixDynamic & | operator= (CMatrixDynamic &&m) |
Move operator. More... | |
size_type | rows () const |
Number of rows in the matrix. More... | |
size_type | cols () const |
Number of columns in the matrix. More... | |
matrix_size_t | size () const |
Get a 2-vector with [NROWS NCOLS] (as in MATLAB command size(x)) More... | |
void | setSize (size_t row, size_t col, bool zeroNewElements=false) |
Changes the size of matrix, maintaining the previous contents. More... | |
void | resize (size_t row, size_t col) |
void | resize (size_t vectorLen) |
Resizes as a Nx1 vector. More... | |
void | resize (const matrix_size_t &siz, bool zeroNewElements=false) |
Resize the matrix. More... | |
CMatrixDynamic & | derived () |
const CMatrixDynamic & | derived () const |
void | conservativeResize (size_t row, size_t col) |
const T * | data () const |
Return raw pointer to row-major data buffer. More... | |
T * | data () |
T & | operator() (size_t row, size_t col) |
Subscript operator to get/set individual elements. More... | |
const T & | operator() (size_t row, size_t col) const |
Subscript operator to get individual elements. More... | |
T & | operator[] (size_t ith) |
Subscript operator to get/set an individual element from a row or column matrix. More... | |
const T & | operator[] (size_t ith) const |
Subscript operator to get/set an individual element from a row or column matrix. More... | |
template<typename VECTOR > | |
void | appendRow (const VECTOR &in) |
Appends a new row to the MxN matrix from a 1xN vector. More... | |
template<typename VECTOR > | |
void | setRow (const Index row, const VECTOR &v) |
template<typename VECTOR > | |
void | setCol (const Index col, const VECTOR &v) |
template<typename VECTOR > | |
void | appendCol (const VECTOR &in) |
Appends a new column to the matrix from a vector. More... | |
template<typename VECTOR > | |
void | asVector (VECTOR &out) const |
Returns a vector containing the matrix's values. More... | |
template<typename EIGEN_MATRIX = eigen_t, typename EIGEN_MAP = Eigen::Map< EIGEN_MATRIX, MRPT_MAX_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_ALIGN_BYTES, Eigen::InnerStride<1>>> | |
EIGEN_MAP | asEigen () const |
CMatrixDynamic< float > | cast_float () const |
CMatrixDynamic< double > | cast_double () const |
CVectorDynamic< Scalar > | llt_solve (const CVectorDynamic< Scalar > &b) const |
Solves the linear system Ax=b, returns x, with A this symmetric matrix. More... | |
CVectorDynamic< Scalar > | lu_solve (const CVectorDynamic< Scalar > &b) const |
Solves the linear system Ax=b, returns x, with A this asymmetric matrix. More... | |
CMatrixDynamic< T > & | mbDerived () |
const CMatrixDynamic< T > & | 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 CMatrixDynamic< T > &A, const CMatrixDynamic< T > &B) |
this = A*B, with A & B of the same type of this. More... | |
CMatrixDynamic< T > & | mvbDerived () |
const CMatrixDynamic< T > & | mvbDerived () const |
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... | |
CMatrixDynamic< T > | inverse () const |
Returns the inverse of a general matrix using LU. More... | |
CMatrixDynamic< T > | 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 (CMatrixDynamic< T > &U) const |
Cholesky M=UT * U decomposition for symmetric matrix (upper-half of the matrix is actually ignored. More... | |
bool | eig (CMatrixDynamic< T > &eVecs, std::vector< T > &eVals, bool sorted=true) const |
Computes the eigenvectors and eigenvalues for a square, general matrix. More... | |
bool | eig_symmetric (CMatrixDynamic< T > &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 > | 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>`) | |
CMatrixDynamic< T > | operator- (const CMatrixDynamic< T > &m2) const |
CMatrixDynamic< T > | operator+ (const CMatrixDynamic< T > &m2) const |
void | operator+= (T s) |
void | operator+= (const CMatrixDynamic< T > &m2) |
void | operator-= (T s) |
void | operator-= (const CMatrixDynamic< T > &m2) |
CMatrixDynamic< T > | operator* (const CMatrixDynamic< T > &v) |
CMatrixDynamic< T > | operator* (const CMatrixDynamic< T > &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[ ||{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, CMatrixDynamic< T > > &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 CMatrixDynamic< T > | Identity () |
static CMatrixDynamic< T > | Identity (const std::size_t N) |
Private Types | |
using | vec_t = mrpt::containers::vector_with_small_size_optimization< T, small_size, MRPT_MAX_STATIC_ALIGN_BYTES > |
Private Member Functions | |
void | realloc (size_t row, size_t col, bool newElementsToZero=false) |
Internal use only: It reallocs the memory for the 2D matrix, maintaining the previous contents if posible. More... | |
Private Attributes | |
vec_t | m_data |
RowMajor matrix data. More... | |
size_t | m_Rows {0} |
size_t | m_Cols {0} |
Static Private Attributes | |
static constexpr size_t | small_size = 16 |
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, RowsAtCompileTime, ColsAtCompileTime, StorageOrder, RowsAtCompileTime, ColsAtCompileTime > |
static constexpr int | RowsAtCompileTime = -1 |
static constexpr int | ColsAtCompileTime = -1 |
static constexpr int | SizeAtCompileTime = -1 |
static constexpr int | is_mrpt_type = 1 |
static constexpr int | StorageOrder = 1 |
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 |
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 CMatrixDynamic< T > | Constant (const T value) |
static CMatrixDynamic< T > | Constant (size_t nrows, size_t ncols, const T value) |
static CMatrixDynamic< T > | Zero () |
static CMatrixDynamic< T > | Zero (size_t nrows, size_t ncols) |
using mrpt::math::CMatrixDynamic< T >::const_iterator = typename vec_t::const_iterator |
Definition at line 74 of file CMatrixDynamic.h.
using mrpt::math::CMatrixDynamic< T >::const_reference = const T& |
Definition at line 58 of file CMatrixDynamic.h.
using mrpt::math::CMatrixDynamic< T >::difference_type = std::ptrdiff_t |
Definition at line 60 of file CMatrixDynamic.h.
using mrpt::math::CMatrixDynamic< T >::eigen_t = Eigen::Matrix< T, RowsAtCompileTime, ColsAtCompileTime, StorageOrder, RowsAtCompileTime, ColsAtCompileTime> |
Definition at line 68 of file CMatrixDynamic.h.
using mrpt::math::CMatrixDynamic< T >::Index = int |
Definition at line 56 of file CMatrixDynamic.h.
using mrpt::math::CMatrixDynamic< T >::iterator = typename vec_t::iterator |
Definition at line 73 of file CMatrixDynamic.h.
using mrpt::math::CMatrixDynamic< T >::reference = T& |
Definition at line 57 of file CMatrixDynamic.h.
using mrpt::math::CMatrixDynamic< T >::Scalar = T |
Definition at line 55 of file CMatrixDynamic.h.
using mrpt::math::CMatrixDynamic< T >::size_type = int |
Definition at line 59 of file CMatrixDynamic.h.
using mrpt::math::CMatrixDynamic< T >::value_type = T |
The type of the matrix elements.
Definition at line 54 of file CMatrixDynamic.h.
|
private |
Definition at line 44 of file CMatrixDynamic.h.
|
inline |
Constructors.
Definition at line 149 of file CMatrixDynamic.h.
|
inline |
Definition at line 151 of file CMatrixDynamic.h.
|
inlineexplicit |
Copy (casting from if needed) from another matrix.
Definition at line 155 of file CMatrixDynamic.h.
|
inlineexplicit |
Convert from Eigen matrix.
Definition at line 162 of file CMatrixDynamic.h.
|
inlineexplicit |
Convert from Eigen product.
Definition at line 169 of file CMatrixDynamic.h.
|
inlineexplicit |
Convert from Eigen binary op.
Definition at line 175 of file CMatrixDynamic.h.
|
inline |
Copy constructor & crop from another matrix.
Definition at line 182 of file CMatrixDynamic.h.
|
inlineexplicit |
Constructor from fixed-size matrix:
Definition at line 195 of file CMatrixDynamic.h.
|
inline |
Constructor from a given size and a C array.
The array length must match cols x row.
Definition at line 210 of file CMatrixDynamic.h.
|
inline |
Constructor from a given size and a STL container (std::vector, std::list,...) with the initial values.
The vector length must match cols x row.
Definition at line 232 of file CMatrixDynamic.h.
|
virtualdefault |
|
inline |
Move ctor.
Definition at line 325 of file CMatrixDynamic.h.
|
inline |
Appends a new column to the matrix from a vector.
The length of the vector must match the number of rows of the matrix, unless it is (0,0).
std::exception | On size mismatch. |
Definition at line 510 of file CMatrixDynamic.h.
|
inline |
Appends a new row to the MxN matrix from a 1xN vector.
The lenght of the vector must match the width of the matrix, unless it's empty: in that case the matrix is resized to 1xN.
std::exception | On incorrect vector length. |
Definition at line 477 of file CMatrixDynamic.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 540 of file CMatrixDynamic.h.
Referenced by mrpt::poses::CPosePDFGaussianInf::bayesianFusion(), mrpt::vision::build_linear_system(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::cast_double(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::cast_float(), Pose3DTests::check_jacob_expe_e_at_0(), Pose3DTests::check_jacob_LnT_T(), mrpt::vision::checkerBoardStereoCalibration(), mrpt::slam::data_association_full_covariance(), mrpt::apps::MonteCarloLocalization_Base::do_pf_localization(), mrpt::poses::CPosePDFSOG::getMostLikelyCovarianceAndMean(), mrpt::obs::CObservation3DRangeScan::getZoneAsObs(), mrpt::slam::CICP::ICP_Method_LM(), mrpt::math::idft2_complex(), mrpt::maps::COccupancyGridMap2D::laserScanSimulatorWithUncertainty(), mrpt::math::MATLAB_plotCovariance2D(), mrpt::poses::CPosePDFSOG::mergeModes(), op_dense_multiply_AB(), mrpt::math::MatrixVectorBase< T, CMatrixFixed< T, ROWS, COLS > >::operator*(), mrpt::vision::projectMatchedFeatures(), TEST(), Pose3DQuatTests::test_composePointJacob(), Pose3DTests::test_Jacob_dAexpeD_de(), Pose3DTests::test_Jacob_dDexpe_de(), Pose3DTests::test_Jacob_dexpeD_de(), and SE_traits_tests< POSE_TYPE >::test_jacobs_DinvP1InvP2().
|
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 553 of file CMatrixDynamic.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 337 of file MatrixVectorBase_impl.h.
|
inline |
Returns a vector containing the matrix's values.
Definition at line 528 of file CMatrixDynamic.h.
|
inline |
Definition at line 75 of file CMatrixDynamic.h.
Referenced by mrpt::obs::CObservation3DRangeScan::load(), and mrpt::obs::CObservation3DRangeScan::rangeImage_convertToExternalStorage().
|
inline |
Definition at line 77 of file CMatrixDynamic.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
Definition at line 233 of file MatrixBase.h.
|
inlineinherited |
const blockCopy(): Returns a copy of the given block (non templated version, dynamic sizes)
Definition at line 240 of file MatrixBase.h.
CMatrixDynamic< double > CMatrixDynamic::cast_double | ( | ) | const |
Definition at line 26 of file CMatrixDynamic.cpp.
Referenced by mrpt::obs::CObservationImage::serializeFrom().
CMatrixDynamic< float > CMatrixDynamic::cast_float | ( | ) | const |
Definition at line 19 of file CMatrixDynamic.cpp.
|
inline |
Definition at line 79 of file CMatrixDynamic.h.
|
inline |
Definition at line 80 of file CMatrixDynamic.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.
|
inlineinherited |
Definition at line 243 of file MatrixVectorBase.h.
|
inlineinherited |
Definition at line 89 of file MatrixBase.h.
Referenced by mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::CMatrixDynamic(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::conservativeResize(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::operator()(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::realloc(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::resize(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::setCol(), and mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::setSize().
|
inlineinherited |
Definition at line 94 of file MatrixBase.h.
|
inline |
Number of columns in the matrix.
Definition at line 340 of file CMatrixDynamic.h.
Referenced by mrpt::bayes::detail::addNewLandmarks(), mrpt::opengl::CMeshFast::assignImageAndZ(), mrpt::opengl::CMesh::assignImageAndZ(), mrpt::vision::checkerBoardStereoCalibration(), mrpt::detectors::CFaceDetection::checkIfFaceRegions(), mrpt::opengl::CVectorField2D::cols(), mrpt::opengl::CVectorField3D::cols(), mrpt::graphslam::deciders::CLoopCloserERD< GRAPH_T >::computeDominantEigenVector(), mrpt::obs::CObservation3DRangeScan::convertTo2DScan(), mrpt::obs::detail::cost_func(), mrpt::poses::CPose3D::CPose3D(), mrpt::math::cross_correlation_FFT(), mrpt::slam::data_association_full_covariance(), mrpt::slam::data_association_independent_predictions(), mrpt::math::dft2_complex(), mrpt::math::dft2_real(), mrpt::random::CRandomGenerator::drawGaussianMultivariate(), mrpt::random::CRandomGenerator::drawGaussianMultivariateMany(), mrpt::obs::CObservation2DRangeScanWithUncertainty::evaluateScanLikelihood(), mrpt::math::CLevenbergMarquardtTempl< VECTORTYPE, USERPARAM >::execute(), mrpt::maps::CRandomFieldGridMap2D::exist_relation_between2cells(), mrpt::poses::CPoint< CPoint3D, 3 >::fromString(), mrpt::math::TTwist2D::fromString(), mrpt::math::TPose3DQuat::fromString(), mrpt::math::TPose2D::fromString(), mrpt::math::TTwist3D::fromString(), mrpt::math::TPoint2D_< double >::fromString(), mrpt::math::TPose3D::fromString(), mrpt::math::TPoint3D_< float >::fromString(), mrpt::poses::CPose3DQuat::fromString(), mrpt::poses::CPose2D::fromString(), mrpt::poses::CPose3D::fromString(), mrpt::vision::generateMask(), mrpt::img::CImage::getAsMatrix(), mrpt::img::CImage::getAsMatrixTiled(), mrpt::img::CImage::getAsRGBMatrices(), mrpt::opengl::CVectorField3D::getBoundingBox(), mrpt::apps::MonteCarloLocalization_Base::getGroundTruth(), mrpt::math::idft2_complex(), mrpt::math::idft2_real(), mrpt::maps::CRandomFieldGridMap2D::insertObservation_KF(), mrpt::maps::CRandomFieldGridMap2D::insertObservation_KF2(), mrpt::vision::CFeature::internal_distanceBetweenPolarImages(), mrpt::nav::PlannerTPS_VirtualBase::internal_loadConfig_PTG(), mrpt::obs::CObservation3DRangeScan::load(), mrpt::poses::CPoseInterpolatorBase< 3 >::loadFromTextFile(), mrpt::math::mahalanobisDistance2(), mrpt::math::mahalanobisDistance2AndLogPDF(), mrpt::math::MATLAB_plotCovariance2D(), mempool_donate_range_matrix(), myGeneralDFT(), mrpt::vision::normalizeImage(), mrpt::math::normalPDF(), mrpt::opengl::CVectorField3D::onUpdateBuffers_Points(), mrpt::opengl::CVectorField3D::onUpdateBuffers_Wireframe(), mrpt::math::operator>>(), mrpt::topography::path_from_rtk_gps(), mrpt::apps::MonteCarloLocalization_Base::prepareGT(), mrpt::slam::CRangeBearingKFSLAM::processActionObservation(), mrpt::obs::detail::range2XYZ_LUT(), mrpt::obs::CObservation3DRangeScan::rangeImage_convertToExternalStorage(), mrpt::obs::CObservation3DRangeScan::rangeImageAsImage(), mrpt::math::ransac2Dline_distance(), mrpt::math::ransac3Dplane_distance(), mrpt::obs::CObservation3DRangeScan::recoverCameraCalibrationParameters(), mrpt::maps::CRandomFieldGridMap2D::resize(), mrpt::apps::KFSLAMApp::Run_KF_SLAM(), mrpt::bayes::CKalmanFilterCapable< 7, 3, 3, 7 >::runOneKalmanIteration(), mrpt::math::CMatrixB::serializeFrom(), mrpt::obs::CObservationImage::serializeFrom(), mrpt::math::CMatrixB::serializeTo(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::setFromMatrixLike(), mrpt::opengl::CVectorField2D::setGridCenterAndCellSize(), mrpt::opengl::CVectorField3D::setPointCoordinates(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::setRow(), mrpt::opengl::CVectorField2D::setVectorField(), mrpt::opengl::CVectorField3D::setVectorField(), TEST(), mrpt::obs::CObservation3DRangeScan::undistort(), and mrpt::obs::detail::unprojectInto().
|
inline |
Definition at line 370 of file CMatrixDynamic.h.
|
inlinestaticinherited |
Definition at line 89 of file MatrixVectorBase.h.
|
inlinestaticinherited |
Definition at line 99 of file MatrixVectorBase.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 375 of file CMatrixDynamic.h.
Referenced by mrpt::obs::CObservation3DRangeScan::load(), mrpt::obs::CObservation3DRangeScan::rangeImage_convertToExternalStorage(), and mrpt::obs::CObservation3DRangeScan::undistort().
|
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 381 of file CMatrixDynamic.h.
|
inline |
Definition at line 368 of file CMatrixDynamic.h.
|
inline |
Definition at line 369 of file CMatrixDynamic.h.
|
inherited |
Determinant of matrix.
Definition at line 76 of file MatrixBase_impl.h.
Referenced by mrpt::slam::joint_pdf_metric(), and mrpt::math::productIntegralTwoGaussians().
|
inherited |
dot product of this \cdot v
Definition at line 511 of file MatrixVectorBase_impl.h.
|
inherited |
Definition at line 524 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 107 of file MatrixBase_impl.h.
|
inherited |
Read: eig()
Definition at line 131 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 76 of file CMatrixDynamic.h.
|
inline |
Definition at line 78 of file CMatrixDynamic.h.
|
inlineinherited |
Definition at line 128 of file MatrixBase.h.
|
inlineinherited |
Definition at line 136 of file MatrixBase.h.
|
inlineinherited |
Definition at line 247 of file MatrixBase.h.
|
inlineinherited |
Definition at line 260 of file MatrixBase.h.
|
inlineinherited |
Definition at line 112 of file MatrixBase.h.
|
inlineinherited |
Definition at line 120 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 ''. Commas ',' between elements are NOT allowed.
This format is also used for CConfigFile::read_matrix.
Definition at line 24 of file MatrixVectorBase_impl.h.
Referenced by mrpt::math::TPoint2D_< double >::fromString(), and mrpt::math::TPoint3D_< float >::fromString().
|
inlineinherited |
Definition at line 232 of file MatrixVectorBase.h.
|
inlinestaticinherited |
Definition at line 64 of file MatrixBase.h.
Referenced by TEST().
|
inlinestaticinherited |
Definition at line 74 of file MatrixBase.h.
|
inherited |
Exports the matrix as a string compatible with Matlab/Octave.
Definition at line 141 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 183 of file MatrixBase_impl.h.
|
inherited |
Returns the inverse of a symmetric matrix using LLt.
Definition at line 195 of file MatrixBase_impl.h.
Referenced by mrpt::slam::joint_pdf_metric(), mrpt::math::leastSquareLinearFit(), and mrpt::math::productIntegralTwoGaussians().
|
inlineinherited |
returns true if matrix is NxN
Definition at line 257 of file MatrixVectorBase.h.
CVectorDynamic< T > CMatrixDynamic::llt_solve | ( | const CVectorDynamic< Scalar > & | b | ) | const |
Solves the linear system Ax=b, returns x, with A this symmetric matrix.
Definition at line 34 of file CMatrixDynamic.cpp.
|
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 238 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 326 of file MatrixVectorBase_impl.h.
CVectorDynamic< T > CMatrixDynamic::lu_solve | ( | const CVectorDynamic< Scalar > & | b | ) | const |
Solves the linear system Ax=b, returns x, with A this asymmetric matrix.
Definition at line 40 of file CMatrixDynamic.cpp.
|
inlineinherited |
Definition at line 276 of file MatrixBase.h.
Referenced by mrpt::math::leastSquareLinearFit().
|
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 485 of file MatrixVectorBase_impl.h.
Referenced by mrpt::math::leastSquareLinearFit().
|
inlineinherited |
Definition at line 295 of file MatrixBase.h.
|
inherited |
this = AT * b , with A
and b
a dynamic matrix & vector
Definition at line 492 of file MatrixVectorBase_impl.h.
|
inherited |
Maximum value in the matrix/vector.
Definition at line 363 of file MatrixVectorBase_impl.h.
|
inherited |
Definition at line 384 of file MatrixVectorBase_impl.h.
|
inherited |
Definition at line 409 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 357 of file MatrixVectorBase_impl.h.
|
inherited |
Definition at line 369 of file MatrixVectorBase_impl.h.
|
inherited |
Definition at line 398 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 505 of file MatrixVectorBase_impl.h.
|
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.
|
inlineinherited |
Definition at line 432 of file MatrixVectorBase.h.
|
inline |
Subscript operator to get/set individual elements.
Definition at line 389 of file CMatrixDynamic.h.
|
inline |
Subscript operator to get individual elements.
Definition at line 405 of file CMatrixDynamic.h.
|
inlineinherited |
Definition at line 214 of file MatrixVectorBase.h.
|
inlineinherited |
Definition at line 219 of file MatrixVectorBase.h.
|
inherited |
Definition at line 438 of file MatrixVectorBase_impl.h.
|
inherited |
Definition at line 470 of file MatrixVectorBase_impl.h.
|
inherited |
Definition at line 432 of file MatrixVectorBase_impl.h.
|
inlineinherited |
Definition at line 188 of file MatrixVectorBase.h.
|
inlineinherited |
Definition at line 279 of file MatrixVectorBase.h.
|
inlineinherited |
Definition at line 194 of file MatrixVectorBase.h.
|
inherited |
Definition at line 420 of file MatrixVectorBase_impl.h.
|
inlineinherited |
Definition at line 294 of file MatrixVectorBase.h.
|
inlineinherited |
Definition at line 181 of file MatrixVectorBase.h.
|
inlineinherited |
Definition at line 201 of file MatrixVectorBase.h.
|
inlineinherited |
Definition at line 309 of file MatrixVectorBase.h.
|
inlineinherited |
Definition at line 207 of file MatrixVectorBase.h.
|
inherited |
Definition at line 426 of file MatrixVectorBase_impl.h.
|
inlineinherited |
Definition at line 324 of file MatrixVectorBase.h.
|
default |
Referenced by mrpt::math::CMatrixB::operator=(), and mrpt::math::CMatrixF::operator=().
|
inline |
Assignment operator from another matrix (possibly of a different type)
Definition at line 267 of file CMatrixDynamic.h.
|
inline |
Assignment from an Eigen matrix.
Definition at line 277 of file CMatrixDynamic.h.
|
inline |
Assignment from a fixed matrix.
Definition at line 286 of file CMatrixDynamic.h.
|
inline |
Assignment operator for initializing from a C array (The matrix must be set to the correct size before invoking this asignament)
Refer also to the constructor with initialization data CMatrixDynamic::CMatrixDynamic
Definition at line 307 of file CMatrixDynamic.h.
|
inline |
Move operator.
Definition at line 328 of file CMatrixDynamic.h.
|
inlineinherited |
Definition at line 422 of file MatrixVectorBase.h.
|
inline |
Subscript operator to get/set an individual element from a row or column matrix.
std::exception | If the object is not a column or row matrix. |
Definition at line 423 of file CMatrixDynamic.h.
|
inline |
Subscript operator to get/set an individual element from a row or column matrix.
For non-vectors (NxM matrices), it returns the i-th matrix element, in RowMajor order.
std::exception | If the object is not a column or row matrix. |
Definition at line 454 of file CMatrixDynamic.h.
|
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.
|
inlineprivate |
Internal use only: It reallocs the memory for the 2D matrix, maintaining the previous contents if posible.
Definition at line 87 of file CMatrixDynamic.h.
Referenced by mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::appendCol(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::appendRow(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::CMatrixDynamic(), and mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::setSize().
|
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.
|
inline |
Definition at line 356 of file CMatrixDynamic.h.
Referenced by mrpt::opengl::CVectorField2D::clear(), mrpt::opengl::CVectorField3D::clear(), mrpt::random::CRandomGenerator::drawDefinitePositiveMatrix(), mrpt::ros1bridge::fromROS(), mrpt::maps::CRandomFieldGridMap2D::getAsMatrix(), mrpt::vision::CDifodo::getDepthDerivatives(), mrpt::vision::CFeature::getFirstDescriptorAsMatrix(), mrpt::hwdrivers::CKinect::getNextObservation(), mrpt::vision::CDifodo::getPointsCoord(), mrpt::vision::CDifodo::getWeights(), mrpt::math::leastSquareLinearFit(), mrpt::opengl::CMesh3D::loadMesh(), mrpt::vision::normalizeImage(), mrpt::opengl::CVectorField2D::resize(), and mrpt::opengl::CVectorField3D::resize().
|
inline |
Resizes as a Nx1 vector.
Definition at line 359 of file CMatrixDynamic.h.
|
inline |
Resize the matrix.
Definition at line 362 of file CMatrixDynamic.h.
|
inlineinherited |
Definition at line 100 of file MatrixBase.h.
Referenced by mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::appendRow(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::CMatrixDynamic(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::conservativeResize(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::operator()(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::realloc(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::resize(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::setRow(), and mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::setSize().
|
inlineinherited |
Definition at line 105 of file MatrixBase.h.
|
inline |
Number of rows in the matrix.
Definition at line 337 of file CMatrixDynamic.h.
Referenced by mrpt::bayes::detail::addNewLandmarks(), mrpt::opengl::CMeshFast::assignImageAndZ(), mrpt::opengl::CMesh::assignImageAndZ(), mrpt::detectors::CFaceDetection::checkIfFaceRegions(), mrpt::obs::CObservation3DRangeScan::convertTo2DScan(), mrpt::obs::detail::cost_func(), mrpt::poses::CPose3D::CPose3D(), mrpt::math::cross_correlation_FFT(), mrpt::slam::data_association_full_covariance(), mrpt::slam::data_association_independent_predictions(), mrpt::math::dft2_complex(), mrpt::math::dft2_real(), mrpt::apps::MonteCarloLocalization_Base::do_pf_localization(), kfslam_traits< CRangeBearingKFSLAM >::doPartitioningExperiment(), mrpt::random::CRandomGenerator::drawGaussianMultivariate(), mrpt::random::CRandomGenerator::drawGaussianMultivariateMany(), mrpt::obs::CObservation2DRangeScanWithUncertainty::evaluateScanLikelihood(), mrpt::math::RANSAC_Template< NUMTYPE >::execute(), mrpt::maps::CRandomFieldGridMap2D::exist_relation_between2cells(), mrpt::poses::CPoint< CPoint3D, 3 >::fromString(), mrpt::math::TTwist2D::fromString(), mrpt::math::TPose3DQuat::fromString(), mrpt::math::TPose2D::fromString(), mrpt::math::TTwist3D::fromString(), mrpt::math::TPoint2D_< double >::fromString(), mrpt::math::TPose3D::fromString(), mrpt::math::TPoint3D_< float >::fromString(), mrpt::poses::CPose3DQuat::fromString(), mrpt::poses::CPose2D::fromString(), mrpt::poses::CPose3D::fromString(), mrpt::vision::generateMask(), mrpt::graphslam::deciders::CLoopCloserERD< GRAPH_T >::generatePWConsistenciesMatrix(), mrpt::img::CImage::getAsMatrix(), mrpt::img::CImage::getAsMatrixTiled(), mrpt::img::CImage::getAsRGBMatrices(), mrpt::opengl::CVectorField3D::getBoundingBox(), mrpt::apps::MonteCarloLocalization_Base::getGroundTruth(), mrpt::math::idft2_complex(), mrpt::math::idft2_real(), mrpt::maps::CRandomFieldGridMap2D::insertObservation_KF(), mrpt::maps::CRandomFieldGridMap2D::insertObservation_KF2(), mrpt::vision::CFeature::internal_distanceBetweenPolarImages(), mrpt::nav::PlannerTPS_VirtualBase::internal_loadConfig_PTG(), mrpt::obs::CObservation3DRangeScan::load(), mrpt::poses::CPoseInterpolatorBase< 3 >::loadFromTextFile(), mrpt::math::MATLAB_plotCovariance2D(), mempool_donate_range_matrix(), myGeneralDFT(), mrpt::vision::normalizeImage(), mrpt::opengl::CVectorField3D::onUpdateBuffers_Points(), mrpt::opengl::CVectorField3D::onUpdateBuffers_Wireframe(), mrpt::math::operator>>(), mrpt::topography::path_from_rtk_gps(), mrpt::apps::MonteCarloLocalization_Base::prepareGT(), mrpt::obs::detail::range2XYZ_LUT(), mrpt::obs::CObservation3DRangeScan::rangeImage_convertToExternalStorage(), mrpt::obs::CObservation3DRangeScan::rangeImageAsImage(), mrpt::math::ransac3Dplane_distance(), mrpt::obs::CObservation3DRangeScan::recoverCameraCalibrationParameters(), mrpt::maps::CRandomFieldGridMap2D::resize(), mrpt::opengl::CVectorField2D::rows(), mrpt::opengl::CVectorField3D::rows(), mrpt::apps::KFSLAMApp::Run_KF_SLAM(), mrpt::math::CMatrixB::serializeFrom(), mrpt::obs::CObservationImage::serializeFrom(), mrpt::obs::CObservation3DRangeScan::serializeFrom(), mrpt::math::CMatrixB::serializeTo(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::setCol(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::setFromMatrixLike(), mrpt::opengl::CVectorField2D::setGridCenterAndCellSize(), mrpt::opengl::CVectorField3D::setPointCoordinates(), mrpt::opengl::CVectorField2D::setVectorField(), mrpt::opengl::CVectorField3D::setVectorField(), TEST(), mrpt::obs::CObservation3DRangeScan::undistort(), and mrpt::obs::detail::unprojectInto().
|
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 159 of file MatrixVectorBase_impl.h.
|
inline |
Definition at line 496 of file CMatrixDynamic.h.
|
inlineinherited |
Definition at line 75 of file MatrixVectorBase.h.
|
inlineinherited |
Definition at line 76 of file MatrixVectorBase.h.
|
inlineinherited |
Definition at line 81 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 |
Set all entries to zero, except the main diagonal which is set to value
Definition at line 43 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.
|
inline |
Definition at line 252 of file CMatrixDynamic.h.
Referenced by mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::operator=().
|
inlineinherited |
Definition at line 57 of file MatrixBase.h.
|
inlineinherited |
Definition at line 62 of file MatrixBase.h.
|
inline |
Definition at line 489 of file CMatrixDynamic.h.
Referenced by mrpt::obs::CObservation3DRangeScan::points3D_convertToExternalStorage(), and mrpt::math::ransac_detect_2D_lines().
|
inline |
Changes the size of matrix, maintaining the previous contents.
Definition at line 352 of file CMatrixDynamic.h.
Referenced by mrpt::bayes::detail::addNewLandmarks(), mrpt::detectors::CFaceDetection::checkIfDiagonalSurface(), mrpt::detectors::CFaceDetection::checkIfFaceRegions(), mrpt::slam::TDataAssociationResults::clear(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::conservativeResize(), mrpt::math::cross_correlation_FFT(), mrpt::img::CImage::cross_correlation_FFT(), mrpt::math::dft2_complex(), mrpt::math::dft2_real(), mrpt::poses::CPointPDFSOG::evaluatePDFInArea(), mrpt::poses::CPosePDFSOG::evaluatePDFInArea(), mrpt::math::RANSAC_Template< NUMTYPE >::execute(), mrpt::math::CLevenbergMarquardtTempl< VECTORTYPE, USERPARAM >::execute(), mrpt::detectors::CFaceDetection::experimental_segmentFace(), mrpt::hwdrivers::CRoboticHeadInterface::Get3SoundBuffer(), mrpt::maps::CHeightGridMap2D::getAs3DObject(), mrpt::hmtslam::CLocalMetricHypothesis::getAs3DScene(), mrpt::math::MatrixBlockSparseCols< Scalar, NROWS, NCOLS, INFO, HAS_REMAP, INDEX_REMAP_MAP_IMPL >::getAsDense(), mrpt::img::CImage::getAsMatrix(), mrpt::img::CImage::getAsRGBMatrices(), mrpt::poses::CPose3DPDFGaussian::getCovSubmatrix2D(), mrpt::vision::CFeature::getFirstDescriptorAsMatrix(), mrpt::poses::CPose3DPDFGaussianInf::getInvCovSubmatrix2D(), mrpt::hwdrivers::CSwissRanger3DCamera::getNextObservation(), mrpt::slam::CICP::ICP_Method_LM(), mrpt::math::idft2_complex(), mrpt::math::idft2_real(), mrpt::maps::CBeaconMap::internal_insertObservation(), myGeneralDFT(), mrpt::slam::CRangeBearingKFSLAM2D::OnGetObservationsAndDataAssociation(), mrpt::slam::CRangeBearingKFSLAM::OnGetObservationsAndDataAssociation(), mrpt::topography::path_from_rtk_gps(), mrpt::maps::CMultiMetricMapPDF::prediction_and_update_pfOptimalProposal(), mrpt::math::ransac2Dline_fit(), mrpt::math::ransac3Dplane_fit(), mrpt::slam::CRangeBearingKFSLAM2D::reset(), mrpt::slam::CRangeBearingKFSLAM::reset(), mrpt::maps::CRandomFieldGridMap2D::resize(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::resize(), mrpt::bayes::CKalmanFilterCapable< 7, 3, 3, 7 >::runOneKalmanIteration(), mrpt::math::CMatrixB::serializeFrom(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::setFromMatrixLike(), and TEST().
|
inlineinherited |
Definition at line 112 of file MatrixVectorBase.h.
|
inlineinherited |
Definition at line 113 of file MatrixVectorBase.h.
|
inlineinherited |
Definition at line 117 of file MatrixVectorBase.h.
|
inline |
Get a 2-vector with [NROWS NCOLS] (as in MATLAB command size(x))
Definition at line 343 of file CMatrixDynamic.h.
Referenced by mrpt::graphslam::deciders::CLoopCloserERD< GRAPH_T >::computeDominantEigenVector(), mrpt::vision::CFeature::getFirstDescriptorAsMatrix(), mrpt::math::leastSquareLinearFit(), mrpt::obs::CObservation3DRangeScan::load(), mrpt::opengl::CVectorField3D::onUpdateBuffers_Points(), mrpt::opengl::CVectorField3D::onUpdateBuffers_Wireframe(), and mrpt::obs::CObservation3DRangeScan::rangeImage_convertToExternalStorage().
|
inherited |
Sum of all elements in matrix/vector.
Definition at line 345 of file MatrixVectorBase_impl.h.
|
inherited |
Sum of the absolute value of all elements in matrix/vector.
Definition at line 351 of file MatrixVectorBase_impl.h.
|
inline |
Swap with another matrix very efficiently (just swaps a pointer and two integer values).
Definition at line 141 of file CMatrixDynamic.h.
Referenced by mempool_donate_range_matrix().
|
inlineinherited |
Definition at line 226 of file MatrixVectorBase.h.
|
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.
|
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 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.
|
inlinestaticinherited |
Definition at line 125 of file MatrixVectorBase.h.
|
inlinestaticinherited |
Definition at line 126 of file MatrixVectorBase.h.
|
static |
Definition at line 62 of file CMatrixDynamic.h.
|
static |
Definition at line 64 of file CMatrixDynamic.h.
|
private |
Definition at line 48 of file CMatrixDynamic.h.
Referenced by mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::appendCol(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::appendRow(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::asEigen(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::asVector(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::CMatrixDynamic(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::cols(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::operator()(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::operator=(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::operator[](), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::realloc(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::size(), and mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::swap().
|
private |
RowMajor matrix data.
Definition at line 47 of file CMatrixDynamic.h.
Referenced by mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::asEigen(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::asVector(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::begin(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::cbegin(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::cend(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::data(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::end(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::operator()(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::operator=(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::operator[](), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::realloc(), and mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::swap().
|
private |
Definition at line 48 of file CMatrixDynamic.h.
Referenced by mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::appendCol(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::appendRow(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::asEigen(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::asVector(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::CMatrixDynamic(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::operator()(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::operator=(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::operator[](), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::realloc(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::rows(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::size(), and mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::swap().
|
static |
Definition at line 61 of file CMatrixDynamic.h.
|
static |
Definition at line 63 of file CMatrixDynamic.h.
|
staticprivate |
Definition at line 42 of file CMatrixDynamic.h.
|
static |
Definition at line 65 of file CMatrixDynamic.h.
Page generated by Doxygen 1.8.14 for MRPT 2.0.1 Git: 0fef1a6d7 Fri Apr 3 23:00:21 2020 +0200 at vie abr 3 23:20:28 CEST 2020 |