Main MRPT website > C++ reference
MRPT logo
Public Types | Public Member Functions
mrpt::math::CMatrixFixedNumeric Class Reference

Detailed Description

A numeric matrix of compile-time fixed size.

Basically, this class is a wrapper on Eigen::Matrix<T,NROWS,NCOLS>, but with a RowMajor element memory layout (except for column vectors).

These matrices also have 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:
This class exists for backward compatibility of ancient times when MRPT didn't rely on Eigen, feel free to directly use Eigen::Matrix<> types instead.
See also:
CMatrixTemplateNumeric (for dynamic-size matrices)
Note:
For a complete introduction to Matrices and vectors in MRPT, see: http://www.mrpt.org/Matrices_vectors_arrays_and_Linear_Algebra_MRPT_and_Eigen_classes

#include <mrpt/math/CMatrixFixedNumeric.h>

Inheritance diagram for mrpt::math::CMatrixFixedNumeric:
Inheritance graph
[legend]

List of all members.

Public Types

typedef Eigen::Matrix< T,
NROWS, NCOLS, Eigen::AutoAlign|((NCOLS==1
&&NROWS!=1)?Eigen::ColMajor:Eigen::RowMajor) > 
Base
 Base class typedef.
typedef CMatrixFixedNumeric< T,
NROWS, NCOLS > 
mrpt_autotype

Public Member Functions

 MRPT_EIGEN_DERIVED_CLASS_CTOR_OPERATOR_EQUAL (CMatrixFixedNumeric) inline CMatrixFixedNumeric()
 Default constructor, initializes all elements to zero.
 CMatrixFixedNumeric (const T *vals)
 Constructor from an array in row major.
 CMatrixFixedNumeric (TConstructorFlags_Matrices constructor_flag)
 Constructor which leaves the matrix uninitialized.
template<size_t N, typename ReturnType >
ReturnType getVicinity (size_t c, size_t r) const
void loadFromArray (const T *vals)
template<typename Derived >
bool operator== (const Eigen::MatrixBase< Derived > &m2) const
 == comparison of two matrices; it differs from default Eigen operator in that returns false if matrices are of different sizes instead of raising an assert.
template<typename Derived >
bool operator!= (const Eigen::MatrixBase< Derived > &m2) const
 != comparison of two matrices; it differs from default Eigen operator in that returns true if matrices are of different sizes instead of raising an assert.

Member Typedef Documentation

typedef Eigen::Matrix<T,NROWS,NCOLS, Eigen::AutoAlign | ( (NCOLS==1 && NROWS!=1) ? Eigen::ColMajor : Eigen::RowMajor ) > mrpt::math::CMatrixFixedNumeric::Base

Base class typedef.

See also:
PlainObjectBase

Reimplemented from Eigen::Matrix.

Definition at line 65 of file CMatrixFixedNumeric.h.

Definition at line 66 of file CMatrixFixedNumeric.h.


Constructor & Destructor Documentation

mrpt::math::CMatrixFixedNumeric::CMatrixFixedNumeric ( const T *  vals) [inline]

Constructor from an array in row major.

Definition at line 75 of file CMatrixFixedNumeric.h.

mrpt::math::CMatrixFixedNumeric::CMatrixFixedNumeric ( TConstructorFlags_Matrices  constructor_flag) [inline]

Constructor which leaves the matrix uninitialized.

Example of usage: CMatrixFixedNumeric<double,3,2> M(UNINITIALIZED_MATRIX);

Definition at line 80 of file CMatrixFixedNumeric.h.


Member Function Documentation

template<size_t N, typename ReturnType >
ReturnType mrpt::math::CMatrixFixedNumeric::getVicinity ( size_t  c,
size_t  r 
) const [inline]

Definition at line 82 of file CMatrixFixedNumeric.h.

void mrpt::math::CMatrixFixedNumeric::loadFromArray ( const T *  vals) [inline]

Definition at line 86 of file CMatrixFixedNumeric.h.

mrpt::math::CMatrixFixedNumeric::MRPT_EIGEN_DERIVED_CLASS_CTOR_OPERATOR_EQUAL ( CMatrixFixedNumeric  ) [inline]

Default constructor, initializes all elements to zero.

Definition at line 68 of file CMatrixFixedNumeric.h.

template<typename Derived >
bool mrpt::math::CMatrixFixedNumeric::operator!= ( const Eigen::MatrixBase< Derived > &  m2) const [inline]

!= comparison of two matrices; it differs from default Eigen operator in that returns true if matrices are of different sizes instead of raising an assert.

Definition at line 102 of file CMatrixFixedNumeric.h.

template<typename Derived >
bool mrpt::math::CMatrixFixedNumeric::operator== ( const Eigen::MatrixBase< Derived > &  m2) const [inline]

== comparison of two matrices; it differs from default Eigen operator in that returns false if matrices are of different sizes instead of raising an assert.

Definition at line 94 of file CMatrixFixedNumeric.h.




Page generated by Doxygen 1.7.5 for MRPT 0.9.5 SVN: at Sun Oct 16 12:16:33 UTC 2011