ERC CISST - cisst software

vctFixedSizeMatrix< _elementType, _rows, _cols, _rowMajor > Class Template Reference
[Vectors]

#include <vctFixedSizeMatrix.h>

Inheritance diagram for vctFixedSizeMatrix< _elementType, _rows, _cols, _rowMajor >:

Inheritance graph
[legend]
Collaboration diagram for vctFixedSizeMatrix< _elementType, _rows, _cols, _rowMajor >:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<class _elementType, vct::size_type _rows, vct::size_type _cols, bool _rowMajor>
class vctFixedSizeMatrix< _elementType, _rows, _cols, _rowMajor >

Implementation of a fixed-size matrix using template metaprogramming.

The matrix type is stored as a contiguous array of a fixed size (stack allocation). It provides methods for operations which are implemented using template metaprogramming. See vctFixedSizeConstMatrixBase and vctFixedSizeMatrixBase for more implementation details.

Parameters:
_elementType the type of an element in the matrix
_rows the number of rows of the matrix
_cols the number of columns of the matrix
_rowMajor the storage order, either VCT_ROW_MAJOR (default) or VCT_COL_MAJOR.

Definition at line 53 of file vctFixedSizeMatrix.h.

Public Types

Public Member Functions

Public Attributes


Member Typedef Documentation

template<class _elementType, vct::size_type _rows, vct::size_type _cols, bool _rowMajor>
typedef vctFixedSizeMatrixTraits<_elementType, _rows, _cols, _rowMajor?_cols:1, _rowMajor?1:_rows> vctFixedSizeMatrix< _elementType, _rows, _cols, _rowMajor >::MatrixTraits

Traits used for all useful types related to a vctFixedSizeMatrix

Reimplemented from vctFixedSizeMatrixBase< _rows, _cols, _rowMajor?_cols:1, _rowMajor?1:_rows, _elementType, vctFixedSizeMatrixTraits< _elementType, _rows, _cols, _rowMajor?_cols:1, _rowMajor?1:_rows >::array >.

Definition at line 62 of file vctFixedSizeMatrix.h.

template<class _elementType, vct::size_type _rows, vct::size_type _cols, bool _rowMajor>
typedef vctFixedSizeMatrixBase<_rows, _cols, _rowMajor?_cols:1, _rowMajor?1:_rows, _elementType, typename vctFixedSizeMatrixTraits<_elementType, _rows, _cols, _rowMajor?_cols:1, _rowMajor?1:_rows>::array > vctFixedSizeMatrix< _elementType, _rows, _cols, _rowMajor >::BaseType

Type of the base class

Reimplemented from vctFixedSizeMatrixBase< _rows, _cols, _rowMajor?_cols:1, _rowMajor?1:_rows, _elementType, vctFixedSizeMatrixTraits< _elementType, _rows, _cols, _rowMajor?_cols:1, _rowMajor?1:_rows >::array >.

Reimplemented in vctFrame4x4< _elementType, _rowMajor >, vctMatrixRotation2< _elementType >, vctMatrixRotation3< _elementType, _rowMajor >, vctFrame4x4< double >, vctFrame4x4Base< vctFixedSizeMatrix< double, 4, 4, _rowMajor > >, vctFrame4x4Base< vctFixedSizeMatrix< _elementType, 4, 4, _rowMajor > >, vctFrame4x4ConstBase< vctFixedSizeMatrix< double, 4, 4, _rowMajor > >, vctFrame4x4ConstBase< vctFixedSizeMatrix< _elementType, 4, 4, _rowMajor > >, vctMatrixRotation2Base< vctFixedSizeMatrix< _elementType, 2, 2 > >, vctMatrixRotation3< double >, vctMatrixRotation3Base< vctFixedSizeMatrix< _elementType, 3, 3, _rowMajor > >, vctMatrixRotation3Base< vctFixedSizeMatrix< double, 3, 3, _rowMajor > >, vctMatrixRotation3ConstBase< vctFixedSizeMatrix< _elementType, 3, 3, _rowMajor > >, and vctMatrixRotation3ConstBase< vctFixedSizeMatrix< double, 3, 3, _rowMajor > >.

Definition at line 68 of file vctFixedSizeMatrix.h.

template<class _elementType, vct::size_type _rows, vct::size_type _cols, bool _rowMajor>
typedef vctFixedSizeMatrix<_elementType, _rows, _cols, _rowMajor> vctFixedSizeMatrix< _elementType, _rows, _cols, _rowMajor >::ThisType

Type of the matrix itself.

Reimplemented from vctFixedSizeMatrixBase< _rows, _cols, _rowMajor?_cols:1, _rowMajor?1:_rows, _elementType, vctFixedSizeMatrixTraits< _elementType, _rows, _cols, _rowMajor?_cols:1, _rowMajor?1:_rows >::array >.

Reimplemented in vctFrame4x4< _elementType, _rowMajor >, vctMatrixRotation2< _elementType >, vctMatrixRotation3< _elementType, _rowMajor >, vctFrame4x4< double >, vctFrame4x4Base< vctFixedSizeMatrix< double, 4, 4, _rowMajor > >, vctFrame4x4Base< vctFixedSizeMatrix< _elementType, 4, 4, _rowMajor > >, vctFrame4x4ConstBase< vctFixedSizeMatrix< double, 4, 4, _rowMajor > >, vctFrame4x4ConstBase< vctFixedSizeMatrix< _elementType, 4, 4, _rowMajor > >, vctMatrixRotation2Base< vctFixedSizeMatrix< _elementType, 2, 2 > >, vctMatrixRotation3< double >, vctMatrixRotation3Base< vctFixedSizeMatrix< _elementType, 3, 3, _rowMajor > >, vctMatrixRotation3Base< vctFixedSizeMatrix< double, 3, 3, _rowMajor > >, vctMatrixRotation3ConstBase< vctFixedSizeMatrix< _elementType, 3, 3, _rowMajor > >, and vctMatrixRotation3ConstBase< vctFixedSizeMatrix< double, 3, 3, _rowMajor > >.

Definition at line 69 of file vctFixedSizeMatrix.h.

template<class _elementType, vct::size_type _rows, vct::size_type _cols, bool _rowMajor>
typedef MatrixTraits::iterator vctFixedSizeMatrix< _elementType, _rows, _cols, _rowMajor >::iterator

Iterator on the elements of the matrix.

Reimplemented from vctFixedSizeMatrixBase< _rows, _cols, _rowMajor?_cols:1, _rowMajor?1:_rows, _elementType, vctFixedSizeMatrixTraits< _elementType, _rows, _cols, _rowMajor?_cols:1, _rowMajor?1:_rows >::array >.

Definition at line 71 of file vctFixedSizeMatrix.h.

template<class _elementType, vct::size_type _rows, vct::size_type _cols, bool _rowMajor>
typedef MatrixTraits::const_iterator vctFixedSizeMatrix< _elementType, _rows, _cols, _rowMajor >::const_iterator

Const iterator on the elements of the matrix.

Reimplemented from vctFixedSizeMatrixBase< _rows, _cols, _rowMajor?_cols:1, _rowMajor?1:_rows, _elementType, vctFixedSizeMatrixTraits< _elementType, _rows, _cols, _rowMajor?_cols:1, _rowMajor?1:_rows >::array >.

Definition at line 72 of file vctFixedSizeMatrix.h.

template<class _elementType, vct::size_type _rows, vct::size_type _cols, bool _rowMajor>
typedef MatrixTraits::reverse_iterator vctFixedSizeMatrix< _elementType, _rows, _cols, _rowMajor >::reverse_iterator

Reverse iterator on the elements of the matrix.

Reimplemented from vctFixedSizeMatrixBase< _rows, _cols, _rowMajor?_cols:1, _rowMajor?1:_rows, _elementType, vctFixedSizeMatrixTraits< _elementType, _rows, _cols, _rowMajor?_cols:1, _rowMajor?1:_rows >::array >.

Definition at line 73 of file vctFixedSizeMatrix.h.

template<class _elementType, vct::size_type _rows, vct::size_type _cols, bool _rowMajor>
typedef MatrixTraits::const_reverse_iterator vctFixedSizeMatrix< _elementType, _rows, _cols, _rowMajor >::const_reverse_iterator

Const reverse iterator on the elements of the matrix.

Reimplemented from vctFixedSizeMatrixBase< _rows, _cols, _rowMajor?_cols:1, _rowMajor?1:_rows, _elementType, vctFixedSizeMatrixTraits< _elementType, _rows, _cols, _rowMajor?_cols:1, _rowMajor?1:_rows >::array >.

Definition at line 74 of file vctFixedSizeMatrix.h.


Constructor & Destructor Documentation

template<class _elementType, vct::size_type _rows, vct::size_type _cols, bool _rowMajor>
vctFixedSizeMatrix< _elementType, _rows, _cols, _rowMajor >::vctFixedSizeMatrix (  )  [inline]

Default constructor. Do nothing.

Definition at line 80 of file vctFixedSizeMatrix.h.

template<class _elementType, vct::size_type _rows, vct::size_type _cols, bool _rowMajor>
vctFixedSizeMatrix< _elementType, _rows, _cols, _rowMajor >::vctFixedSizeMatrix ( const value_type &  value  )  [inline, explicit]

Initialize all the elements to the given value.

Parameters:
value the value used to set all the elements of the matrix

Definition at line 86 of file vctFixedSizeMatrix.h.

template<class _elementType, vct::size_type _rows, vct::size_type _cols, bool _rowMajor>
vctFixedSizeMatrix< _elementType, _rows, _cols, _rowMajor >::vctFixedSizeMatrix ( const value_type  element0,
const value_type  element1,
  ... 
) [inline]

Initialize the elements of the matrix with a set of given values. The assignment is done by the order of the iterators, that is, row by row from the low column to the high column in each row.

Note:
This constructor doesn't check that the correct number of elements have been provided. Use with caution.

Since this method relies on the standard va_arg, the parameters must be correctly casted. E.g, 3.14 will be treated as a double while 3.14f will be treated as a float and 3 will be handled like an integer.

Definition at line 103 of file vctFixedSizeMatrix.h.

template<class _elementType, vct::size_type _rows, vct::size_type _cols, bool _rowMajor>
template<class __elementType, stride_type __rowStride, stride_type __colStride, class __dataPtrType>
vctFixedSizeMatrix< _elementType, _rows, _cols, _rowMajor >::vctFixedSizeMatrix ( const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, __elementType, __dataPtrType > &  matrix  )  [inline, explicit]

Initialize the elements of this matrix with values from another matrix. The other matrix can include elements of any type, which will be converted using standard conversion to elements of this matrix.

Definition at line 125 of file vctFixedSizeMatrix.h.

template<class _elementType, vct::size_type _rows, vct::size_type _cols, bool _rowMajor>
template<class __matrixOwnerType>
vctFixedSizeMatrix< _elementType, _rows, _cols, _rowMajor >::vctFixedSizeMatrix ( const vctDynamicConstMatrixBase< __matrixOwnerType, value_type > &  matrix  )  [inline]

Initialize the matrix from a dynamic matrix with elements of the same type.

Note:
Since the size of the dynamic matrix might not match the size of the fixed size one, this constructor can throw an exception.
See also:
Corresponding Assign()

Definition at line 139 of file vctFixedSizeMatrix.h.


Member Function Documentation

template<class _elementType, vct::size_type _rows, vct::size_type _cols, bool _rowMajor>
ThisType& vctFixedSizeMatrix< _elementType, _rows, _cols, _rowMajor >::operator= ( const value_type &  value  )  [inline]

Assignement of a scalar to all elements. See also SetAll.

Definition at line 169 of file vctFixedSizeMatrix.h.


The documentation for this class was generated from the following file:
erc-cisst-devel<at>lists.johnshopkins.edu