Main MRPT website > C++ reference
MRPT logo

mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS > Class Template Reference

A numeric matrix of compile-time fixed size. More...

#include <mrpt/math/CMatrixFixedNumeric.h>

Collaboration diagram for mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >:
Collaboration graph
[legend]

List of all members.

Classes

struct  mrpt_container

Public Types

typedef CArray< T, NROWS *NCOLS > array_type
 The underlying array of this matrix.
typedef T value_type
 The type of the matrix elements.
typedef T & reference
typedef const T & const_reference
typedef std::size_t size_type
typedef std::ptrdiff_t difference_type
typedef CMatrixFixedNumeric< T,
NROWS, NCOLS > 
mrpt_autotype
 See ops_containers.h.

Public Member Functions

 CMatrixFixedNumeric ()
 Default constructor, fills the whole matrix with zeros.
 CMatrixFixedNumeric (bool, bool, bool)
 Constructor which leaves the matrix uninitialized: it uses two bool arguments with ignored values, but they must be present to make the method signature distinctive and make sure that the user wants the matrix to be uninitialized (ie, leaving only one bool argument may lead to unintended conversions from bool values!) Example of usage: CMatrixFixedNumeric<double,3,2> M(UNINITIALIZED_MATRIX);.
template<typename R >
 CMatrixFixedNumeric (const CMatrixTemplateNumeric< R > &M)
 Copy constructor from a matrix of any type.
Methods common to all containers

size_t countNonZero () const
void fill (const T &val)
T maximum (size_t *maxIndex=NULL) const
T minimum (size_t *minIndex=NULL) const
void minimum_maximum (T &out_min, T &out_max, size_t *minIndex=NULL, size_t *maxIndex=NULL) const
T norm_inf (size_t *maxIndex=NULL) const
T sumAll () const
template<typename RET_TYPE >
RET_TYPE sumAllRetType () const
template<class CONTAINEROUT >
void cumsum (CONTAINEROUT &out) const
template<class CONTAINEROUT >
CONTAINEROUT cumsum () const
template<class CONTAINER2 >
size_t countCommonElements (const CONTAINER2 &b) const
std::vector< double > histogram (double limit_min, double limit_max, size_t number_bins, bool do_normalization=false) const
template<class F >
mrpt_autotype & applyToAllElements (T(*function)(T))
mrpt_autotype & Sqrt ()
mrpt_autotype & Abs ()
mrpt_autotype & Square ()
mrpt_autotype & Exp ()
mrpt_autotype & Log ()
T squareNorm () const
T norm () const
double mean () const
void adjustRange (const T min_val, const T max_val)
void normalize (const T min_val=0, const T max_val=1)
double std (bool unbiased=true) const
void meanAndStd (double &out_mean, double &out_std, bool unbiased=true)
Methods common to all matrices

mrpt_autotype operator+ ()
mrpt_autotype operator- () const
mrpt_autotype & operator+= (const T n)
mrpt_autotype & operator-= (const T n)
mrpt_autotype & operator*= (const T n)
mrpt_autotype & operator/= (const T n)
template<typename OTHERMATRIX >
OTHERMATRIX::template
mrpt_matrix_tag_templ< void >
::void_type 
operator*= (const OTHERMATRIX &m)
template<typename OTHERMATRIX >
mrpt_autotype & add_At (const OTHERMATRIX &m)
template<typename OTHERMATRIX >
mrpt_autotype & add_Ac (const OTHERMATRIX &m, const T c)
template<typename OTHERMATRIX >
mrpt_autotype & substract_At (const OTHERMATRIX &m)
template<typename OTHERMATRIX >
mrpt_autotype & substract_An (const OTHERMATRIX &m, const size_t n)
template<typename OTHERMATRIX >
mrpt_autotype & substract_Ac (const OTHERMATRIX &m, const T c)
template<typename OTHERMATRIX >
mrpt_autotype & add_AAt (const OTHERMATRIX &m)
template<typename OTHERMATRIX >
mrpt_autotype & substract_AAt (const OTHERMATRIX &m)
bool empty () const
template<class MATRIX1 , class MATRIX2 >
void multiply (const MATRIX1 &A, const MATRIX2 &B)
template<class MATRIX1 , class MATRIX2 >
void multiply_AB (const MATRIX1 &A, const MATRIX2 &B)
template<typename OTHERVECTOR1 , typename OTHERVECTOR2 >
void multiply_Ab (const OTHERVECTOR1 &vIn, OTHERVECTOR2 &vOut, bool accumToOutput=false) const
template<typename OTHERVECTOR1 , typename OTHERVECTOR2 >
void multiply_Atb (const OTHERVECTOR1 &vIn, OTHERVECTOR2 &vOut, bool accumToOutput=false) const
template<typename MAT_C , typename MAT_R >
void multiply_HCHt (const MAT_C &C, MAT_R &R, bool accumResultInOutput=false, bool allow_submatrix_mult=false) const
template<typename MAT_C >
T multiply_HCHt_scalar (const MAT_C &C) const
template<typename MAT_C >
T multiply_HtCH_scalar (const MAT_C &C) const
template<typename MAT_C , typename MAT_R >
void multiply_HtCH (const MAT_C &C, MAT_R &R, bool accumResultInOutput=false, bool allow_submatrix_mult=false) const
template<class MAT_A , class MAT_OUT >
void multiply_subMatrix (const MAT_A &A, MAT_OUT &outResult, const size_t A_cols_offset, const size_t A_rows_offset, const size_t A_col_count) const
template<class MAT_A , class MAT_B , class MAT_C >
void multiply_ABC (const MAT_A &A, const MAT_B &B, const MAT_C &C)
template<class MAT_A , class MAT_B , class MAT_C >
void multiply_ABCt (const MAT_A &A, const MAT_B &B, const MAT_C &C)
template<class MAT_A , class MAT_B >
void multiply_ABt (const MAT_A &A, const MAT_B &B)
template<class MAT_A >
void multiply_AAt (const MAT_A &A)
template<class MAT_A >
void multiply_AtA (const MAT_A &A)
template<class MAT_A , class MAT_B >
void multiply_result_is_symmetric (const MAT_A &A, const MAT_B &B)
template<typename OTHERMATRIX >
mrpt_autotype & assignMatrix (const OTHERMATRIX &m)
template<typename OTHERMATRIX >
mrpt_autotype & assignMatrixTransposed (const OTHERMATRIX &m)
mrpt_autotype & operator= (const TPose2D &p)
mrpt_autotype & operator= (const TPose3D &p)
mrpt_autotype & operator= (const TPose3DQuat &p)
mrpt_autotype & operator= (const TPoint2D &p)
mrpt_autotype & operator= (const TPoint3D &p)
mrpt_autotype & operator= (const mrpt::poses::CPose2D &p)
mrpt_autotype & operator= (const mrpt::poses::CPose3D &p)
mrpt_autotype & operator= (const mrpt::poses::CPose3DQuat &p)
mrpt_autotype & operator= (const mrpt::poses::CPoint2D &p)
mrpt_autotype & operator= (const mrpt::poses::CPoint3D &p)
T _E (const size_t row, const size_t col) const
T & _E (const size_t row, const size_t col)
T _A (const size_t n) const
T & _A (const size_t n)
bool IsSquare () const
bool isSquare () const
bool isSingular (const T epsilon=0) const
T trace () const
template<class MAT_OUT >
void pseudoInverse (MAT_OUT &out) const
template<class MAT_OUT >
MAT_OUT pseudoInverse () const
T det () const
template<class MATRIXOUT >
void inv (MATRIXOUT &out) const
mrpt_autotype inv () const
template<class MATRIXOUT >
void inv_fast (MATRIXOUT &out)
template<class MAT2 , class MAT3 >
void leftDivideSquare (const MAT2 &A, MAT3 &RES) const
template<class MAT2 , class MAT3 >
void rightDivideSquare (const MAT2 &B, MAT3 &RES) const
template<typename MAT2 >
void fastLeftDivideSquare (MAT2 &A)
template<typename MAT2 >
void fastRightDivideSquare (MAT2 &B)
void saveToTextFile (const std::string &file, mrpt::math::TMatrixTextFileFormat fileFormat=MATRIX_FORMAT_ENG, bool appendMRPTHeader=false, const std::string &userHeader=std::string("")) const
std::string inMatlabFormat (const size_t decimal_digits=6) const
int pivot (const size_t row)
template<class MATRIXOUT >
bool chol (MATRIXOUT &out) const
template<class MATRIX1 , class MATRIX2 >
MATRIX1::template
mrpt_matrix_tag_templ
< typename
MATRIX2::mrpt_matrix_tag >
::void_type 
eigenVectors (MATRIX1 &eVecs, MATRIX2 &eVals) const
template<class MATRIX1 , class VECTOR1 >
void eigenVectorsVec (MATRIX1 &eVecs, VECTOR1 &eVals) const
template<class VECTOR1 >
void eigenValues (VECTOR1 &eVals) const
void setIdentity ()
void setIdentity (size_t N)
size_t rank (T eps=1e-7) const
template<class MATRIXLIKE >
void insertMatrix (const size_t nRow, const size_t nCol, const MATRIXLIKE &in)
template<class MATRIXLIKE >
void insertMatrixTranspose (const size_t nRow, const size_t nCol, const MATRIXLIKE &in)
template<class MATOUT >
void extractMatrix (const size_t first_row, const size_t first_col, MATOUT &outMat) const
template<class MATOUT >
void extractMatrix (const size_t first_row, const size_t first_col, const size_t nRows, const size_t nCols, MATOUT &outMat) const
template<class VECLIKE >
void extractRow (const size_t nRow, VECLIKE &out, const size_t startingCol=0) const
template<class VECLIKE >
void extractCol (const size_t nCol, VECLIKE &out, const size_t startingRow=0) const
template<class VECLIKE >
void insertRow (const size_t nRow, VECLIKE &in, const size_t startingCol=0)
template<class VECLIKE >
void insertCol (const size_t nCol, VECLIKE &in, const size_t startingRow=0)

Public Attributes

array_type m_Val
 The stored data of the matrix: elements are saved by rows, left to right, from top to bottom.

Iterator-related stuff



typedef array_type::iterator iterator
 Iterator.
typedef array_type::const_iterator const_iterator
 Const iterator.
typedef
array_type::reverse_iterator 
reverse_iterator
 Reverse iterator.
typedef
array_type::const_reverse_iterator 
const_reverse_iterator
 Const reverse iterator.
iterator begin ()
iterator end ()
const_iterator begin () const
const_iterator end () const
reverse_iterator rbegin ()
reverse_iterator rend ()
const_reverse_iterator rbegin () const
const_reverse_iterator rend () const

Detailed Description

template<typename T, size_t NROWS, size_t NCOLS>
class mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >

A numeric matrix of compile-time fixed size.

The template can be instanced for data types "float" or "double" Virtually all methods have specializations and/or SSE2 optimized implementations, so use this class when time is critical.

These matrices have iterators and reverse iterators to access all the elements in the matrix as a sequence, starting from the element (0,0), then row by row, from left to right.

Note:
To enable SSE2 optimizations, add the definition "#define MRPT_USE_SSE2" BEFORE including MRPT headers in your code. This is because these optimizations are only applicable to static matrix objects, but not when they are created in dynamic memory.
See also:
CMatrixTemplateNumeric (for dynamic-size matrices)

Definition at line 55 of file CMatrixFixedNumeric.h.


Member Typedef Documentation

template<typename T, size_t NROWS, size_t NCOLS>
typedef CArray<T,NROWS*NCOLS> mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::array_type

The underlying array of this matrix.

Definition at line 58 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
typedef array_type::const_iterator mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::const_iterator

Const iterator.

Definition at line 77 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
typedef const T& mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::const_reference

Definition at line 62 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
typedef array_type::const_reverse_iterator mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::const_reverse_iterator

Const reverse iterator.

Definition at line 79 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
typedef std::ptrdiff_t mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::difference_type

Definition at line 64 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
typedef array_type::iterator mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::iterator

Iterator.

Definition at line 76 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
typedef CMatrixFixedNumeric<T,NROWS,NCOLS> mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::mrpt_autotype

See ops_containers.h.

Definition at line 67 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
typedef T& mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::reference

Definition at line 61 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
typedef array_type::reverse_iterator mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::reverse_iterator

Reverse iterator.

Definition at line 78 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
typedef std::size_t mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::size_type

Definition at line 63 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
typedef T mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::value_type

The type of the matrix elements.

Definition at line 60 of file CMatrixFixedNumeric.h.


Constructor & Destructor Documentation

template<typename T, size_t NROWS, size_t NCOLS>
mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::CMatrixFixedNumeric (  )  [inline]

Default constructor, fills the whole matrix with zeros.

Definition at line 102 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::CMatrixFixedNumeric ( bool  ,
bool  ,
bool   
) [inline]

Constructor which leaves the matrix uninitialized: it uses two bool arguments with ignored values, but they must be present to make the method signature distinctive and make sure that the user wants the matrix to be uninitialized (ie, leaving only one bool argument may lead to unintended conversions from bool values!) Example of usage: CMatrixFixedNumeric<double,3,2> M(UNINITIALIZED_MATRIX);.

Definition at line 113 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
template<typename R >
mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::CMatrixFixedNumeric ( const CMatrixTemplateNumeric< R > &  M  )  [inline]

Copy constructor from a matrix of any type.

Definition at line 119 of file CMatrixFixedNumeric.h.


Member Function Documentation

template<typename T, size_t NROWS, size_t NCOLS>
T& mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::_A ( const size_t  n  )  [inline]

Access the n'th element viewing the matrix as an array, with n=row*COLS+col

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
T mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::_A ( const size_t  n  )  const [inline]

Access the n'th element viewing the matrix as an array, with n=row*COLS+col

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
T& mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::_E ( const size_t  row,
const size_t  col 
) [inline]

Alternative access to element (i,j) with first index being (1,1) instead of (0,0)

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
T mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::_E ( const size_t  row,
const size_t  col 
) const [inline]

Alternative access to element (i,j) with first index being (1,1) instead of (0,0)

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
mrpt_autotype& mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::Abs (  )  [inline]

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
template<typename OTHERMATRIX >
mrpt_autotype& mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::add_AAt ( const OTHERMATRIX &  m  )  [inline]

this += A + AT

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
template<typename OTHERMATRIX >
mrpt_autotype& mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::add_Ac ( const OTHERMATRIX &  m,
const T  c 
) [inline]

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
template<typename OTHERMATRIX >
mrpt_autotype& mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::add_At ( const OTHERMATRIX &  m  )  [inline]

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
void mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::adjustRange ( const T  min_val,
const T  max_val 
) [inline]
Parameters:
max_val Normalize all the elements such as they are in the given range

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
template<class F >
mrpt_autotype& mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::applyToAllElements ( T(*)(T)  function  )  [inline]

Applies a generic operation "T func(T val)" to all the elements.

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
template<typename OTHERMATRIX >
mrpt_autotype& mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::assignMatrix ( const OTHERMATRIX &  m  )  [inline]

Assignment of a matrix from any other kind of matrix

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
template<typename OTHERMATRIX >
mrpt_autotype& mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::assignMatrixTransposed ( const OTHERMATRIX &  m  )  [inline]

Assignment of a matrix to another one (of any type!), transposed.

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
const_iterator mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::begin (  )  const [inline]

Definition at line 83 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
iterator mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::begin (  )  [inline]

Definition at line 81 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
template<class MATRIXOUT >
bool mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::chol ( MATRIXOUT &  out  )  const [inline]

Cholesky factorization: in = out' * out

Returns:
True on success, false on singular matrix
See also:
mrpt::math::chol

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
template<class CONTAINER2 >
size_t mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::countCommonElements ( const CONTAINER2 &  b  )  const [inline]

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
size_t mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::countNonZero (  )  const [inline]

Count how many elements in a container are non-zero.

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
template<class CONTAINEROUT >
CONTAINEROUT mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::cumsum (  )  const [inline]

Cumsum of all the elements, returning a container of the given type, for example: CMatrixDouble m = mat.cumsum<CMatrixDouble>();

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
template<class CONTAINEROUT >
void mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::cumsum ( CONTAINEROUT &  out  )  const [inline]

Cumsum of all the elements, saving in an output container

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
T mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::det (  )  const [inline]

< Returns the determinant of the matrix

Definition at line 71 of file CMatrixFixedNumeric.h.

Referenced by mrpt::math::productIntegralTwoGaussians().

template<typename T, size_t NROWS, size_t NCOLS>
template<class VECTOR1 >
void mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::eigenValues ( VECTOR1 &  eVals  )  const [inline]

Return the eigenvalues of the matrix in an ordered vector.

See also:
eigenVectors

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
template<class MATRIX1 , class MATRIX2 >
MATRIX1 ::template mrpt_matrix_tag_templ<typename MATRIX2 ::mrpt_matrix_tag>::void_type mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::eigenVectors ( MATRIX1 &  eVecs,
MATRIX2 &  eVals 
) const [inline]

Eigenvalues and eigenvector of symmetric matrix: M = eVecs * eVals * eVecsT, with eigenvectors in columns in eVecs, eigenvalues in ascending order in diagonal of eVals

See also:
eigenVectorsVec, eigenValues

Definition at line 71 of file CMatrixFixedNumeric.h.

Referenced by mrpt::random::CRandomGenerator::drawGaussianMultivariate(), and mrpt::random::CRandomGenerator::drawGaussianMultivariateMany().

template<typename T, size_t NROWS, size_t NCOLS>
template<class MATRIX1 , class VECTOR1 >
void mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::eigenVectorsVec ( MATRIX1 &  eVecs,
VECTOR1 &  eVals 
) const [inline]

Like eigenVectors, but eigenvalues are returned in a vector instead of a matrix's diagonal.

See also:
eigenVectors,eigenValues

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
bool mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::empty (  )  const [inline]

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
const_iterator mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::end (  )  const [inline]

Definition at line 84 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
iterator mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::end (  )  [inline]

Definition at line 82 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
mrpt_autotype& mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::Exp (  )  [inline]

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
template<class VECLIKE >
void mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::extractCol ( const size_t  nCol,
VECLIKE &  out,
const size_t  startingRow = 0 
) const [inline]

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
template<class MATOUT >
void mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::extractMatrix ( const size_t  first_row,
const size_t  first_col,
const size_t  nRows,
const size_t  nCols,
MATOUT &  outMat 
) const [inline]

Extract a sub matrix of the given size from this matrix.

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
template<class MATOUT >
void mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::extractMatrix ( const size_t  first_row,
const size_t  first_col,
MATOUT &  outMat 
) const [inline]

Extract a sub matrix from this matrix (the size of the output matrix upon call determines the size of the submatrix to extract).

Definition at line 71 of file CMatrixFixedNumeric.h.

Referenced by mrpt::bayes::CKalmanFilterCapable< 7, 3, 3, 7 >::runOneKalmanIteration().

template<typename T, size_t NROWS, size_t NCOLS>
template<class VECLIKE >
void mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::extractRow ( const size_t  nRow,
VECLIKE &  out,
const size_t  startingCol = 0 
) const [inline]

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
template<typename MAT2 >
void mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::fastLeftDivideSquare ( MAT2 &  A  )  [inline]

Matrix left divide: this = A-1 &#183; this (A must be a square matrix, and will be modified on return).

See also:
leftDivideSquare,fastRightDivideSquare

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
template<typename MAT2 >
void mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::fastRightDivideSquare ( MAT2 &  B  )  [inline]

Matrix right divide: this = this &#183; B-1 (B must be a square matrix, and will be modified on return).

See also:
leftDivideSquare,fastRightDivideSquare

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
void mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::fill ( const T &  val  )  [inline]

Fill all the elements with a given value

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
std::vector<double> mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::histogram ( double  limit_min,
double  limit_max,
size_t  number_bins,
bool  do_normalization = false 
) const [inline]

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
std::string mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::inMatlabFormat ( const size_t  decimal_digits = 6  )  const [inline]

Return a string representation of the matrix in the form: "[m11 m12 m13...;m21 m22 m23...]", compatible with MATLAB matrices.

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
template<class VECLIKE >
void mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::insertCol ( const size_t  nCol,
VECLIKE &  in,
const size_t  startingRow = 0 
) [inline]

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
template<class MATRIXLIKE >
void mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::insertMatrix ( const size_t  nRow,
const size_t  nCol,
const MATRIXLIKE &  in 
) [inline]

Inserts a matrix into this matrix, at the position (nRow,nCol). An exception is raised in the inserted matrix does not fit.

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
template<class MATRIXLIKE >
void mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::insertMatrixTranspose ( const size_t  nRow,
const size_t  nCol,
const MATRIXLIKE &  in 
) [inline]

Inserts the transpose of a matrix into this matrix, at the position (nRow,nCol). An exception is raised in the inserted matrix does not fit.

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
template<class VECLIKE >
void mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::insertRow ( const size_t  nRow,
VECLIKE &  in,
const size_t  startingCol = 0 
) [inline]

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
mrpt_autotype mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::inv (  )  const [inline]

< mrpt_autotype out = inv(this)

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
template<class MATRIXOUT >
void mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::inv ( MATRIXOUT &  out  )  const [inline]

< out = inv(this)

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
template<class MATRIXOUT >
void mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::inv_fast ( MATRIXOUT &  out  )  [inline]
Parameters:
out out = inv(this), overwriting contents of this

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
bool mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::isSingular ( const T  epsilon = 0  )  const [inline]

Checks for the absolute value of the determinant of the matrix being equal or below a given threshold (by default, exactly zero).

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
bool mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::isSquare (  )  const [inline]

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
bool mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::IsSquare (  )  const [inline]

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
template<class MAT2 , class MAT3 >
void mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::leftDivideSquare ( const MAT2 &  A,
MAT3 &  RES 
) const [inline]

Matrix left divide: RES = A-1 &#183; this (A must be a square matrix).

See also:
rightDivideSquare,fastLeftDivideSquare

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
mrpt_autotype& mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::Log (  )  [inline]

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
T mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::maximum ( size_t *  maxIndex = NULL  )  const [inline]

Finds the maximum value (and the corresponding zero-based index).

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
double mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::mean (  )  const [inline]

Return the mean of the container (for matrices, as if it were a vector with all its elements).

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
void mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::meanAndStd ( double &  out_mean,
double &  out_std,
bool  unbiased = true 
) [inline]

Return the mean and standard deviation of all the elements in the container.

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
T mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::minimum ( size_t *  minIndex = NULL  )  const [inline]

Finds the minimum value (and the corresponding zero-based index).

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
void mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::minimum_maximum ( T &  out_min,
T &  out_max,
size_t *  minIndex = NULL,
size_t *  maxIndex = NULL 
) const [inline]

Minimum and maximum of a vector at once

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
template<class MATRIX1 , class MATRIX2 >
void mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::multiply ( const MATRIX1 &  A,
const MATRIX2 &  B 
) [inline]
Parameters:
B this = A * B

Definition at line 71 of file CMatrixFixedNumeric.h.

Referenced by mrpt::vision::CCamModel::getFullJacobianT().

template<typename T, size_t NROWS, size_t NCOLS>
template<class MAT_A >
void mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::multiply_AAt ( const MAT_A &  A  )  [inline]
Parameters:
A this = A * AT

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
template<typename OTHERVECTOR1 , typename OTHERVECTOR2 >
void mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::multiply_Ab ( const OTHERVECTOR1 &  vIn,
OTHERVECTOR2 &  vOut,
bool  accumToOutput = false 
) const [inline]

Computes the vector vOut = this * vIn, where "vIn" is a column vector of the appropriate length.

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
template<class MATRIX1 , class MATRIX2 >
void mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::multiply_AB ( const MATRIX1 &  A,
const MATRIX2 &  B 
) [inline]
Parameters:
B this = A * B

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
template<class MAT_A , class MAT_B , class MAT_C >
void mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::multiply_ABC ( const MAT_A &  A,
const MAT_B &  B,
const MAT_C &  C 
) [inline]
Parameters:
C this = A*B*C

Definition at line 71 of file CMatrixFixedNumeric.h.

Referenced by mrpt::vision::CCamModel::getFullInverseModelWithJacobian().

template<typename T, size_t NROWS, size_t NCOLS>
template<class MAT_A , class MAT_B , class MAT_C >
void mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::multiply_ABCt ( const MAT_A &  A,
const MAT_B &  B,
const MAT_C &  C 
) [inline]
Parameters:
C this = A*B*(CT)

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
template<class MAT_A , class MAT_B >
void mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::multiply_ABt ( const MAT_A &  A,
const MAT_B &  B 
) [inline]
Parameters:
B this = A * BT

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
template<class MAT_A >
void mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::multiply_AtA ( const MAT_A &  A  )  [inline]
Parameters:
A this = AT * A

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
template<typename OTHERVECTOR1 , typename OTHERVECTOR2 >
void mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::multiply_Atb ( const OTHERVECTOR1 &  vIn,
OTHERVECTOR2 &  vOut,
bool  accumToOutput = false 
) const [inline]

Computes the vector vOut = thisT * vIn, where "vIn" is a column vector of the appropriate length.

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
template<typename MAT_C , typename MAT_R >
void mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::multiply_HCHt ( const MAT_C &  C,
MAT_R &  R,
bool  accumResultInOutput = false,
bool  allow_submatrix_mult = false 
) const [inline]

< R = this * C * thisT

See also:
detail::multiply_HCHt

Definition at line 71 of file CMatrixFixedNumeric.h.

Referenced by mrpt::bayes::CKalmanFilterCapable< 7, 3, 3, 7 >::runOneKalmanIteration().

template<typename T, size_t NROWS, size_t NCOLS>
template<typename MAT_C >
T mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::multiply_HCHt_scalar ( const MAT_C &  C  )  const [inline]

R = H * C * HT (with a vector H and a symmetric matrix C) In fact when H is a vector, multiply_HCHt_scalar and multiply_HtCH_scalar are exactly equivalent

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
template<typename MAT_C , typename MAT_R >
void mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::multiply_HtCH ( const MAT_C &  C,
MAT_R &  R,
bool  accumResultInOutput = false,
bool  allow_submatrix_mult = false 
) const [inline]

R = HT * C * H (with a symmetric matrix C)

< R = thisT * C * this

See also:
detail::multiply_HtCH

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
template<typename MAT_C >
T mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::multiply_HtCH_scalar ( const MAT_C &  C  )  const [inline]

R = HT * C * H (with a vector H and a symmetric matrix C) In fact when H is a vector, multiply_HCHt_scalar and multiply_HtCH_scalar are exactly equivalent

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
template<class MAT_A , class MAT_B >
void mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::multiply_result_is_symmetric ( const MAT_A &  A,
const MAT_B &  B 
) [inline]
Parameters:
B this = A * B (result is symmetric)

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
template<class MAT_A , class MAT_OUT >
void mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::multiply_subMatrix ( const MAT_A &  A,
MAT_OUT &  outResult,
const size_t  A_cols_offset,
const size_t  A_rows_offset,
const size_t  A_col_count 
) const [inline]

< outResult = this * A

Definition at line 71 of file CMatrixFixedNumeric.h.

Referenced by mrpt::bayes::CKalmanFilterCapable< 7, 3, 3, 7 >::runOneKalmanIteration().

template<typename T, size_t NROWS, size_t NCOLS>
T mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::norm (  )  const [inline]

Return the norm of the container (for matrices, as if it were a vector with all its elements).

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
T mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::norm_inf ( size_t *  maxIndex = NULL  )  const [inline]

Compute the norm-infinite of a vector ($f[ ||{v}||_ $f]), ie the maximum absolute value of the elements.

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
void mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::normalize ( const T  min_val = 0,
const T  max_val = 1 
) [inline]
Parameters:
max_val Normalize all the elements such as they are in the given range

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
template<typename OTHERMATRIX >
OTHERMATRIX ::template mrpt_matrix_tag_templ<void>::void_type mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::operator*= ( const OTHERMATRIX &  m  )  [inline]

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
mrpt_autotype& mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::operator*= ( const T  n  )  [inline]
Parameters:
n Multiply by scalar

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
mrpt_autotype mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::operator+ (  )  [inline]

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
mrpt_autotype& mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::operator+= ( const T  n  )  [inline]
Parameters:
n Sum a scalar

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
mrpt_autotype mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::operator- (  )  const [inline]

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
mrpt_autotype& mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::operator-= ( const T  n  )  [inline]
Parameters:
n Substract a scalar

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
mrpt_autotype& mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::operator/= ( const T  n  )  [inline]
Parameters:
n Divide by scalar

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
mrpt_autotype& mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::operator= ( const mrpt::poses::CPoint3D &  p  )  [inline]

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
mrpt_autotype& mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::operator= ( const mrpt::poses::CPoint2D &  p  )  [inline]

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
mrpt_autotype& mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::operator= ( const mrpt::poses::CPose3DQuat &  p  )  [inline]

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
mrpt_autotype& mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::operator= ( const mrpt::poses::CPose3D &  p  )  [inline]

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
mrpt_autotype& mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::operator= ( const mrpt::poses::CPose2D &  p  )  [inline]

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
mrpt_autotype& mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::operator= ( const TPoint3D &  p  )  [inline]

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
mrpt_autotype& mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::operator= ( const TPoint2D &  p  )  [inline]

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
mrpt_autotype& mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::operator= ( const TPose3DQuat &  p  )  [inline]

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
mrpt_autotype& mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::operator= ( const TPose3D &  p  )  [inline]

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
mrpt_autotype& mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::operator= ( const TPose2D &  p  )  [inline]

Assignment of a matrix from any other kind of matrix

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
int mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::pivot ( const size_t  row  )  [inline]

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
template<class MAT_OUT >
MAT_OUT mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::pseudoInverse (  )  const [inline]

< Pseudo inverse of this matrix M: return (MT * M)^-1 * MT. Invoke with template argument for desired return matrix type: m.pseudoInverse<CMatrixDouble>()

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
template<class MAT_OUT >
void mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::pseudoInverse ( MAT_OUT &  out  )  const [inline]

< Pseudo inverse of this matrix M: out = (MT * M)^-1 * MT

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
size_t mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::rank ( T  eps = 1e-7  )  const [inline]

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
const_reverse_iterator mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::rbegin (  )  const [inline]

Definition at line 88 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
reverse_iterator mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::rbegin (  )  [inline]

Definition at line 86 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
const_reverse_iterator mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::rend (  )  const [inline]

Definition at line 89 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
reverse_iterator mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::rend (  )  [inline]

Definition at line 87 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
template<class MAT2 , class MAT3 >
void mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::rightDivideSquare ( const MAT2 &  B,
MAT3 &  RES 
) const [inline]

Matrix right divide: RES = this &#183; B-1 (B must be a square matrix).

See also:
leftDivideSquare,fastRightDivideSquare

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
void mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::saveToTextFile ( const std::string &  file,
mrpt::math::TMatrixTextFileFormat  fileFormat = MATRIX_FORMAT_ENG,
bool  appendMRPTHeader = false,
const std::string &  userHeader = std::string("") 
) const [inline]

Save matrix to a text file, compatible with MATLAB text format.

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
void mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::setIdentity ( size_t  N  )  [inline]

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
void mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::setIdentity (  )  [inline]

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
mrpt_autotype& mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::Sqrt (  )  [inline]

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
mrpt_autotype& mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::Square (  )  [inline]

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
T mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::squareNorm (  )  const [inline]

Return the square norm of the container (for matrices, as if it were a vector with all its elements).

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
double mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::std ( bool  unbiased = true  )  const [inline]

Return the standard deviation of all the elements in the container.

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
template<typename OTHERMATRIX >
mrpt_autotype& mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::substract_AAt ( const OTHERMATRIX &  m  )  [inline]

this -= A + AT

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
template<typename OTHERMATRIX >
mrpt_autotype& mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::substract_Ac ( const OTHERMATRIX &  m,
const T  c 
) [inline]

Substract c (scalar) times A to this matrix: this -= A * c

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
template<typename OTHERMATRIX >
mrpt_autotype& mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::substract_An ( const OTHERMATRIX &  m,
const size_t  n 
) [inline]

Substract n (integer) times A to this matrix: this -= A * n

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
template<typename OTHERMATRIX >
mrpt_autotype& mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::substract_At ( const OTHERMATRIX &  m  )  [inline]

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
T mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::sumAll (  )  const [inline]

Sum all the elements, returning a value of the same type than the container

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
template<typename RET_TYPE >
RET_TYPE mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::sumAllRetType (  )  const [inline]

Sum all the elements, returning a value of a custom type (this could be used to avoid overflow with containers of integers)

Definition at line 71 of file CMatrixFixedNumeric.h.

template<typename T, size_t NROWS, size_t NCOLS>
T mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::trace (  )  const [inline]

The trace of this square matrix

Definition at line 71 of file CMatrixFixedNumeric.h.


Member Data Documentation

template<typename T, size_t NROWS, size_t NCOLS>
array_type mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::m_Val

The stored data of the matrix: elements are saved by rows, left to right, from top to bottom.

(We use a CArray wrapper instead of a plain array so it handles the cases of 0-length arrays without problems.)

Definition at line 98 of file CMatrixFixedNumeric.h.

Referenced by mrpt::math::CMatrixFixedNumeric< float, 4, 4 >::begin(), mrpt::math::CMatrixFixedNumeric< float, 4, 4 >::CMatrixFixedNumeric(), mrpt::math::CMatrixFixedNumeric< float, 4, 4 >::end(), mrpt::math::CMatrixFixedNumeric< float, 4, 4 >::rbegin(), and mrpt::math::CMatrixFixedNumeric< float, 4, 4 >::rend().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines



Page generated by Doxygen 1.6.2-20100208 for MRPT 0.9.0 SVN: at Sun Jun 6 22:48:24 UTC 2010