22#ifndef _vctDynamicMatrixOwner_h
23#define _vctDynamicMatrixOwner_h
37template<
class _elementType>
83 size_type
size(
void)
const {
87 const nsize_type &
sizes(
void)
const {
91 size_type
rows(
void)
const {
95 size_type
cols(
void)
const {
99 const nstride_type &
strides(
void)
const {
111 pointer
Pointer(index_type rowIndex, index_type colIndex) {
119 const_pointer
Pointer(index_type rowIndex, index_type colIndex)
const {
180 void SetSize(
const nsize_type & newSizes,
bool rowMajor) {
181 if ((newSizes == this->
sizes()) && (rowMajor ==
RowMajor))
return;
183 const size_type totalSize = newSizes.ProductOfElements();
184 Own(newSizes, rowMajor, (totalSize == 0) ? 0 :
new value_type[totalSize]);
193 pointer oldData =
Data;
208 pointer
Own(size_type
rows, size_type
cols,
bool rowMajor, pointer data) {
209 return this->
Own(nsize_type(
rows,
cols), rowMajor, data);
212 pointer
Own(
const nsize_type & newSizes,
bool rowMajor, pointer data) {
213 pointer oldData =
Data;
const nstride_type & strides(void) const
Definition vctDynamicMatrixOwner.h:99
nsize_type SizesMember
Definition vctDynamicMatrixOwner.h:251
VCT_CONTAINER_TRAITS_TYPEDEFS(_elementType)
const_pointer Pointer(index_type rowIndex, index_type colIndex) const
Definition vctDynamicMatrixOwner.h:119
const_iterator end(void) const
Definition vctDynamicMatrixOwner.h:131
VCT_NARRAY_TRAITS_TYPEDEFS(DIMENSION)
void Disown(void)
Definition vctDynamicMatrixOwner.h:226
iterator begin(void)
Definition vctDynamicMatrixOwner.h:136
reverse_iterator rbegin(void)
Definition vctDynamicMatrixOwner.h:155
pointer Pointer(index_type rowIndex, index_type colIndex)
Definition vctDynamicMatrixOwner.h:111
~vctDynamicMatrixOwner()
Definition vctDynamicMatrixOwner.h:79
vctVarStrideMatrixConstIterator< value_type > const_reverse_iterator
Definition vctDynamicMatrixOwner.h:50
bool IsRowMajor(void) const
Definition vctDynamicMatrixOwner.h:238
const_reverse_iterator rbegin(void) const
Definition vctDynamicMatrixOwner.h:145
pointer Pointer(void)
Definition vctDynamicMatrixOwner.h:115
bool StorageOrder(void) const
Definition vctDynamicMatrixOwner.h:246
value_type * Data
Definition vctDynamicMatrixOwner.h:254
bool RowMajor
Definition vctDynamicMatrixOwner.h:253
size_type size(void) const
Definition vctDynamicMatrixOwner.h:83
const_reverse_iterator rend(void) const
Definition vctDynamicMatrixOwner.h:150
vctDynamicMatrixOwner< value_type > ThisType
Definition vctDynamicMatrixOwner.h:46
vctDynamicMatrixOwner()
Definition vctDynamicMatrixOwner.h:54
vctDynamicMatrixOwner(size_type rows, size_type cols, bool rowMajor=VCT_DEFAULT_STORAGE)
Definition vctDynamicMatrixOwner.h:70
vctDynamicMatrixOwner(const nsize_type &newSizes, bool rowMajor=VCT_DEFAULT_STORAGE)
Definition vctDynamicMatrixOwner.h:61
pointer Own(size_type rows, size_type cols, bool rowMajor, pointer data)
Definition vctDynamicMatrixOwner.h:208
reverse_iterator rend(void)
Definition vctDynamicMatrixOwner.h:160
vctVarStrideMatrixIterator< value_type > iterator
Definition vctDynamicMatrixOwner.h:51
void SetSize(const nsize_type &newSizes, bool rowMajor)
Definition vctDynamicMatrixOwner.h:180
difference_type row_stride(void) const
Definition vctDynamicMatrixOwner.h:103
size_type cols(void) const
Definition vctDynamicMatrixOwner.h:95
nstride_type StridesMember
Definition vctDynamicMatrixOwner.h:252
void SetSize(size_type rows, size_type cols, bool rowMajor)
Definition vctDynamicMatrixOwner.h:176
pointer Own(const nsize_type &newSizes, bool rowMajor, pointer data)
Definition vctDynamicMatrixOwner.h:212
const nsize_type & sizes(void) const
Definition vctDynamicMatrixOwner.h:87
vctVarStrideMatrixConstIterator< value_type > const_iterator
Definition vctDynamicMatrixOwner.h:49
const_iterator begin(void) const
Definition vctDynamicMatrixOwner.h:127
iterator end(void)
Definition vctDynamicMatrixOwner.h:140
size_type rows(void) const
Definition vctDynamicMatrixOwner.h:91
bool IsColMajor(void) const
Definition vctDynamicMatrixOwner.h:234
difference_type col_stride(void) const
Definition vctDynamicMatrixOwner.h:107
pointer Release()
Definition vctDynamicMatrixOwner.h:192
bool IsCompact(void) const
Definition vctDynamicMatrixOwner.h:242
@ DIMENSION
Definition vctDynamicMatrixOwner.h:43
vctVarStrideMatrixIterator< value_type > reverse_iterator
Definition vctDynamicMatrixOwner.h:52
const_pointer Pointer(void) const
Definition vctDynamicMatrixOwner.h:123
Definition vctVarStrideMatrixIterator.h:40
Definition vctVarStrideMatrixIterator.h:283
#define CMN_UNUSED(argument)
Definition cmnPortability.h:497
Declaration of vctDynamicMatrixRefOwner.
Forward declarations and #define for cisstVector.
const bool VCT_DEFAULT_STORAGE
Definition vctForwardDeclarations.h:47
Declaration of vctVarStrideMatrixConstIterator and vctVarStrideMatrixIterator.