21#ifndef _vctFixedSizeMatrix_h
22#define _vctFixedSizeMatrix_h
50template<
class _elementType, vct::
size_type _rows, vct::
size_type _cols,
bool _rowMajor>
52<_rows, _cols, _rowMajor?_cols:1, _rowMajor?1:_rows, _elementType,
53 typename vctFixedSizeMatrixTraits<_elementType, _rows, _cols, _rowMajor?_cols:1, _rowMajor?1:_rows>::array >
65 _rowMajor?_cols:1, _rowMajor?1:_rows>::array >
108 (*this).at(0) = element0;
109 (*this).at(1) = element1;
110 index_type elementIndex = 2;
111 const size_type numElements = this->
size();
113 va_start(nextArg, element1);
114 for (; elementIndex < numElements; ++elementIndex) {
125 template <
class __elementType, str
ide_type __rowStr
ide, str
ide_type __colStr
ide,
class __dataPtrType>
140 template <
class __matrixOwnerType>
146 template <str
ide_type __rowStr
ide, str
ide_type __colStr
ide,
class __elementType,
class __dataPtrType>
157 template <str
ide_type __rowStr
ide, str
ide_type __colStr
ide>
163 template <str
ide_type __rowStr
ide, str
ide_type __colStr
ide,
class __elementType>
194 result.
SumOf(matrix1, matrix2);
218template <vct::
size_type _rows, vct::
size_type _cols, vct::str
ide_type _rowStr
ide, vct::str
ide_type _colStr
ide,
class _elementType,
class _dataPtrType>
221 const _elementType & scalar)
224 result.
SumOf(matrix, scalar);
229template <vct::
size_type _rows, vct::
size_type _cols, vct::str
ide_type _rowStr
ide, vct::str
ide_type _colStr
ide,
class _elementType,
class _dataPtrType>
232 const _elementType & scalar)
240template <vct::
size_type _rows, vct::
size_type _cols, vct::str
ide_type _rowStr
ide, vct::str
ide_type _colStr
ide,
class _elementType,
class _dataPtrType>
243 const _elementType & scalar)
251template <vct::
size_type _rows, vct::
size_type _cols, vct::str
ide_type _rowStr
ide, vct::str
ide_type _colStr
ide,
class _elementType,
class _dataPtrType>
254 const _elementType & scalar)
257 result.
RatioOf(matrix, scalar);
269template <vct::
size_type _rows, vct::
size_type _cols, vct::str
ide_type _rowStr
ide, vct::str
ide_type _colStr
ide,
class _elementType,
class _dataPtrType>
275 result.
SumOf(scalar, matrix);
280template <vct::
size_type _rows, vct::
size_type _cols, vct::str
ide_type _rowStr
ide, vct::str
ide_type _colStr
ide,
class _elementType,
class _dataPtrType>
291template <vct::
size_type _rows, vct::
size_type _cols, vct::str
ide_type _rowStr
ide, vct::str
ide_type _colStr
ide,
class _elementType,
class _dataPtrType>
302template <vct::
size_type _rows, vct::
size_type _cols, vct::str
ide_type _rowStr
ide, vct::str
ide_type _colStr
ide,
class _elementType,
class _dataPtrType>
308 result.
RatioOf(scalar, matrix);
321template <vct::
size_type _rows, vct::
size_type _cols, vct::str
ide_type _rowStr
ide, vct::str
ide_type _colStr
ide,
class _elementType,
class _dataPtrType>
340 result.
ProductOf(input1Matrix, input2Matrix);
354 result.
ProductOf(inputMatrix, inputVector);
368 result.
ProductOf(inputVector, inputMatrix);
379template <vct::
size_type _rows, vct::
size_type _cols, vct::str
ide_type _rowStr
ide, vct::str
ide_type _colStr
ide,
class _elementType,
class _dataPtrType>
383 vctFixedSizeMatrixLoopEngines::
384 MoMi<typename vctUnaryOperations<_elementType>::AbsValue>::
390template <vct::
size_type _rows, vct::
size_type _cols, vct::str
ide_type _rowStr
ide, vct::str
ide_type _colStr
ide,
class _elementType,
class _dataPtrType>
394 vctFixedSizeMatrixLoopEngines::
395 MoMi<typename vctUnaryOperations<_elementType>::Negation>::
401template <vct::
size_type _rows, vct::
size_type _cols, vct::str
ide_type _rowStr
ide, vct::str
ide_type _colStr
ide,
class _elementType,
class _dataPtrType>
405 vctFixedSizeMatrixLoopEngines::
406 MoMi<typename vctUnaryOperations<_elementType>::Floor>::
412template <vct::
size_type _rows, vct::
size_type _cols, vct::str
ide_type _rowStr
ide, vct::str
ide_type _colStr
ide,
class _elementType,
class _dataPtrType>
416 vctFixedSizeMatrixLoopEngines::
417 MoMi<typename vctUnaryOperations<_elementType>::Ceil>::
423template <vct::
size_type _rows, vct::
size_type _cols, vct::str
ide_type _rowStr
ide, vct::str
ide_type _colStr
ide,
class _elementType,
class _dataPtrType>
427#if (CISST_COMPILER == CISST_GCC) || (CISST_COMPILER == CISST_CLANG)
428 result.
Diagonal().SetAll(_elementType(1));
430 static _elementType value(result.
Diagonal().SetAll(_elementType(1)));
440 class _elementOperationType>
443 _elementType, _dataPtrType> & matrix1,
445 _elementType, __dataPtrType> & matrix2) {
456 class _elementOperationType>
459 _elementType, _dataPtrType> & matrix,
460 const _elementType & scalar) {
A collection of useful information about the C++ basic types, represented in a generic programming wa...
Definition cmnTypeTraits.h:155
cmnVaArgPromotion< value_type >::Type VaArgPromotion
Definition cmnTypeTraits.h:167
_elementType value_type
Definition mtsGenericObjectProxy.h:329
Definition vctForwardDeclarations.h:145
A template for a fixed size matrix with fixed spacing in memory.
Definition vctFixedSizeConstMatrixBase.h:104
MatrixValueType Negation(void) const
Definition vctFixedSizeMatrix.h:392
MatrixValueType Abs(void) const
Definition vctFixedSizeMatrix.h:381
vctFixedSizeMatrix< _elementType, ROWS, COLS, COLSTRIDE<=ROWSTRIDE > MatrixValueType
Definition vctFixedSizeConstMatrixBase.h:204
MatrixValueType Ceil(void) const
Definition vctFixedSizeMatrix.h:414
MatrixValueType Floor(void) const
Definition vctFixedSizeMatrix.h:403
static const MatrixValueType & Eye(void)
Definition vctFixedSizeMatrix.h:425
Definition vctForwardDeclarations.h:106
A template for a fixed length vector with fixed spacing in memory.
Definition vctFixedSizeConstVectorBase.h:108
A template for a fixed size matrix with fixed spacings in memory.
Definition vctFixedSizeMatrixBase.h:60
ThisType & DifferenceOf(const vctFixedSizeConstMatrixBase< _rows, _cols, __input1RowStride, __input1ColStride, value_type, __input1DataPtrType > &input1Matrix, const vctFixedSizeConstMatrixBase< _rows, _cols, __input2RowStride, __input2ColStride, value_type, __input2DataPtrType > &input2Matrix)
Definition vctFixedSizeMatrixBase.h:729
ThisType & NegationOf(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &otherMatrix)
Definition vctFixedSizeMatrixBase.h:1159
DiagonalRefType Diagonal(void)
Definition vctFixedSizeMatrixBase.h:254
ThisType & ProductOf(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &matrix, const value_type scalar)
Definition vctFixedSizeMatrixBase.h:909
ThisType & RatioOf(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &matrix, const value_type scalar)
Definition vctFixedSizeMatrixBase.h:919
ThisType & SumOf(const vctFixedSizeConstMatrixBase< _rows, _cols, __input1RowStride, __input1ColStride, value_type, __input1DataPtrType > &input1Matrix, const vctFixedSizeConstMatrixBase< _rows, _cols, __input2RowStride, __input2ColStride, value_type, __input2DataPtrType > &input2Matrix)
Definition vctFixedSizeMatrixBase.h:717
value_type SetAll(const value_type value)
Definition vctFixedSizeMatrixBase.h:421
ThisType & Assign(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, __elementType, __dataPtrType > &other)
Definition vctFixedSizeMatrixBase.h:475
Implementation of a fixed-size matrix using template metaprogramming.
Definition vctFixedSizeMatrix.h:54
MatrixTraits::const_reverse_iterator const_reverse_iterator
Definition vctFixedSizeMatrix.h:72
vctFixedSizeMatrixTraits< _elementType, _rows, _cols, _rowMajor?_cols:1, _rowMajor?1:_rows > MatrixTraits
Definition vctFixedSizeMatrix.h:60
MatrixTraits::iterator iterator
Definition vctFixedSizeMatrix.h:69
vctFixedSizeMatrix< _elementType, _rows, _cols, _rowMajor > ThisType
Definition vctFixedSizeMatrix.h:67
vctFixedSizeMatrix(const vctDynamicConstMatrixBase< __matrixOwnerType, value_type > &matrix)
Definition vctFixedSizeMatrix.h:141
TypeTraits::VaArgPromotion ElementVaArgPromotion
Definition vctFixedSizeMatrix.h:75
MatrixTraits::const_iterator const_iterator
Definition vctFixedSizeMatrix.h:70
VCT_CONTAINER_TRAITS_TYPEDEFS(_elementType)
vctFixedSizeMatrix()
Definition vctFixedSizeMatrix.h:78
vctFixedSizeMatrix(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, __elementType, __dataPtrType > &matrix)
Definition vctFixedSizeMatrix.h:127
vctFixedSizeMatrixBase< _rows, _cols, _rowMajor?_cols:1, _rowMajor?1:_rows, _elementType, typename vctFixedSizeMatrixTraits< _elementType, _rows, _cols, _rowMajor?_cols:1, _rowMajor?1:_rows >::array > BaseType
Definition vctFixedSizeMatrix.h:66
vctFixedSizeMatrix(const ThisType &other)
Definition vctFixedSizeMatrix.h:81
vctFixedSizeMatrix(const value_type &value)
Definition vctFixedSizeMatrix.h:88
ThisType & operator=(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, __elementType, __dataPtrType > &other)
Definition vctFixedSizeMatrix.h:147
vctFixedSizeMatrix(const value_type element0, const value_type element1,...)
Definition vctFixedSizeMatrix.h:105
class cmnTypeTraits< value_type > TypeTraits
Definition vctFixedSizeMatrix.h:74
MatrixTraits::reverse_iterator reverse_iterator
Definition vctFixedSizeMatrix.h:71
static void Run(_outputMatrixType &outputMatrix, const _input1MatrixType &input1Matrix, const _input2MatrixType &input2Matrix)
Definition vctFixedSizeMatrixLoopEngines.h:79
static void Run(_outputMatrixType &outputMatrix, const _inputMatrixType &inputMatrix, const _inputScalarType inputScalar)
Definition vctFixedSizeMatrixLoopEngines.h:268
Define common container related types based on the properties of a fixed size container.
Definition vctFixedSizeMatrixTraits.h:47
vctFixedStrideMatrixConstIterator< _elementType, -_colStride, _cols, -_rowStride > const_reverse_iterator
Definition vctFixedSizeMatrixTraits.h:62
vctFixedStrideMatrixIterator< _elementType, _colStride, _cols, _rowStride > iterator
Definition vctFixedSizeMatrixTraits.h:53
vctFixedStrideMatrixConstIterator< _elementType, _colStride, _cols, _rowStride > const_iterator
Definition vctFixedSizeMatrixTraits.h:56
vctFixedStrideMatrixIterator< _elementType, -_colStride, _cols, -_rowStride > reverse_iterator
Definition vctFixedSizeMatrixTraits.h:59
ThisType & ProductOf(const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &vector, const value_type scalar)
Definition vctFixedSizeVectorBase.h:1003
Implementation of a fixed-size vector using template metaprogramming.
Definition vctFixedSizeVector.h:54
#define CMN_ASSERT(expr)
Definition cmnAssert.h:97
size_t size_type
Definition vctContainerTraits.h:35
ptrdiff_t stride_type
Definition vctContainerTraits.h:37
size_type size(void) const
Definition vctDynamicConstMatrixBase.h:228
vctFixedSizeMatrix< bool, _rows, _cols > vctFixedSizeMatrixElementwiseCompareMatrix(const vctFixedSizeConstMatrixBase< _rows, _cols, _rowStride, _colStride, _elementType, _dataPtrType > &matrix1, const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, _elementType, __dataPtrType > &matrix2)
Definition vctFixedSizeMatrix.h:442
vctFixedSizeMatrix< bool, _rows, _cols > vctFixedSizeMatrixElementwiseCompareScalar(const vctFixedSizeConstMatrixBase< _rows, _cols, _rowStride, _colStride, _elementType, _dataPtrType > &matrix, const _elementType &scalar)
Definition vctFixedSizeMatrix.h:458
Declaration of vctFixedSizeConstMatrixRef.
vctFixedSizeMatrix< _elementType, _rows, _cols > operator/(const vctFixedSizeConstMatrixBase< _rows, _cols, _rowStride, _colStride, _elementType, _dataPtrType > &matrix, const _elementType &scalar)
Definition vctFixedSizeMatrix.h:253
vctFixedSizeMatrix< _elementType, _rows, _cols > operator-(const vctFixedSizeConstMatrixBase< _rows, _cols, _input1RowStride, _input1ColStride, _elementType, _input1Data > &matrix1, const vctFixedSizeConstMatrixBase< _rows, _cols, _input2RowStride, _input2ColStride, _elementType, _input2Data > &matrix2)
Definition vctFixedSizeMatrix.h:203
vctFixedSizeMatrix< _elementType, _rows, _cols > operator*(const vctFixedSizeConstMatrixBase< _rows, _cols, _rowStride, _colStride, _elementType, _dataPtrType > &matrix, const _elementType &scalar)
Definition vctFixedSizeMatrix.h:242
vctFixedSizeMatrix< _elementType, _rows, _cols > operator+(const vctFixedSizeConstMatrixBase< _rows, _cols, _input1RowStride, _input1ColStride, _elementType, _input1Data > &matrix1, const vctFixedSizeConstMatrixBase< _rows, _cols, _input2RowStride, _input2ColStride, _elementType, _input2Data > &matrix2)
Definition vctFixedSizeMatrix.h:191
Declaration of vctFixedSizeMatrixRef.