22#ifndef _vctDynamicConstNArrayRef_h
23#define _vctDynamicConstNArrayRef_h
88template <
class _elementType, vct::
size_type _dimension>
110 this->
SetRef(0, nsize_type(0), nstride_type(0));
117 SetRef(other.Pointer(), other.sizes(), other.strides());
139 template <
class __ownerType>
142 this->
SetRef(otherNArray);
148 template <
class __ownerType>
157 template <
size_type __size, str
ide_type __str
ide,
typename __dataPtrType>
166 template <
class __ownerType>
175 template <
size_type __rows,
size_type __cols, str
ide_type __rowStr
ide, str
ide_type __colStr
ide,
typename __dataPtrType>
177 __rowStride, __colStride,
196 template <
class __ownerType>
199 this->
SetRef( otherNArray.Pointer(), otherNArray.sizes(), otherNArray.strides() );
209 template <
class __ownerType>
211 const nsize_type & startPosition,
212 const nsize_type & lengths)
215 this->
SetRef(otherNArray.Pointer(startPosition), lengths, otherNArray.strides());
225 template <
class __ownerType>
227 const ndimension_type & dimensions)
232 const typename ndimension_type::const_iterator dimensionsBegin = dimensions.begin();
233 const typename ndimension_type::const_iterator dimensionsEnd = dimensions.end();
234 typename ndimension_type::const_iterator dimensionsIter;
235 typename nsize_type::iterator sizesIter =
sizes.begin();
236 typename nstride_type::iterator stridesIter =
strides.begin();
237 for (dimensionsIter = dimensionsBegin;
238 dimensionsIter != dimensionsEnd;
239 ++dimensionsIter, ++sizesIter, ++stridesIter) {
240 *sizesIter = otherNArray.size(*dimensionsIter);
241 *stridesIter = otherNArray.stride(*dimensionsIter);
255 template <
class __ownerType>
266 typedef typename OtherArrayType::nsize_type other_nsize_type;
267 typedef typename OtherArrayType::nstride_type other_nstride_type;
270 const typename other_nsize_type::const_iterator otherSizesBegin = otherNArray.sizes().begin();
271 typename other_nsize_type::const_iterator otherSizesIter;
272 const typename other_nstride_type::const_iterator otherStridesBegin = otherNArray.strides().begin();
273 typename other_nstride_type::const_iterator otherStridesIter;
274 const typename nsize_type::iterator sizesBegin =
sizes.begin();
275 const typename nsize_type::iterator sizesEnd =
sizes.end();
276 typename nsize_type::iterator sizesIter;
277 const typename nstride_type::iterator stridesBegin =
strides.begin();
278 typename nstride_type::iterator stridesIter;
281 otherSizesIter = otherSizesBegin;
282 otherStridesIter = otherStridesBegin;
283 sizesIter = sizesBegin;
284 stridesIter = stridesBegin;
286 while (sizesIter != sizesEnd) {
292 *sizesIter = *otherSizesIter;
293 *stridesIter = *otherStridesIter;
304 other_nsize_type startPosition(
static_cast<size_type
>(0));
312 template <
class __ownerType>
315 this->
SetRef( vector.Pointer(), nsize_type(vector.size()), nstride_type(vector.stride()) );
321 template <
size_type __size, str
ide_type __str
ide,
typename __dataPtrType>
324 this->
SetRef( vector.
Pointer(), nsize_type(__size), nstride_type(__stride) );
330 template <
class __ownerType>
333 this->
SetRef(matrix.Pointer(),
334 nsize_type(matrix.rows(), matrix.cols()),
335 nstride_type(matrix.row_stride(), matrix.col_stride()));
341 template <
size_type __rows,
size_type __cols, str
ide_type __rowStr
ide, str
ide_type __colStr
ide,
typename __dataPtrType>
345 nsize_type(__rows, __cols),
346 nstride_type(__rowStride, __colStride));
Definition vctForwardDeclarations.h:145
Definition vctForwardDeclarations.h:171
vctDynamicConstNArrayRef(const vctDynamicConstVectorBase< __ownerType, value_type > &vector)
Definition vctDynamicConstNArrayRef.h:149
void SetRef(const vctDynamicConstVectorBase< __ownerType, value_type > &vector)
Definition vctDynamicConstNArrayRef.h:313
vctDynamicConstNArrayRef(const vctFixedSizeConstVectorBase< __size, __stride, value_type, __dataPtrType > &vector)
Definition vctDynamicConstNArrayRef.h:158
vctDynamicNArrayRefOwner< _elementType, DIMENSION > NArrayOwnerType
Definition vctDynamicConstNArrayRef.h:100
vctDynamicConstNArrayRef(const vctFixedSizeConstMatrixBase< __rows, __cols, __rowStride, __colStride, value_type, __dataPtrType > &matrix)
Definition vctDynamicConstNArrayRef.h:176
NArrayOwnerType::iterator iterator
Definition vctDynamicConstNArrayRef.h:102
void SubarrayOf(const vctDynamicConstNArrayBase< __ownerType, value_type, DIMENSION > &otherNArray, const nsize_type &startPosition, const nsize_type &lengths)
Definition vctDynamicConstNArrayRef.h:210
void SetRef(const vctDynamicConstMatrixBase< __ownerType, value_type > &matrix)
Definition vctDynamicConstNArrayRef.h:331
vctDynamicConstNArrayRef(const vctDynamicConstMatrixBase< __ownerType, value_type > &matrix)
Definition vctDynamicConstNArrayRef.h:167
void PermutationOf(const vctDynamicConstNArrayBase< __ownerType, value_type, DIMENSION > &otherNArray, const ndimension_type &dimensions)
Definition vctDynamicConstNArrayRef.h:226
NArrayOwnerType::reverse_iterator reverse_iterator
Definition vctDynamicConstNArrayRef.h:104
void SetRef(const vctDynamicConstNArrayBase< __ownerType, value_type, DIMENSION > &otherNArray)
Definition vctDynamicConstNArrayRef.h:197
@ DIMENSION
Definition vctDynamicConstNArrayRef.h:94
vctDynamicConstNArrayRef(const vctDynamicConstNArrayBase< __ownerType, value_type, DIMENSION > &otherNArray)
Definition vctDynamicConstNArrayRef.h:140
void SetRef(const vctFixedSizeConstMatrixBase< __rows, __cols, __rowStride, __colStride, value_type, __dataPtrType > &matrix)
Definition vctDynamicConstNArrayRef.h:342
vctDynamicConstNArrayRef(const_pointer dataPointer, const nsize_type &sizes, const nstride_type &strides)
Definition vctDynamicConstNArrayRef.h:123
void SetRef(const_pointer dataPointer, const nsize_type &sizes, const nstride_type &strides)
Definition vctDynamicConstNArrayRef.h:188
vctDynamicConstNArrayRef()
Definition vctDynamicConstNArrayRef.h:108
vctDynamicConstNArrayBase< vctDynamicNArrayRefOwner< _elementType, DIMENSION >, _elementType, DIMENSION > BaseType
Definition vctDynamicConstNArrayRef.h:101
NArrayOwnerType::const_iterator const_iterator
Definition vctDynamicConstNArrayRef.h:103
vctDynamicConstNArrayRef(pointer dataPointer, const nsize_type &sizes, const nstride_type &strides)
Definition vctDynamicConstNArrayRef.h:131
vctDynamicConstNArrayRef< _elementType, DIMENSION > ThisType
Definition vctDynamicConstNArrayRef.h:99
void SliceOf(const vctDynamicConstNArrayBase< __ownerType, value_type, DIMENSION+1 > &otherNArray, dimension_type dimension, size_type index)
Definition vctDynamicConstNArrayRef.h:256
NArrayOwnerType::const_reverse_iterator const_reverse_iterator
Definition vctDynamicConstNArrayRef.h:105
VCT_CONTAINER_TRAITS_TYPEDEFS(_elementType)
vctDynamicConstNArrayRef(const ThisType &other)
Definition vctDynamicConstNArrayRef.h:114
VCT_NARRAY_TRAITS_TYPEDEFS(DIMENSION)
void SetRef(const vctFixedSizeConstVectorBase< __size, __stride, value_type, __dataPtrType > &vector)
Definition vctDynamicConstNArrayRef.h:322
Definition vctForwardDeclarations.h:119
Definition vctDynamicNArrayRefOwner.h:37
vctVarStrideNArrayIterator< ThisType, true > iterator
Definition vctDynamicNArrayRefOwner.h:48
vctVarStrideNArrayIterator< ThisType, false > reverse_iterator
Definition vctDynamicNArrayRefOwner.h:50
vctVarStrideNArrayConstIterator< ThisType, true > const_iterator
Definition vctDynamicNArrayRefOwner.h:49
vctVarStrideNArrayConstIterator< ThisType, false > const_reverse_iterator
Definition vctDynamicNArrayRefOwner.h:51
A template for a fixed size matrix with fixed spacing in memory.
Definition vctFixedSizeConstMatrixBase.h:104
const_pointer Pointer(size_type rowIndex, size_type colIndex) const
Definition vctFixedSizeConstMatrixBase.h:329
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
#define CMN_ASSERT(expr)
Definition cmnAssert.h:97
const nsize_type & sizes(void) const
Definition vctDynamicConstMatrixBase.h:233
bool LesserOrEqual(const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix) const
Definition vctDynamicConstMatrixBase.h:758
const nstride_type & strides(void) const
Definition vctDynamicConstMatrixBase.h:258
Declaration of vctDynamicConstNArrayBase.
dimension_type dimension(void) const
Definition vctDynamicConstNArrayBase.h:331
OwnerType NArray
Definition vctDynamicConstNArrayBase.h:226
Declaration of vctDynamicNArrayRefOwner.