20#ifndef _vctFixedSizeMatrixRef_h
21#define _vctFixedSizeMatrixRef_h
47 <_rows, _cols,_rowStride, _colStride, _elementType,
48 typename vctFixedSizeMatrixTraits<_elementType, _rows, _cols, _rowStride, _colStride>::pointer>
80 template <
size_type __rows,
size_type __cols,
class __dataPtrType>
89 template <
size_type __rows,
size_type __cols,
class __dataPtrType>
92 & matrix, index_type startRow, index_type startCol )
94 SetRef(matrix, startRow, startCol);
100 template <
class __matrixOwnerType>
102 index_type startRow, index_type startCol)
104 SetRef(matrix, startRow, startCol);
125 template <
size_type __rows,
size_type __cols,
class __dataPtrType>
127 index_type startRow, index_type startCol)
129 if ((startRow + this->
rows() > matrix.
rows()) || (startCol + this->cols() > matrix.
cols())) {
130 cmnThrow(std::out_of_range(
"vctFixedSizeMatrixRef SetRef out of range"));
135 template <
class __dataPtrType>
150 template <
class __matrixOwnerType>
152 index_type startRow, index_type startCol)
154 if ((this->
row_stride() != matrix.row_stride()) || (this->col_stride() == matrix.col_stride())) {
155 cmnThrow(std::runtime_error(
"vctFixedSizeMatrixRef SetRef with incompatible stride(s)"));
157 if ((startRow + this->
rows() > matrix.rows()) || (startCol + this->cols() > matrix.cols())) {
158 cmnThrow(std::out_of_range(
"vctFixedSizeMatrixRef SetRef out of range"));
170 return reinterpret_cast<ThisType &
>(this->Assign(other));
173 template <str
ide_type __rowStr
ide, str
ide_type __colStr
ide>
175 return reinterpret_cast<ThisType &
>(this->Assign(other));
178 template <str
ide_type __rowStr
ide, str
ide_type __colStr
ide,
class __elementType,
class __dataPtrType>
180 return reinterpret_cast<ThisType &
>(this->Assign(other));
183 template <
class __matrixOwnerType>
185 return reinterpret_cast<ThisType &
>(this->Assign(other));
211 _resultElementType, _matrixDataPtrType> & matrix,
215 inputVectorRef(vector.
Pointer());
217 resultRef.ProductOf(matrix, inputVectorRef);
231 _resultElementType, _matrixDataPtrType> & matrix
236 inputVectorRef(vector.
Pointer());
237 vctFixedSizeMatrixRef<_resultElementType, 1, _resultSize, (_resultStride*_resultSize), _resultStride>
239 resultRef.ProductOf(inputVectorRef, matrix);
Definition vctForwardDeclarations.h:145
Definition vctDynamicMatrixBase.h:43
pointer Pointer(size_type rowIndex, size_type colIndex)
Definition vctDynamicMatrixBase.h:143
A template for a fixed size matrix with fixed spacing in memory.
Definition vctFixedSizeConstMatrixBase.h:104
size_type cols() const
Definition vctFixedSizeConstMatrixBase.h:282
size_type rows() const
Definition vctFixedSizeConstMatrixBase.h:277
Definition vctForwardDeclarations.h:106
A template for a fixed length vector with fixed spacing in memory.
Definition vctFixedSizeConstVectorBase.h:108
const_pointer Pointer(size_type index=0) const
Definition vctFixedSizeConstVectorBase.h:268
A template for a fixed size matrix with fixed spacings in memory.
Definition vctFixedSizeMatrixBase.h:60
pointer Pointer(size_type rowIndex, size_type colIndex)
Definition vctFixedSizeMatrixBase.h:161
Definition vctForwardDeclarations.h:110
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
A template for a fixed length vector with fixed spacing in memory.
Definition vctFixedSizeVectorBase.h:77
pointer Pointer(size_type index=0)
Definition vctFixedSizeVectorBase.h:226
void cmnThrow(const _exceptionType &except, cmnLogLevel lod=CMN_LOG_LEVEL_INIT_ERROR)
Definition cmnThrow.h:76
size_t size_type
Definition vctContainerTraits.h:35
ptrdiff_t stride_type
Definition vctContainerTraits.h:37
#define VCT_CONTAINER_TRAITS_TYPEDEFS(type)
Definition vctContainerTraits.h:50
OwnerType::const_iterator const_iterator
Definition vctDynamicConstMatrixBase.h:95
difference_type row_stride() const
Definition vctDynamicConstMatrixBase.h:263
OwnerType::iterator iterator
Definition vctDynamicConstMatrixBase.h:92
size_type rows() const
Definition vctDynamicConstMatrixBase.h:238
OwnerType::const_reverse_iterator const_reverse_iterator
Definition vctDynamicConstMatrixBase.h:101
vctDynamicConstMatrixBase< _matrixOwnerType, _elementType > ThisType
Definition vctDynamicConstMatrixBase.h:86
OwnerType::reverse_iterator reverse_iterator
Definition vctDynamicConstMatrixBase.h:98
ThisType & operator=(const vctDynamicConstMatrixBase< __matrixOwnerType, __elementType > &otherMatrix)
Definition vctDynamicMatrix.h:255
vctDynamicNArrayBase< vctDynamicNArrayOwner< _elementType, _dimension >, _elementType, _dimension > BaseType
Definition vctDynamicNArray.h:133
void SetRef(pointer p)
Definition vctFixedSizeConstMatrixRef.h:114
vctFixedSizeMatrixTraits< _elementType, _rows, _cols, _rowStride, _colStride > MatrixTraits
Definition vctFixedSizeConstMatrixRef.h:59
Declaration of vctFixedSizeMatrixBase.
void MultiplyVectorMatrix(vctFixedSizeVectorBase< _resultSize, _resultStride, _resultElementType, _resultDataPtrType > &result, const vctFixedSizeConstVectorBase< _vectorSize, _vectorStride, _resultElementType, _vectorDataPtrType > &vector, const vctFixedSizeConstMatrixBase< _vectorSize, _resultSize, _matrixRowStride, _matrixColStride, _resultElementType, _matrixDataPtrType > &matrix)
Definition vctFixedSizeMatrixRef.h:227
void MultiplyMatrixVector(vctFixedSizeVectorBase< _resultSize, _resultStride, _resultElementType, _resultDataPtrType > &result, const vctFixedSizeConstMatrixBase< _resultSize, _matrixCols, _matrixRowStride, _matrixColStride, _resultElementType, _matrixDataPtrType > &matrix, const vctFixedSizeConstVectorBase< _matrixCols, _vectorStride, _resultElementType, _vectorDataPtrType > &vector)
Definition vctFixedSizeMatrixRef.h:207