MRPT
2.0.4
|
This file implements miscelaneous matrix and matrix/vector operations, and internal functions in mrpt::math::detail. More...
This file implements miscelaneous matrix and matrix/vector operations, and internal functions in mrpt::math::detail.
Definition in file ops_matrices.h.
#include <mrpt/math/CMatrixDynamic.h>
#include <mrpt/math/CMatrixFixed.h>
#include <mrpt/math/CVectorDynamic.h>
#include <mrpt/math/mat2eig.h>
#include <mrpt/math/math_frwds.h>
#include <mrpt/math/ops_containers.h>
Go to the source code of this file.
Namespaces | |
mrpt | |
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries. | |
mrpt::math | |
This base provides a set of functions for maths stuff. | |
Macros | |
#define | SAVE_MATRIX(M) M.saveToTextFile(#M ".txt"); |
A useful macro for saving matrixes to a file while debugging. More... | |
Functions | |
template<typename MAT_H , typename MAT_C , typename MAT_R > | |
void | mrpt::math::multiply_HCHt (const MAT_H &H, const MAT_C &C, MAT_R &R, bool accumResultInOutput=false) |
R = H * C * H^t. More... | |
template<std::size_t H_ROWS, std::size_t H_COLS, typename Scalar > | |
mrpt::math::CMatrixFixed< Scalar, H_ROWS, H_ROWS > | mrpt::math::multiply_HCHt (const mrpt::math::CMatrixFixed< Scalar, H_ROWS, H_COLS > &H, const mrpt::math::CMatrixFixed< Scalar, H_COLS, H_COLS > &C) |
return a fixed-size matrix with the result of: H * C * H^t More... | |
template<typename VECTOR_H , typename MAT_C > | |
MAT_C::Scalar | mrpt::math::multiply_HtCH_scalar (const VECTOR_H &H, const MAT_C &C) |
r (scalar) = H^t*C*H (H: column vector, C: symmetric matrix) More... | |
template<typename VECTOR_H , typename MAT_C > | |
MAT_C::Scalar | mrpt::math::multiply_HCHt_scalar (const VECTOR_H &H, const MAT_C &C) |
r (scalar) = H*C*H^t (H: row vector, C: symmetric matrix) More... | |
template<class MAT_IN , class VECTOR , class MAT_OUT > | |
void | mrpt::math::meanAndCovMat (const MAT_IN &v, VECTOR &out_mean, MAT_OUT &out_cov) |
Computes the mean vector and covariance from a list of samples in an NxM matrix, where each row is a sample, so the covariance is MxM. More... | |
template<class MAT_IN , class VEC > | |
void | mrpt::math::meanAndStdColumns (const MAT_IN &m, VEC &outMeanVector, VEC &outStdVector, const bool unbiased_variance=true) |
Computes a row with the mean values of each column in the matrix and the associated vector with the standard deviation of each column. More... | |
template<class MATRIX > | |
CMatrixDouble | mrpt::math::cov (const MATRIX &v) |
Computes the covariance matrix from a list of samples in an NxM matrix, where each row is a sample, so the covariance is MxM. More... | |
template<class MAT_A , class SKEW_3VECTOR , class MAT_OUT > | |
void | mrpt::math::multiply_A_skew3 (const MAT_A &A, const SKEW_3VECTOR &v, MAT_OUT &out) |
Only for vectors/arrays "v" of length3, compute out = A * Skew(v), where Skew(v) is the skew symmetric matric generated from v (see mrpt::math::skew_symmetric3) More... | |
template<class SKEW_3VECTOR , class MAT_A , class MAT_OUT > | |
void | mrpt::math::multiply_skew3_A (const SKEW_3VECTOR &v, const MAT_A &A, MAT_OUT &out) |
Only for vectors/arrays "v" of length3, compute out = Skew(v) * A, where Skew(v) is the skew symmetric matric generated from v (see mrpt::math::skew_symmetric3) More... | |
template<typename MATIN , typename MATOUT > | |
void | mrpt::math::laplacian (const MATIN &g, MATOUT &ret) |
Computes the Laplacian of a square graph weight matrix. More... | |
template<std::size_t BLOCKSIZE, typename MAT , typename MATRIX > | |
void | mrpt::math::extractSubmatrixSymmetricalBlocks (const MAT &m, const std::vector< size_t > &block_indices, MATRIX &out) |
Get a submatrix from a square matrix, by collecting the elements M(idxs,idxs), where idxs is a sequence {block_indices(i):block_indices(i)+BLOCKSIZE-1} for all "i" up to the size of block_indices. More... | |
template<typename MAT , typename MATRIX > | |
void | mrpt::math::extractSubmatrixSymmetricalBlocksDyn (const MAT &m, const std::size_t BLOCKSIZE, const std::vector< size_t > &block_indices, MATRIX &out) |
template<typename MAT , typename MATRIX > | |
void | mrpt::math::extractSubmatrixSymmetrical (const MAT &m, const std::vector< size_t > &indices, MATRIX &out) |
Get a submatrix from a square matrix, by collecting the elements M(idxs,idxs), where idxs is the sequence of indices passed as argument. More... | |
#define SAVE_MATRIX | ( | M | ) | M.saveToTextFile(#M ".txt"); |
A useful macro for saving matrixes to a file while debugging.
Definition at line 158 of file ops_matrices.h.
Page generated by Doxygen 1.8.14 for MRPT 2.0.4 Git: 33de1d0ad Sat Jun 20 11:02:42 2020 +0200 at sáb jun 20 17:35:17 CEST 2020 |