22 #ifndef _vctFixedSizeMatrix_h
23 #define _vctFixedSizeMatrix_h
51 template<
class _elementType, vct::
size_type _rows, vct::
size_type _cols,
bool _rowMajor>
53 <_rows, _cols, _rowMajor?_cols:1, _rowMajor?1:_rows, _elementType,
54 typename vctFixedSizeMatrixTraits<_elementType, _rows, _cols, _rowMajor?_cols:1, _rowMajor?1:_rows>::array >
66 _rowMajor?_cols:1, _rowMajor?1:_rows>::array >
105 (*this).at(0) = element0;
106 (*this).at(1) = element1;
108 const size_type numElements = this->size();
110 va_start(nextArg, element1);
111 for (; elementIndex < numElements; ++elementIndex) {
122 template <
class __elementType, str
ide_type __rowStr
ide, str
ide_type __colStr
ide,
class __dataPtrType>
137 template <
class __matrixOwnerType>
143 template <str
ide_type __rowStr
ide, str
ide_type __colStr
ide,
class __elementType,
class __dataPtrType>
154 template <str
ide_type __rowStr
ide, str
ide_type __colStr
ide>
160 template <str
ide_type __rowStr
ide, str
ide_type __colStr
ide,
class __elementType>
191 result.
SumOf(matrix1, matrix2);
215 template <vct::
size_type _rows, vct::
size_type _cols, vct::str
ide_type _rowStr
ide, vct::str
ide_type _colStr
ide,
class _elementType,
class _dataPtrType>
218 const _elementType & scalar)
221 result.
SumOf(matrix, scalar);
226 template <vct::
size_type _rows, vct::
size_type _cols, vct::str
ide_type _rowStr
ide, vct::str
ide_type _colStr
ide,
class _elementType,
class _dataPtrType>
229 const _elementType & scalar)
237 template <vct::
size_type _rows, vct::
size_type _cols, vct::str
ide_type _rowStr
ide, vct::str
ide_type _colStr
ide,
class _elementType,
class _dataPtrType>
240 const _elementType & scalar)
248 template <vct::
size_type _rows, vct::
size_type _cols, vct::str
ide_type _rowStr
ide, vct::str
ide_type _colStr
ide,
class _elementType,
class _dataPtrType>
251 const _elementType & scalar)
254 result.
RatioOf(matrix, scalar);
266 template <vct::
size_type _rows, vct::
size_type _cols, vct::str
ide_type _rowStr
ide, vct::str
ide_type _colStr
ide,
class _elementType,
class _dataPtrType>
272 result.
SumOf(scalar, matrix);
277 template <vct::
size_type _rows, vct::
size_type _cols, vct::str
ide_type _rowStr
ide, vct::str
ide_type _colStr
ide,
class _elementType,
class _dataPtrType>
288 template <vct::
size_type _rows, vct::
size_type _cols, vct::str
ide_type _rowStr
ide, vct::str
ide_type _colStr
ide,
class _elementType,
class _dataPtrType>
299 template <vct::
size_type _rows, vct::
size_type _cols, vct::str
ide_type _rowStr
ide, vct::str
ide_type _colStr
ide,
class _elementType,
class _dataPtrType>
305 result.
RatioOf(scalar, matrix);
318 template <vct::
size_type _rows, vct::
size_type _cols, vct::str
ide_type _rowStr
ide, vct::str
ide_type _colStr
ide,
class _elementType,
class _dataPtrType>
337 result.
ProductOf(input1Matrix, input2Matrix);
351 result.
ProductOf(inputMatrix, inputVector);
365 result.
ProductOf(inputVector, inputMatrix);
376 template <vct::
size_type _rows, vct::
size_type _cols, vct::str
ide_type _rowStr
ide, vct::str
ide_type _colStr
ide,
class _elementType,
class _dataPtrType>
379 MatrixValueType result;
387 template <vct::
size_type _rows, vct::
size_type _cols, vct::str
ide_type _rowStr
ide, vct::str
ide_type _colStr
ide,
class _elementType,
class _dataPtrType>
390 MatrixValueType result;
398 template <vct::
size_type _rows, vct::
size_type _cols, vct::str
ide_type _rowStr
ide, vct::str
ide_type _colStr
ide,
class _elementType,
class _dataPtrType>
401 MatrixValueType result;
409 template <vct::
size_type _rows, vct::
size_type _cols, vct::str
ide_type _rowStr
ide, vct::str
ide_type _colStr
ide,
class _elementType,
class _dataPtrType>
412 MatrixValueType result;
420 template <vct::
size_type _rows, vct::
size_type _cols, vct::str
ide_type _rowStr
ide, vct::str
ide_type _colStr
ide,
class _elementType,
class _dataPtrType>
423 static MatrixValueType result(_elementType(0));
424 #if (CISST_COMPILER == CISST_GCC) || (CISST_COMPILER == CISST_CLANG)
425 result.Diagonal().SetAll(_elementType(1));
427 static _elementType value(result.Diagonal().SetAll(_elementType(1)));
437 class _elementOperationType>
440 _elementType, _dataPtrType> & matrix1,
442 _elementType, __dataPtrType> & matrix2) {
453 class _elementOperationType>
456 _elementType, _dataPtrType> & matrix,
457 const _elementType & scalar) {
466 #endif // _vctFixedSizeMatrix_h
size_t index_type
Definition: vctContainerTraits.h:36
A template for a fixed size matrix with fixed spacing in memory.
Definition: vctFixedSizeConstMatrixBase.h:103
vctFixedSizeMatrix()
Definition: vctFixedSizeMatrix.h:79
Declaration of vctFixedSizeConstMatrixRef.
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:439
#define CMN_ASSERT(expr)
Definition: cmnAssert.h:90
static const MatrixValueType & Eye(void)
Definition: vctFixedSizeMatrix.h:422
vctFixedSizeMatrix< _elementType, _rows, _cols > operator*(const vctFixedSizeConstMatrixBase< _rows, _cols, _rowStride, _colStride, _elementType, _dataPtrType > &matrix, const _elementType &scalar)
Definition: vctFixedSizeMatrix.h:239
vctFixedSizeMatrix< _elementType, _rows, _cols, _rowMajor > ThisType
Definition: vctFixedSizeMatrix.h:68
ThisType & Assign(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, __elementType, __dataPtrType > &other)
Definition: vctFixedSizeMatrixBase.h:475
static void Run(_outputMatrixType &outputMatrix, const _input1MatrixType &input1Matrix, const _input2MatrixType &input2Matrix)
Definition: vctFixedSizeMatrixLoopEngines.h:81
ThisType & ProductOf(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &matrix, const value_type scalar)
Definition: vctFixedSizeMatrixBase.h:909
value_type SetAll(const value_type value)
Definition: vctFixedSizeMatrixBase.h:421
Definition: vctFixedSizeMatrixLoopEngines.h:137
size_t size_type
Definition: vctContainerTraits.h:35
Declaration of vctFixedSizeMatrixRef.
Definition: vctFixedStrideMatrixIterator.h:361
ThisType & NegationOf(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &otherMatrix)
Definition: vctFixedSizeMatrixBase.h:1159
Matrix iterator.
Definition: vctFixedStrideMatrixIterator.h:90
Definition: vctDynamicConstMatrixBase.h:77
Implementation of a fixed-size vector using template metaprogramming.
Definition: vctFixedSizeVector.h:52
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:67
vctFixedSizeMatrix(const vctDynamicConstMatrixBase< __matrixOwnerType, value_type > &matrix)
Definition: vctFixedSizeMatrix.h:138
vctFixedSizeMatrix(const value_type element0, const value_type element1,...)
Definition: vctFixedSizeMatrix.h:102
MatrixValueType Negation(void) const
Definition: vctFixedSizeMatrix.h:389
TypeTraits::VaArgPromotion ElementVaArgPromotion
Definition: vctFixedSizeMatrix.h:76
VCT_CONTAINER_TRAITS_TYPEDEFS(_elementType)
vctFixedSizeMatrixTraits< _elementType, _rows, _cols, _rowMajor?_cols:1, _rowMajor?1:_rows > MatrixTraits
Definition: vctFixedSizeMatrix.h:61
MatrixValueType Floor(void) const
Definition: vctFixedSizeMatrix.h:400
A template for a fixed size matrix with fixed spacings in memory.
Definition: vctFixedSizeMatrixBase.h:58
class cmnTypeTraits< value_type > TypeTraits
Definition: vctFixedSizeMatrix.h:75
MatrixValueType Abs(void) const
Definition: vctFixedSizeMatrix.h:378
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:200
vctFixedSizeMatrix< _elementType, _rows, _cols > operator/(const vctFixedSizeConstMatrixBase< _rows, _cols, _rowStride, _colStride, _elementType, _dataPtrType > &matrix, const _elementType &scalar)
Definition: vctFixedSizeMatrix.h:250
MatrixTraits::iterator iterator
Definition: vctFixedSizeMatrix.h:70
MatrixValueType Ceil(void) const
Definition: vctFixedSizeMatrix.h:411
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:188
MatrixTraits::reverse_iterator reverse_iterator
Definition: vctFixedSizeMatrix.h:72
Implementation of a fixed-size matrix using template metaprogramming.
Definition: vctFixedSizeMatrix.h:52
MatrixTraits::const_reverse_iterator const_reverse_iterator
Definition: vctFixedSizeMatrix.h:73
ThisType & operator=(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, __elementType, __dataPtrType > &other)
Definition: vctFixedSizeMatrix.h:144
vctFixedSizeMatrix< bool, _rows, _cols > vctFixedSizeMatrixElementwiseCompareScalar(const vctFixedSizeConstMatrixBase< _rows, _cols, _rowStride, _colStride, _elementType, _dataPtrType > &matrix, const _elementType &scalar)
Definition: vctFixedSizeMatrix.h:455
ptrdiff_t stride_type
Definition: vctContainerTraits.h:37
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
MatrixTraits::const_iterator const_iterator
Definition: vctFixedSizeMatrix.h:71
ThisType & RatioOf(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &matrix, const value_type scalar)
Definition: vctFixedSizeMatrixBase.h:919
An implementation of the ``abstract'' vctFixedSizeConstMatrixBase.
Definition: vctFixedSizeConstMatrixRef.h:50
A template for a fixed length vector with fixed spacing in memory.
Definition: vctFixedSizeConstVectorBase.h:107
vctFixedSizeMatrix(const value_type &value)
Definition: vctFixedSizeMatrix.h:85
A collection of useful information about the C++ basic types, represented in a generic programming wa...
Definition: cmnTypeTraits.h:155
vctFixedSizeMatrix(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, __elementType, __dataPtrType > &matrix)
Definition: vctFixedSizeMatrix.h:124
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
Define common container related types based on the properties of a fixed size container.
Definition: vctFixedSizeMatrixTraits.h:46
static void Run(_outputMatrixType &outputMatrix, const _inputMatrixType &inputMatrix, const _inputScalarType inputScalar)
Definition: vctFixedSizeMatrixLoopEngines.h:270
ThisType & ProductOf(const vctFixedSizeConstVectorBase< _size, __stride, value_type, __dataPtrType > &vector, const value_type scalar)
Definition: vctFixedSizeVectorBase.h:1003