MRPT logo

CMatrixFixedNumeric.h File Reference

#include <mrpt/math/CMatrix.h>
#include <mrpt/math/CMatrixD.h>

Go to the source code of this file.


Classes

class  mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >
 A numeric matrix of compile-time fixed size. More...

Namespaces

namespace  mrpt
 This is the global namespace for all Mobile Robot Porgramming Toolkit (MRPT) libraries.
namespace  mrpt::math
 This base provides a set of functions for maths stuff.

Typedefs

Typedefs for common sizes
typedef CMatrixFixedNumeric
< double, 2, 2 > 
mrpt::math::CMatrixDouble22
typedef CMatrixFixedNumeric
< double, 3, 3 > 
mrpt::math::CMatrixDouble33
typedef CMatrixFixedNumeric
< double, 4, 4 > 
mrpt::math::CMatrixDouble44
typedef CMatrixFixedNumeric
< double, 6, 6 > 
mrpt::math::CMatrixDouble66
typedef CMatrixFixedNumeric
< double, 1, 3 > 
mrpt::math::CMatrixDouble13
typedef CMatrixFixedNumeric
< double, 3, 1 > 
mrpt::math::CMatrixDouble31
typedef CMatrixFixedNumeric
< double, 1, 2 > 
mrpt::math::CMatrixDouble12
typedef CMatrixFixedNumeric
< double, 2, 1 > 
mrpt::math::CMatrixDouble21
typedef CMatrixFixedNumeric
< double, 6, 1 > 
mrpt::math::CMatrixDouble61
typedef CMatrixFixedNumeric
< double, 1, 6 > 
mrpt::math::CMatrixDouble16
typedef CMatrixFixedNumeric
< float, 2, 2 > 
mrpt::math::CMatrixFloat22
typedef CMatrixFixedNumeric
< float, 3, 3 > 
mrpt::math::CMatrixFloat33
typedef CMatrixFixedNumeric
< float, 4, 4 > 
mrpt::math::CMatrixFloat44
typedef CMatrixFixedNumeric
< float, 6, 6 > 
mrpt::math::CMatrixFloat66
typedef CMatrixFixedNumeric
< float, 1, 3 > 
mrpt::math::CMatrixFloat13
typedef CMatrixFixedNumeric
< float, 3, 1 > 
mrpt::math::CMatrixFloat31
typedef CMatrixFixedNumeric
< float, 1, 2 > 
mrpt::math::CMatrixFloat12
typedef CMatrixFixedNumeric
< float, 2, 1 > 
mrpt::math::CMatrixFloat21
typedef CMatrixFixedNumeric
< float, 6, 1 > 
mrpt::math::CMatrixFloat61
typedef CMatrixFixedNumeric
< float, 1, 6 > 
mrpt::math::CMatrixFloat16

Functions

template<typename T , size_t N, size_t M>
void mrpt::math::multiply_HCHt (const CMatrixFixedNumeric< T, N, M > &H, const CMatrixFixedNumeric< T, M, M > &C, CMatrixFixedNumeric< T, N, N > &R, bool accumResultInOutput)
 Use the member method with the same name in matrix classes.
template<typename T , size_t NROWS, size_t NCOLS>
void mrpt::math::invMatrix (const CMatrixFixedNumeric< T, NROWS, NCOLS > &M, CMatrixFixedNumeric< T, NROWS, NCOLS > &out_inv)
 Returns the inverse of the matrix in "out_inv".
template<typename T , size_t NROWS, size_t NCOLS>
void mrpt::math::invMatrix_destroySrc (CMatrixFixedNumeric< T, NROWS, NCOLS > &M, CMatrixFixedNumeric< T, NROWS, NCOLS > &out_inv)
 Returns the inverse of the matrix in "out_inv" , DESTROYING the original matrix M.
template<typename T , size_t NROWS, size_t NCOLS>
void mrpt::math::multiply (CMatrixFixedNumeric< T, NROWS, NCOLS > &m, const T val)
 Multiply by scalar.
template<typename T , size_t NROWS, size_t NCOLS, size_t M1C>
void mrpt::math::multiply (const CMatrixFixedNumeric< T, NROWS, M1C > &m1, const CMatrixFixedNumeric< T, M1C, NCOLS > &m2, CMatrixFixedNumeric< T, NROWS, NCOLS > &RESULT)
 Multiply 2 matrices: RESULT = m1 * m2.
template<typename T , size_t NROWS, size_t NCOLS>
void mrpt::math::multiply_SIMD (CMatrixFixedNumeric< T, NROWS, NCOLS > &m, const T val)
template<typename T , size_t NROWS, size_t NCOLS, size_t M1C>
void mrpt::math::multiply_SIMD (const CMatrixFixedNumeric< T, NROWS, M1C > &m1, const CMatrixFixedNumeric< T, M1C, NCOLS > &m2, CMatrixFixedNumeric< T, NROWS, NCOLS > &RESULT)
template<typename T , size_t M1R, size_t M1C>
void mrpt::math::multiply_AAt (const CMatrixFixedNumeric< T, M1R, M1C > &m1, CMatrixFixedNumeric< T, M1R, M1R > &RESULT)
 Multiply 2 matrices: RESULT = A * A^t.
template<typename T , size_t N, size_t M>
void mrpt::math::multiply_Ab (const CMatrixFixedNumeric< T, N, M > &A, const std::vector< T > &a, std::vector< T > &out_v)
 Computes the vector v = A * a, where "a" is a column vector of the appropriate length.
template<typename T , size_t NROWS, size_t NCOLS>
void mrpt::math::sumInPlace (CMatrixFixedNumeric< T, NROWS, NCOLS > &m, const T val)
 Sum a scalar to all elements.
template<typename T , size_t NROWS, size_t NCOLS>
void mrpt::math::sumInPlace_SIMD (CMatrixFixedNumeric< T, NROWS, NCOLS > &m, const T val)
template<typename T , size_t NROWS, size_t NCOLS>
void mrpt::math::sumInPlace (CMatrixFixedNumeric< T, NROWS, NCOLS > &M, const CMatrixFixedNumeric< T, NROWS, NCOLS > &A)
 Sum two matrices: M+=A.
template<typename T , size_t NROWS, size_t NCOLS>
void mrpt::math::sumInPlace_SIMD (CMatrixFixedNumeric< T, NROWS, NCOLS > &M, const CMatrixFixedNumeric< T, NROWS, NCOLS > &A)
template<typename T , size_t NROWS, size_t NCOLS>
void mrpt::math::substractInPlace (CMatrixFixedNumeric< T, NROWS, NCOLS > &M, const CMatrixFixedNumeric< T, NROWS, NCOLS > &A)
 Sum two matrices: M-=A.
template<typename T , size_t NROWS, size_t NCOLS>
void mrpt::math::substractInPlace_SIMD (CMatrixFixedNumeric< T, NROWS, NCOLS > &M, const CMatrixFixedNumeric< T, NROWS, NCOLS > &A)
template<typename T , size_t NROWS, size_t NCOLS>
mrpt::math::sumMatrixAllElements (const CMatrixFixedNumeric< T, NROWS, NCOLS > &M)
 Sum all the elements in the matrix.
template<typename T , size_t NROWS, size_t NCOLS>
mrpt::math::sumMatrixAllElements_SIMD (const CMatrixFixedNumeric< T, NROWS, NCOLS > &M)
template<typename T , size_t NROWS, size_t NCOLS>
mrpt::math::minimumMatrix (const CMatrixFixedNumeric< T, NROWS, NCOLS > &M)
 Sum all the elements in the matrix.
template<typename T , size_t NROWS, size_t NCOLS>
mrpt::math::minimumMatrix_SIMD (const CMatrixFixedNumeric< T, NROWS, NCOLS > &M)
template<typename T , size_t NROWS, size_t NCOLS>
mrpt::math::maximumMatrix (const CMatrixFixedNumeric< T, NROWS, NCOLS > &M)
 Sum all the elements in the matrix.
template<typename T , size_t NROWS, size_t NCOLS>
mrpt::math::maximumMatrix_SIMD (const CMatrixFixedNumeric< T, NROWS, NCOLS > &M)
template<typename T , size_t NROWS, size_t NCOLS>
void mrpt::math::minimumAndMaximumMatrix (const CMatrixFixedNumeric< T, NROWS, NCOLS > &M, T &val_min, T &val_max)
 Sum all the elements in the matrix.
template<typename T , size_t NROWS, size_t NCOLS>
void mrpt::math::minimumAndMaximumMatrix_SIMD (const CMatrixFixedNumeric< T, NROWS, NCOLS > &M, T &val_min, T &val_max)
template<typename T , size_t NROWS, size_t NCOLS>
mrpt::math::detMatrix (const CMatrixFixedNumeric< T, NROWS, NCOLS > &M)
 Returns the determinant of the matrix.
template<typename T , size_t NROWS, size_t NCOLS>
void mrpt::math::sqrtMatrix (CMatrixFixedNumeric< T, NROWS, NCOLS > &M)
 Returns the determinant of the matrix.
template<typename T , size_t N>
void mrpt::math::eigenVectorsMatrix (const CMatrixFixedNumeric< T, N, N > &M, CMatrixFixedNumeric< T, N, N > &Z, CMatrixFixedNumeric< T, N, N > &D)
 Used from the method from CMatrix classes instead.
template<typename T , size_t N, size_t M>
void mrpt::math::multiply_HtCH (const CMatrixFixedNumeric< T, M, N > &H, const CMatrixFixedNumeric< T, M, M > &C, CMatrixFixedNumeric< T, N, N > &R, bool accumResultInOutput)
 Use the member method with the same name in matrix classes.
template<typename T , size_t NROWS, size_t NCOLS>
CMatrixFixedNumeric< T, NROWS,
NCOLS > 
mrpt::math::sum (const CMatrixFixedNumeric< T, NROWS, NCOLS > &A, const CMatrixFixedNumeric< T, NROWS, NCOLS > &B)
 Return the sum of two matrices: RET = A+B.
template<typename T , size_t NROWS, size_t NCOLS>
CMatrixFixedNumeric< T, NROWS,
NCOLS > 
mrpt::math::substract (const CMatrixFixedNumeric< T, NROWS, NCOLS > &A, const CMatrixFixedNumeric< T, NROWS, NCOLS > &B)
 Return the sum of two matrices: RET = A-B.
template<typename T , size_t NROWS, size_t NCOLS>
CMatrixFixedNumeric< T, NROWS,
NCOLS > 
mrpt::math::operator* (const CMatrixFixedNumeric< T, NROWS, NCOLS > &m1, const T v)
 Multiply a matrix by a scalar.
template<typename T , size_t NROWS, size_t NCOLS, size_t M1C>
CMatrixFixedNumeric< T, NROWS,
NCOLS > 
mrpt::math::operator* (const CMatrixFixedNumeric< T, NROWS, M1C > &m1, const CMatrixFixedNumeric< T, M1C, NCOLS > &m2)
 Multiply 2 matrices with the * operator.
template<typename T , size_t NROWS, size_t NCOLS>
CMatrixFixedNumeric< T, NROWS,
NCOLS > 
mrpt::math::operator+ (const CMatrixFixedNumeric< T, NROWS, NCOLS > &m1, const CMatrixFixedNumeric< T, NROWS, NCOLS > &m2)
 Add 2 matrices with the + operator.
template<typename T , size_t NROWS, size_t NCOLS>
CMatrixFixedNumeric< T, NROWS,
NCOLS > 
mrpt::math::operator- (const CMatrixFixedNumeric< T, NROWS, NCOLS > &m1, const CMatrixFixedNumeric< T, NROWS, NCOLS > &m2)
 Substract 2 matrices with the - operator.
template<typename T , size_t NROWS, size_t NCOLS>
CMatrixFixedNumeric< T, NCOLS,
NROWS > 
mrpt::math::operator- (const CMatrixFixedNumeric< T, NROWS, NCOLS > &m)
 unary negative operator -
template<typename T , size_t NROWS, size_t NCOLS>
CMatrixFixedNumeric< T, NCOLS,
NROWS > 
mrpt::math::operator~ (const CMatrixFixedNumeric< T, NROWS, NCOLS > &m)
 unary transpose operator ~
template<typename T , size_t NROWS>
CMatrixFixedNumeric< T, NROWS,
NROWS > 
mrpt::math::operator! (const CMatrixFixedNumeric< T, NROWS, NROWS > &m)
 unary inverse operator !
template<typename T >
void MRPTDLLIMPEXP mrpt::math::tred2 (T **a, size_t nn, T d[], T e[])
template<class T >
void MRPTDLLIMPEXP mrpt::math::tqli (T d[], T e[], size_t nn, T **z)
template<typename T >
void MRPTDLLIMPEXP mrpt::math::eigenVectorsMatrix (const CMatrixFixedNumeric< T, 2, 2 > &M, CMatrixFixedNumeric< T, 2, 2 > &Z, CMatrixFixedNumeric< T, 2, 2 > &D)
 Used from the method from CMatrix classes instead.
template<typename T >
mrpt::math::detMatrix (const CMatrixFixedNumeric< T, 2, 2 > &M)
 Returns the determinant of the matrix.
template<typename T >
mrpt::math::detMatrix (const CMatrixFixedNumeric< T, 3, 3 > &M)
 Returns the determinant of the matrix DET = a11(a33a22-a32a23)-a21(a33a12-a32a13)+a31(a23a12-a22a13).
template<typename T >
mrpt::math::detMatrix (const CMatrixFixedNumeric< T, 4, 4 > &M)
 Returns the determinant of the matrix.
template<typename T >
void mrpt::math::invMatrix (const CMatrixFixedNumeric< T, 2, 2 > &M, CMatrixFixedNumeric< T, 2, 2 > &out_inv)
 Returns the inverse of the matrix in "out_inv".
template<typename T >
void mrpt::math::invMatrix_destroySrc (CMatrixFixedNumeric< T, 2, 2 > &M, CMatrixFixedNumeric< T, 2, 2 > &out_inv)
template<typename T >
void mrpt::math::invMatrix (const CMatrixFixedNumeric< T, 3, 3 > &M, CMatrixFixedNumeric< T, 3, 3 > &out_inv)
 Returns the inverse of the matrix in "out_inv".
template<typename T >
void mrpt::math::invMatrix_destroySrc (CMatrixFixedNumeric< T, 3, 3 > &M, CMatrixFixedNumeric< T, 3, 3 > &out_inv)
template<typename T , size_t NROWS, size_t NCOLS>
void mrpt::math::fixedToDynMatrix (const CMatrixFixedNumeric< T, NROWS, NCOLS > &SRC, CMatrixTemplateNumeric< T > &DST)
 Auxiliary function used in the constructor of dyn.
template<typename T , size_t NROWS, size_t NCOLS>
void mrpt::math::insertMatrixFixTransposeIntoDyn (CMatrixTemplate< T > &M, const size_t nRow, const size_t nCol, const CMatrixFixedNumeric< T, NROWS, NCOLS > &in)
 Auxiliary function used in CMatrixTemplate.
template<typename T , size_t NROWS, size_t NCOLS>
void mrpt::math::insertMatrixFixIntoDyn (CMatrixTemplate< T > &M, const size_t nRow, const size_t nCol, const CMatrixFixedNumeric< T, NROWS, NCOLS > &in)
 Auxiliary function used in CMatrixTemplate.
template<typename T , size_t NROWS, size_t NCOLS>
void mrpt::math::extractFixMatrixFromDynMatrix (const CMatrixTemplate< T > &M, const size_t nRow, const size_t nCol, CMatrixFixedNumeric< T, NROWS, NCOLS > &outMat)
 Used from CMatrixTemplate::extractMatrix.
template<size_t NROWS, size_t NCOLS>
mrpt::utils::CStreammrpt::math::operator>> (mrpt::utils::CStream &in, CMatrixFixedNumeric< float, NROWS, NCOLS > &M)
 Read operator from a CStream.
template<size_t NROWS, size_t NCOLS>
mrpt::utils::CStreammrpt::math::operator>> (mrpt::utils::CStream &in, CMatrixFixedNumeric< double, NROWS, NCOLS > &M)
 Read operator from a CStream.
template<size_t NROWS, size_t NCOLS>
mrpt::utils::CStreammrpt::math::operator<< (mrpt::utils::CStream &out, const CMatrixFixedNumeric< float, NROWS, NCOLS > &M)
 Write operator for writing into a CStream.
template<size_t NROWS, size_t NCOLS>
mrpt::utils::CStreammrpt::math::operator<< (mrpt::utils::CStream &out, const CMatrixFixedNumeric< double, NROWS, NCOLS > &M)
 Write operator for writing into a CStream.
template<class T , size_t NROWS, size_t NCOLS>
std::ostream & mrpt::math::operator<< (std::ostream &ostrm, const CMatrixFixedNumeric< T, NROWS, NCOLS > &m)
 Textual output stream function.
template<class T , size_t NROWS, size_t NCOLS>
bool mrpt::math::operator== (const CMatrixFixedNumeric< T, NROWS, NCOLS > &M1, const CMatrixFixedNumeric< T, NROWS, NCOLS > &M2)
 Equal comparison (==).
Conversions from point & poses to matrices
Used from the "operator =" from poses/points to CMatrixFixedNumeric

template<typename T , size_t NROWS, size_t NCOLS>
CMatrixFixedNumeric< T, NROWS,
NCOLS > & 
mrpt::math::matrixFromPoseOrPoint (CMatrixFixedNumeric< T, NROWS, NCOLS > &M, const CPoint2D &p)
template<typename T , size_t NROWS, size_t NCOLS>
CMatrixFixedNumeric< T, NROWS,
NCOLS > & 
mrpt::math::matrixFromPoseOrPoint (CMatrixFixedNumeric< T, NROWS, NCOLS > &M, const CPoint3D &p)
template<typename T , size_t NROWS, size_t NCOLS>
CMatrixFixedNumeric< T, NROWS,
NCOLS > & 
mrpt::math::matrixFromPoseOrPoint (CMatrixFixedNumeric< T, NROWS, NCOLS > &M, const CPose2D &p)
template<typename T , size_t NROWS, size_t NCOLS>
CMatrixFixedNumeric< T, NROWS,
NCOLS > & 
mrpt::math::matrixFromPoseOrPoint (CMatrixFixedNumeric< T, NROWS, NCOLS > &M, const CPose3D &p)
template<>
CMatrixDouble21 & mrpt::math::matrixFromPoseOrPoint (CMatrixDouble21 &M, const CPoint2D &p)
template<>
CMatrixDouble31 & mrpt::math::matrixFromPoseOrPoint (CMatrixDouble31 &M, const CPoint3D &p)
template<>
CMatrixDouble31 & mrpt::math::matrixFromPoseOrPoint (CMatrixDouble31 &M, const CPose2D &p)
template<>
CMatrixDouble61 & mrpt::math::matrixFromPoseOrPoint (CMatrixDouble61 &M, const CPose3D &p)




Page generated by Doxygen 1.5.9 for MRPT 0.7.1 SVN: at Mon Aug 17 22:32:05 EDT 2009