22 #ifndef _vctDynamicConstMatrixRef_h
23 #define _vctDynamicConstMatrixRef_h
78 template <
class _elementType>
97 SetRef(0, 0, 1, 1, static_cast<pointer>(0));
116 SetRef(rows, cols, rowStride, colStride, dataPointer);
120 const_pointer dataPointer)
122 SetRef(rows, cols, rowStride, colStride, dataPointer);
128 SetRef(matrixSize, rowStride, colStride, dataPointer);
131 const_pointer dataPointer)
133 SetRef(matrixSize, rowStride, colStride, dataPointer);
139 SetRef(matrixSize, matrixStride, dataPointer);
142 const_pointer dataPointer)
144 SetRef(matrixSize, matrixStride, dataPointer);
157 SetRef(rows, cols, dataPointer, storageOrder);
162 SetRef(rows, cols, dataPointer, storageOrder);
168 SetRef(matrixSize, dataPointer, storageOrder);
173 SetRef(matrixSize, dataPointer, storageOrder);
183 template <
size_type __rows,
size_type __cols, str
ide_type __rowStr
ide, str
ide_type __colStr
ide,
typename __dataPtrType>
200 template <
size_type __rows,
size_type __cols, str
ide_type __rowStr
ide, str
ide_type __colStr
ide,
typename __dataPtrType>
204 SetRef(otherMatrix, startRow, startCol, rows, cols);
212 template <
class __ownerType>
229 template <
class __ownerType>
233 SetRef(otherMatrix, startRow, startCol, rows, cols);
236 template <
class __ownerType>
238 const nsize_type & start,
const nsize_type & matrixSize)
240 SetRef(otherMatrix, start, matrixSize);
252 this->
Matrix.
SetRef(rows, cols, rowStride, colStride, dataPointer);
256 const_pointer dataPointer)
258 this->
Matrix.
SetRef(rows, cols, rowStride, colStride, const_cast<pointer>(dataPointer));
261 void SetRef(
const nsize_type & matrixSize,
263 pointer dataPointer) {
264 this->
Matrix.
SetRef(matrixSize, rowStride, colStride, dataPointer);
266 void SetRef(
const nsize_type & matrixSize,
268 const_pointer dataPointer) {
269 this->
Matrix.
SetRef(matrixSize, rowStride, colStride, const_cast<pointer>(dataPointer));
272 void SetRef(
const nsize_type & matrixSize,
273 const nstride_type & matrixStride,
274 pointer dataPointer) {
275 this->
Matrix.
SetRef(matrixSize, matrixStride, dataPointer);
277 void SetRef(
const nsize_type & matrixSize,
278 const nstride_type & matrixStride,
279 const_pointer dataPointer) {
280 this->
Matrix.
SetRef(matrixSize, matrixStride, const_cast<pointer>(dataPointer));
292 this->
Matrix.
SetRef(rows, cols, dataPointer, storageOrder);
296 this->
Matrix.
SetRef(rows, cols, const_cast<pointer>(dataPointer), storageOrder);
305 this->
Matrix.
SetRef(sizes, const_cast<pointer>(dataPointer), storageOrder);
313 template <
size_type __rows,
size_type __cols, str
ide_type __rowStr
ide, str
ide_type __colStr
ide,
typename __dataPtrType>
317 SetRef(otherMatrix.rows(), otherMatrix.cols(), otherMatrix.row_stride(), otherMatrix.col_stride(),
318 otherMatrix.Pointer());
334 template <
size_type __rows,
size_type __cols, str
ide_type __rowStr
ide, str
ide_type __colStr
ide,
typename __dataPtrType>
339 if ( (startRow + rows > otherMatrix.rows()) || (startCol + cols > otherMatrix.cols()) ) {
340 cmnThrow(std::out_of_range(
"vctDynamicConstMatrixRef SetRef out of range"));
342 SetRef(rows, cols, otherMatrix.row_stride(), otherMatrix.col_stride(), otherMatrix.Pointer(startRow, startCol));
348 template <
class __ownerType>
368 template <
class __ownerType>
373 if ( (startRow + rows > otherMatrix.
rows()) || (startCol + cols > otherMatrix.
cols()) ) {
374 cmnThrow(std::out_of_range(
"vctDynamicConstMatrixRef SetRef out of range"));
377 otherMatrix.
Pointer(startRow, startCol));
380 template <
class __ownerType>
382 const nsize_type & start,
const nsize_type & matrixSize)
385 start.
Element(0), start.Element(1), matrixSize.Element(0), matrixSize.Element(1));
391 #endif // _vctDynamicConstMatrixRef_h
void SetRef(const nsize_type &matrixSize, stride_type rowStride, stride_type colStride, pointer dataPointer)
Definition: vctDynamicConstMatrixRef.h:261
void SetRef(size_type rows, size_type cols, const_pointer dataPointer, bool storageOrder=VCT_DEFAULT_STORAGE)
Definition: vctDynamicConstMatrixRef.h:294
A template for a fixed size matrix with fixed spacing in memory.
Definition: vctFixedSizeConstMatrixBase.h:103
vctDynamicConstMatrixRef(const ThisType &other)
Definition: vctDynamicConstMatrixRef.h:101
void SetRef(size_type rows, size_type cols, pointer dataPointer, bool storageOrder=VCT_DEFAULT_STORAGE)
Definition: vctDynamicConstMatrixRef.h:290
void SetRef(const nsize_type &matrixSize, stride_type rowStride, stride_type colStride, const_pointer dataPointer)
Definition: vctDynamicConstMatrixRef.h:266
Declaration of vctDynamicConstMatrixBase.
vctDynamicConstMatrixRef(const vctDynamicConstMatrixBase< __ownerType, _elementType > &otherMatrix)
Definition: vctDynamicConstMatrixRef.h:213
vctDynamicConstMatrixRef(size_type rows, size_type cols, pointer dataPointer, bool storageOrder=VCT_DEFAULT_STORAGE)
Definition: vctDynamicConstMatrixRef.h:154
void SetRef(const vctFixedSizeConstMatrixBase< __rows, __cols, __rowStride, __colStride, _elementType, __dataPtrType > &otherMatrix)
Definition: vctDynamicConstMatrixRef.h:314
OwnerType Matrix
Definition: vctDynamicConstMatrixBase.h:167
vctDynamicConstMatrixRef(const nsize_type &matrixSize, const_pointer dataPointer, bool storageOrder=VCT_DEFAULT_STORAGE)
Definition: vctDynamicConstMatrixRef.h:170
size_t size_type
Definition: vctContainerTraits.h:35
void SetRef(size_type rows, size_type cols, stride_type rowStride, stride_type colStride, const_pointer dataPointer)
Definition: vctDynamicConstMatrixRef.h:254
MatrixOwnerType::iterator iterator
Definition: vctDynamicConstMatrixRef.h:90
vctDynamicConstMatrixRef(const vctDynamicConstMatrixBase< __ownerType, _elementType > &otherMatrix, size_type startRow, size_type startCol, size_type rows, size_type cols)
Definition: vctDynamicConstMatrixRef.h:230
const bool VCT_DEFAULT_STORAGE
Definition: vctForwardDeclarations.h:49
vctDynamicConstMatrixRef(size_type rows, size_type cols, stride_type rowStride, stride_type colStride, pointer dataPointer)
Definition: vctDynamicConstMatrixRef.h:112
Definition: vctDynamicConstMatrixRef.h:84
const nstride_type & strides(void) const
Definition: vctDynamicConstMatrixBase.h:258
vctDynamicConstMatrixRef(const nsize_type &matrixSize, stride_type rowStride, stride_type colStride, pointer dataPointer)
Definition: vctDynamicConstMatrixRef.h:125
MatrixOwnerType::const_iterator const_iterator
Definition: vctDynamicConstMatrixRef.h:91
MatrixOwnerType::reverse_iterator reverse_iterator
Definition: vctDynamicConstMatrixRef.h:92
Definition: vctDynamicConstMatrixBase.h:77
vctDynamicConstMatrixRef(const nsize_type &matrixSize, const nstride_type &matrixStride, const_pointer dataPointer)
Definition: vctDynamicConstMatrixRef.h:141
vctDynamicConstMatrixBase< vctDynamicMatrixRefOwner< _elementType >, _elementType > BaseType
Definition: vctDynamicConstMatrixRef.h:89
VCT_CONTAINER_TRAITS_TYPEDEFS(_elementType)
Dynamic matrix referencing existing memory (const)
Definition: vctDynamicConstMatrixRef.h:79
void SetRef(const vctDynamicConstMatrixBase< __ownerType, _elementType > &otherMatrix, size_type startRow, size_type startCol, size_type rows, size_type cols)
Definition: vctDynamicConstMatrixRef.h:369
size_type rows() const
Definition: vctDynamicConstMatrixBase.h:238
vctDynamicConstMatrixRef(size_type rows, size_type cols, const_pointer dataPointer, bool storageOrder=VCT_DEFAULT_STORAGE)
Definition: vctDynamicConstMatrixRef.h:159
size_type cols() const
Definition: vctDynamicConstMatrixBase.h:243
void SetRef(const nsize_type &sizes, pointer dataPointer, bool storageOrder=VCT_DEFAULT_STORAGE)
Definition: vctDynamicConstMatrixRef.h:299
VCT_NARRAY_TRAITS_TYPEDEFS(DIMENSION)
const_pointer Pointer(index_type rowIndex, index_type colIndex) const
Definition: vctDynamicConstMatrixBase.h:306
Declaration of vctDynamicMatrixRefOwner.
vctDynamicConstMatrixRef(const nsize_type &matrixSize, const nstride_type &matrixStride, pointer dataPointer)
Definition: vctDynamicConstMatrixRef.h:136
#define cmnThrow(a)
Definition: MinimalCmn.h:4
void SetRef(const vctFixedSizeConstMatrixBase< __rows, __cols, __rowStride, __colStride, _elementType, __dataPtrType > &otherMatrix, size_type startRow, size_type startCol, size_type rows, size_type cols)
Definition: vctDynamicConstMatrixRef.h:335
MatrixOwnerType::const_reverse_iterator const_reverse_iterator
Definition: vctDynamicConstMatrixRef.h:93
void SetRef(const nsize_type &matrixSize, const nstride_type &matrixStride, pointer dataPointer)
Definition: vctDynamicConstMatrixRef.h:272
Definition: vctDynamicMatrixRefOwner.h:39
void SetRef(const nsize_type &matrixSize, const nstride_type &matrixStride, const_pointer dataPointer)
Definition: vctDynamicConstMatrixRef.h:277
ptrdiff_t stride_type
Definition: vctContainerTraits.h:37
vctDynamicMatrixRefOwner< _elementType > MatrixOwnerType
Definition: vctDynamicConstMatrixRef.h:88
vctDynamicConstMatrixRef(const vctDynamicConstMatrixBase< __ownerType, _elementType > &otherMatrix, const nsize_type &start, const nsize_type &matrixSize)
Definition: vctDynamicConstMatrixRef.h:237
void SetRef(size_type rows, size_type cols, stride_type rowStride, stride_type colStride, pointer dataPointer)
Definition: vctDynamicConstMatrixRef.h:248
difference_type row_stride() const
Definition: vctDynamicConstMatrixBase.h:263
difference_type col_stride() const
Definition: vctDynamicConstMatrixBase.h:268
vctDynamicConstMatrixRef(const vctFixedSizeConstMatrixBase< __rows, __cols, __rowStride, __colStride, _elementType, __dataPtrType > &otherMatrix, size_type startRow, size_type startCol, size_type rows, size_type cols)
Definition: vctDynamicConstMatrixRef.h:201
void SetRef(size_type rows, size_type cols, pointer dataPointer, bool storageOrder)
Definition: vctDynamicMatrixRefOwner.h:74
void SetRef(const nsize_type &sizes, const_pointer dataPointer, bool storageOrder=VCT_DEFAULT_STORAGE)
Definition: vctDynamicConstMatrixRef.h:303
Definition: vctVarStrideMatrixIterator.h:40
vctDynamicConstMatrixRef(const nsize_type &matrixSize, stride_type rowStride, stride_type colStride, const_pointer dataPointer)
Definition: vctDynamicConstMatrixRef.h:130
vctDynamicConstMatrixRef< _elementType > ThisType
Definition: vctDynamicConstMatrixRef.h:87
vctDynamicConstMatrixRef(const vctFixedSizeConstMatrixBase< __rows, __cols, __rowStride, __colStride, _elementType, __dataPtrType > &otherMatrix)
Definition: vctDynamicConstMatrixRef.h:184
void SetRef(const vctDynamicConstMatrixBase< __ownerType, _elementType > &otherMatrix)
Definition: vctDynamicConstMatrixRef.h:349
const nsize_type & sizes(void) const
Definition: vctDynamicConstMatrixBase.h:233
vctDynamicConstMatrixRef(size_type rows, size_type cols, stride_type rowStride, stride_type colStride, const_pointer dataPointer)
Definition: vctDynamicConstMatrixRef.h:118
const_reference Element(size_type rowIndex, size_type colIndex) const
Definition: vctDynamicConstMatrixBase.h:362
Definition: vctVarStrideMatrixIterator.h:287
vctDynamicConstMatrixRef()
Definition: vctDynamicConstMatrixRef.h:96
void SetRef(const vctDynamicConstMatrixBase< __ownerType, _elementType > &otherMatrix, const nsize_type &start, const nsize_type &matrixSize)
Definition: vctDynamicConstMatrixRef.h:381
vctDynamicConstMatrixRef(const nsize_type &matrixSize, pointer dataPointer, bool storageOrder=VCT_DEFAULT_STORAGE)
Definition: vctDynamicConstMatrixRef.h:165