cisst-saw
Loading...
Searching...
No Matches
vctDynamicMatrixRef< _elementType > Class Template Reference

Dynamic matrix referencing existing memory. More...

#include <vctDynamicMatrixRef.h>

Inheritance diagram for vctDynamicMatrixRef< _elementType >:
vctDynamicMatrixBase< vctDynamicMatrixRefOwner< _elementType >, _elementType > vctDynamicConstMatrixBase< vctDynamicMatrixRefOwner< _elementType >, _elementType >

Public Types

enum  { DIMENSION = 2 }
typedef vctDynamicMatrixRef< _elementType > ThisType
typedef vctDynamicMatrixRefOwner< _elementType > MatrixOwnerType
typedef vctDynamicMatrixBase< vctDynamicMatrixRefOwner< _elementType >, _elementType > BaseType
typedef MatrixOwnerType::iterator iterator
typedef MatrixOwnerType::const_iterator const_iterator
typedef MatrixOwnerType::reverse_iterator reverse_iterator
typedef MatrixOwnerType::const_reverse_iterator const_reverse_iterator
Public Types inherited from vctDynamicMatrixBase< vctDynamicMatrixRefOwner< _elementType >, _elementType >
typedef vctDynamicMatrixBase ThisType
typedef vctDynamicConstMatrixBase< vctDynamicMatrixRefOwner< _elementType >, _elementType > BaseType
typedef vctDynamicMatrixRefOwner< _elementType > OwnerType
typedef BaseType::iterator iterator
typedef BaseType::reverse_iterator reverse_iterator
typedef BaseType::const_iterator const_iterator
typedef BaseType::const_reverse_iterator const_reverse_iterator
typedef BaseType::ConstRowRefType ConstRowRefType
typedef BaseType::RowRefType RowRefType
typedef BaseType::ConstColumnRefType ConstColumnRefType
typedef BaseType::ColumnRefType ColumnRefType
typedef BaseType::ConstDiagonalRefType ConstDiagonalRefType
typedef BaseType::DiagonalRefType DiagonalRefType
typedef BaseType::ConstRefTransposeType ConstRefTransposeType
typedef BaseType::RefTransposeType RefTransposeType
typedef BaseType::ConstVectorPointerType ConstVectorPointerType
typedef BaseType::VectorPointerType VectorPointerType

Public Member Functions

 VCT_CONTAINER_TRAITS_TYPEDEFS (_elementType)
 VCT_NARRAY_TRAITS_TYPEDEFS (DIMENSION)
 vctDynamicMatrixRef ()
 vctDynamicMatrixRef (const ThisType &other)
 vctDynamicMatrixRef (size_type rows, size_type cols, stride_type rowStride, stride_type colStride, pointer dataPointer)
 vctDynamicMatrixRef (const nsize_type &matrixSize, stride_type rowStride, stride_type colStride, pointer dataPointer)
 vctDynamicMatrixRef (const nsize_type &matrixSize, const nstride_type &matrixStride, pointer dataPointer)
 vctDynamicMatrixRef (size_type rows, size_type cols, pointer dataPointer, bool storageOrder=VCT_DEFAULT_STORAGE)
 vctDynamicMatrixRef (const nsize_type &matrixSize, pointer dataPointer, bool storageOrder=VCT_DEFAULT_STORAGE)
template<size_type __rows, size_type __cols, stride_type __rowStride, stride_type __colStride, typename __dataPtrType>
 vctDynamicMatrixRef (vctFixedSizeMatrixBase< __rows, __cols, __rowStride, __colStride, _elementType, __dataPtrType > &otherMatrix)
template<size_type __rows, size_type __cols, stride_type __rowStride, stride_type __colStride, typename __dataPtrType>
 vctDynamicMatrixRef (vctFixedSizeMatrixBase< __rows, __cols, __rowStride, __colStride, _elementType, __dataPtrType > &otherMatrix, size_type startRow, size_type startCol, size_type rows, size_type cols)
template<class __ownerType>
 vctDynamicMatrixRef (vctDynamicMatrixBase< __ownerType, _elementType > &otherMatrix)
template<class __ownerType>
 vctDynamicMatrixRef (vctDynamicMatrixBase< __ownerType, _elementType > &otherMatrix, size_type startRow, size_type startCol, size_type rows, size_type cols)
template<class __ownerType>
 vctDynamicMatrixRef (vctDynamicMatrixBase< __ownerType, _elementType > &otherMatrix, const nsize_type &start, const nsize_type &matrixSize)
void SetRef (size_type rows, size_type cols, stride_type rowStride, stride_type colStride, pointer dataPointer)
void SetRef (const nsize_type &matrixSize, stride_type rowStride, stride_type colStride, pointer dataPointer)
void SetRef (const nsize_type &matrixSize, const nstride_type &matrixStride, pointer dataPointer)
void SetRef (size_type rows, size_type cols, pointer dataPointer, bool storageOrder=VCT_DEFAULT_STORAGE)
void SetRef (const nsize_type &sizes, pointer dataPointer, bool storageOrder=VCT_DEFAULT_STORAGE)
template<size_type __rows, size_type __cols, stride_type __rowStride, stride_type __colStride, typename __dataPtrType>
void SetRef (vctFixedSizeMatrixBase< __rows, __cols, __rowStride, __colStride, _elementType, __dataPtrType > &otherMatrix)
template<size_type __rows, size_type __cols, stride_type __rowStride, stride_type __colStride, typename __dataPtrType>
void SetRef (vctFixedSizeMatrixBase< __rows, __cols, __rowStride, __colStride, _elementType, __dataPtrType > &otherMatrix, size_type startRow, size_type startCol, size_type rows, size_type cols)
template<class __ownerType>
void SetRef (vctDynamicMatrixBase< __ownerType, _elementType > &otherMatrix)
template<class __ownerType>
void SetRef (vctDynamicMatrixBase< __ownerType, _elementType > &otherMatrix, size_type startRow, size_type startCol, size_type rows, size_type cols)
template<class __ownerType>
void SetRef (vctDynamicMatrixBase< __ownerType, _elementType > &otherMatrix, const nsize_type &start, const nsize_type &matrixSize)
Assignment operation into a matrix reference
Parameters
otherThe matrix to be copied.
ThisTypeoperator= (const ThisType &other)
ThisTypeoperator= (const vctDynamicConstMatrixRef< _elementType > &other)
template<class __matrixOwnerType, typename __elementType>
ThisTypeoperator= (const vctDynamicConstMatrixBase< __matrixOwnerType, __elementType > &other)
template<size_type __rows, size_type __cols, stride_type __rowStride, stride_type __colStride, typename __dataPtrType>
ThisTypeoperator= (const vctFixedSizeConstMatrixBase< __rows, __cols, __rowStride, __colStride, _elementType, __dataPtrType > &other)
ThisTypeoperator= (const value_type &value)
void DeSerializeRaw (std::istream &inputStream) CISST_THROW(std
Public Member Functions inherited from vctDynamicMatrixBase< vctDynamicMatrixRefOwner< _elementType >, _elementType >
 VCT_CONTAINER_TRAITS_TYPEDEFS (_elementType)
iterator begin (void)
iterator end (void)
reverse_iterator rbegin (void)
reverse_iterator rend (void)
const_iterator begin (void) const
const_iterator end (void) const
const_reverse_iterator rbegin (void) const
const_reverse_iterator rend (void) const
RowRefType operator[] (size_type index)
ConstRowRefType operator[] (size_type index) const
const OwnerTypeOwner (void) const
OwnerTypeOwner (void)
pointer Pointer (size_type rowIndex, size_type colIndex)
pointer Pointer (void)
const_pointer Pointer (size_type rowIndex, size_type colIndex) const
const_pointer Pointer (void) const
reference at (size_type index) CISST_THROW(std
const_reference at (size_type index) const CISST_THROW(std
reference at (size_type rowIndex, size_type colIndex) CISST_THROW(std
const_reference at (size_type rowIndex, size_type colIndex) const CISST_THROW(std
reference operator() (size_type rowIndex, size_type colIndex) CISST_THROW(std
const_reference operator() (size_type rowIndex, size_type colIndex) const CISST_THROW(std
reference Element (size_type rowIndex, size_type colIndex)
const_reference Element (size_type rowIndex, size_type colIndex) const
RowRefType Row (size_type index) CISST_THROW(std
ColumnRefType Column (size_type index) CISST_THROW(std
DiagonalRefType Diagonal (void)
VectorPointerTypeRowPointers (VectorPointerType &rowPointers) CISST_THROW(std
ConstRowRefType Row (size_type index) const CISST_THROW(std
ConstColumnRefType Column (size_type index) const CISST_THROW(std
ConstDiagonalRefType Diagonal (void) const
ConstVectorPointerType RowPointers (ConstVectorPointerType &rowPointers) const CISST_THROW(std
vctDynamicMatrixRef< _elementType > Ref (const size_type rows, const size_type cols, const size_type startRow=0, const size_type startCol=0) CISST_THROW(std
vctDynamicConstMatrixRef< _elementType > Ref (const size_type rows, const size_type cols, const size_type startRow=0, const size_type startCol=0) const CISST_THROW(std
void ExchangeRows (const size_type row1Index, const size_type row2Index)
void ExchangeColumns (const size_type col1Index, const size_type col2Index)
void SelectRowsFrom (const vctDynamicConstMatrixBase< __inputMatrixOwnerType, _elementType > &inputMatrix, const vctDynamicConstVectorBase< __indexVectorOwnerType, index_type > &rowIndexVector)
void SelectColsFrom (const vctDynamicConstMatrixBase< __inputMatrixOwnerType, _elementType > &inputMatrix, const vctDynamicConstVectorBase< __indexVectorOwnerType, index_type > &colIndexVector)
void RowPermutationOf (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &inputMatrix, const index_type permutedRowIndexes[])
void RowInversePermutationOf (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &inputMatrix, const index_type permutedRowIndexes[])
void ColumnPermutationOf (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &inputMatrix, const index_type permutedColumnIndexes[])
void ColumnInversePermutationOf (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &inputMatrix, const index_type permutedColumnIndexes[])
value_type SetAll (const value_type value)
bool Zeros (void)
ThisTypeAssign (const vctDynamicConstMatrixBase< __matrixOwnerType, value_type > &other)
ThisTypeAssign (const vctDynamicConstMatrixBase< __matrixOwnerType, __elementType > &other)
ThisTypeoperator= (const vctDynamicConstMatrixBase< __matrixOwnerType, __elementType > &other)
ThisTypeAssign (const vctFixedSizeConstMatrixBase< __rows, __cols, __rowStride, __colStride, __elementType, __dataPtrType > &other)
ThisTypeForceAssign (const vctDynamicConstMatrixBase< __matrixOwnerType, __elementType > &other)
ThisTypeForceAssign (const vctFixedSizeConstMatrixBase< __rows, __cols, __rowStride, __colStride, __elementType, __dataPtrType > &other)
bool FastCopyOf (const vctDynamicConstMatrixBase< __matrixOwnerType, value_type > &source, bool performSafetyChecks=vctFastCopy::PerformChecks) CISST_THROW(std
bool FastCopyOf (const vctFixedSizeConstMatrixBase< __rows, __cols, __rowStride, __colStride, value_type, __dataPtrType > &source, bool performSafetyChecks=vctFastCopy::PerformChecks) CISST_THROW(std
ThisTypeAssign (const value_type *elements, bool inputIsRowMajor=true)
ThisTypeAssign (const value_type element0,...)
RefTransposeType TransposeRef (void)
ConstRefTransposeType TransposeRef (void) const
ThisTypeSumOf (const vctDynamicConstMatrixBase< __matrixOwnerType1, _elementType > &matrix1, const vctDynamicConstMatrixBase< __matrixOwnerType2, _elementType > &matrix2)
ThisTypeDifferenceOf (const vctDynamicConstMatrixBase< __matrixOwnerType1, _elementType > &matrix1, const vctDynamicConstMatrixBase< __matrixOwnerType2, _elementType > &matrix2)
ThisTypeElementwiseProductOf (const vctDynamicConstMatrixBase< __matrixOwnerType1, _elementType > &matrix1, const vctDynamicConstMatrixBase< __matrixOwnerType2, _elementType > &matrix2)
ThisTypeElementwiseRatioOf (const vctDynamicConstMatrixBase< __matrixOwnerType1, _elementType > &matrix1, const vctDynamicConstMatrixBase< __matrixOwnerType2, _elementType > &matrix2)
ThisTypeElementwiseMinOf (const vctDynamicConstMatrixBase< __matrixOwnerType1, _elementType > &matrix1, const vctDynamicConstMatrixBase< __matrixOwnerType2, _elementType > &matrix2)
ThisTypeElementwiseMaxOf (const vctDynamicConstMatrixBase< __matrixOwnerType1, _elementType > &matrix1, const vctDynamicConstMatrixBase< __matrixOwnerType2, _elementType > &matrix2)
ThisTypeAdd (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix)
ThisTypeSubtract (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix)
ThisTypeElementwiseMultiply (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix)
ThisTypeElementwiseDivide (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix)
ThisTypeElementwiseMin (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix)
ThisTypeElementwiseMax (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix)
ThisTypeoperator+= (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix)
ThisTypeoperator-= (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix)
ThisTypeSumOf (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix, const value_type scalar)
ThisTypeDifferenceOf (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix, const value_type scalar)
ThisTypeProductOf (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix, const value_type scalar)
ThisTypeRatioOf (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix, const value_type scalar)
ThisTypeClippedAboveOf (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix, const value_type lowerBound)
ThisTypeClippedBelowOf (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix, const value_type upperBound)
ThisTypeSumOf (const value_type scalar, const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix)
ThisTypeDifferenceOf (const value_type scalar, const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix)
ThisTypeProductOf (const value_type scalar, const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix)
ThisTypeRatioOf (const value_type scalar, const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix)
ThisTypeClippedAboveOf (const value_type upperBound, const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix)
ThisTypeClippedBelowOf (const value_type lowerBound, const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix)
ThisTypeAdd (const value_type scalar)
ThisTypeSubtract (const value_type scalar)
ThisTypeMultiply (const value_type scalar)
ThisTypeDivide (const value_type scalar)
ThisTypeClipAbove (const value_type upperBound)
ThisTypeClipBelow (const value_type lowerBound)
ThisTypeoperator+= (const value_type scalar)
ThisTypeoperator-= (const value_type scalar)
ThisTypeoperator*= (const value_type scalar)
ThisTypeoperator/= (const value_type scalar)
ThisTypeAddProductOf (const value_type scalar, const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix)
ThisTypeAddElementwiseProductOf (const vctDynamicConstMatrixBase< __matrixOwnerType1, _elementType > &matrix1, const vctDynamicConstMatrixBase< __matrixOwnerType2, _elementType > &matrix2)
ThisTypeAbsOf (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix)
ThisTypeNegationOf (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix)
ThisTypeFloorOf (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix)
ThisTypeCeilOf (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix)
ThisTypeTransposeOf (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix)
ThisTypeAbsSelf (void)
ThisTypeNegationSelf (void)
ThisTypeFloorSelf (void)
ThisTypeCeilSelf (void)
void ProductOf (const vctDynamicConstMatrixBase< __matrixOwnerType1, _elementType > &matrix1, const vctDynamicConstMatrixBase< __matrixOwnerType2, _elementType > &matrix2)
void OuterProductOf (const vctDynamicConstVectorBase< __vectorOwnerType1, _elementType > &colVector, const vctDynamicConstVectorBase< __vectorOwnerType2, _elementType > &rowVector)

Detailed Description

template<class _elementType>
class vctDynamicMatrixRef< _elementType >

Dynamic matrix referencing existing memory.

The class vctDynamicMatrixRef allows to create a matrix overlaying an existing block of memory. It can be used to manipulate a container created by another toolkit (i.e. OpenGL, vtk, ...) or a cisstVector container using different parameters (different size, storage order or stride).

To setup the overlay, one can use either the constructors or the SetRef methods. When used with a cisst container, the SetRef methods can infer some of the memory layout information (pointer on first element, sizes, strides). When used to overlay existing memory referenced by a pointer, the user has to provide all the required information. In any case, the Ref object doesn't allocate nor free memory.

For example to manipulate the first five elements of a matrix, one can do:

vctDynamicMatrix<double> wholeMatrix(10, 10);
vctRandom(wholeMatrix, -10.0, 10.0);
first5x5.SetRef(wholeMatrix, 0, 0, 5, 5);
first5x5.SetAll(5.0);
value_type SetAll(const value_type value)
Definition vctDynamicMatrixBase.h:452
Definition vctForwardDeclarations.h:157
void SetRef(size_type rows, size_type cols, stride_type rowStride, stride_type colStride, pointer dataPointer)
Definition vctDynamicMatrixRef.h:217
vctDynamicMatrixRef()
Definition vctDynamicMatrixRef.h:90
void vctRandom(vctDynamicMatrixBase< _matrixOwnerType, _elementType > &matrix, const typename vctDynamicMatrixBase< _matrixOwnerType, _elementType >::value_type min, const typename vctDynamicMatrixBase< _matrixOwnerType, _elementType >::value_type max)
Definition vctRandomDynamicMatrix.h:47
Note
Make sure the underlying memory is not freed after the Ref object is created and before it is used. This would lead to faulty memory access and potential bugs.
vctDynamicMatrixRef can perform const and non-const operations. It can be initialized with a non-const object only (value_type *). For a const Ref, see vctDynamicConstMatrixRef.
See also
vctDynamicMatrix, vctDynamicConstMatrixRef
Parameters
_elementTypeType of elements referenced. Also defined as value_type.

Member Typedef Documentation

◆ BaseType

template<class _elementType>
typedef vctDynamicMatrixBase<vctDynamicMatrixRefOwner<_elementType>, _elementType> vctDynamicMatrixRef< _elementType >::BaseType

◆ const_iterator

template<class _elementType>
typedef MatrixOwnerType::const_iterator vctDynamicMatrixRef< _elementType >::const_iterator

◆ const_reverse_iterator

template<class _elementType>
typedef MatrixOwnerType::const_reverse_iterator vctDynamicMatrixRef< _elementType >::const_reverse_iterator

◆ iterator

template<class _elementType>
typedef MatrixOwnerType::iterator vctDynamicMatrixRef< _elementType >::iterator

◆ MatrixOwnerType

template<class _elementType>
typedef vctDynamicMatrixRefOwner<_elementType> vctDynamicMatrixRef< _elementType >::MatrixOwnerType

◆ reverse_iterator

template<class _elementType>
typedef MatrixOwnerType::reverse_iterator vctDynamicMatrixRef< _elementType >::reverse_iterator

◆ ThisType

template<class _elementType>
typedef vctDynamicMatrixRef<_elementType> vctDynamicMatrixRef< _elementType >::ThisType

Member Enumeration Documentation

◆ anonymous enum

template<class _elementType>
anonymous enum
Enumerator
DIMENSION 

Constructor & Destructor Documentation

◆ vctDynamicMatrixRef() [1/12]

template<class _elementType>
vctDynamicMatrixRef< _elementType >::vctDynamicMatrixRef ( )
inline

◆ vctDynamicMatrixRef() [2/12]

template<class _elementType>
vctDynamicMatrixRef< _elementType >::vctDynamicMatrixRef ( const ThisType & other)
inline

Copy constructor. This copy constructor takes a const reference on the object to copy but has to remove the const-ness of the point to create a vctDynamicMatrixRef and allow it to manipulate elements. The explict use of a const_cast is far from great but there is no easy solution as C++ requires the copy constructor to take a const reference.

◆ vctDynamicMatrixRef() [3/12]

template<class _elementType>
vctDynamicMatrixRef< _elementType >::vctDynamicMatrixRef ( size_type rows,
size_type cols,
stride_type rowStride,
stride_type colStride,
pointer dataPointer )
inline

Constructor requiring the user to provide all the necessary information, i.e. the size (number of rows and columns), the strides (increment from row to row and from column to column) as well as a pointer on the first element.

◆ vctDynamicMatrixRef() [4/12]

template<class _elementType>
vctDynamicMatrixRef< _elementType >::vctDynamicMatrixRef ( const nsize_type & matrixSize,
stride_type rowStride,
stride_type colStride,
pointer dataPointer )
inline

◆ vctDynamicMatrixRef() [5/12]

template<class _elementType>
vctDynamicMatrixRef< _elementType >::vctDynamicMatrixRef ( const nsize_type & matrixSize,
const nstride_type & matrixStride,
pointer dataPointer )
inline

◆ vctDynamicMatrixRef() [6/12]

template<class _elementType>
vctDynamicMatrixRef< _elementType >::vctDynamicMatrixRef ( size_type rows,
size_type cols,
pointer dataPointer,
bool storageOrder = VCT_DEFAULT_STORAGE )
inline

Constructor requiring the user to provide the size of the matrix (number of rows and columns), a pointer on the first element and the desired storage order. If the storage order is omitted, the default is used (row major).

◆ vctDynamicMatrixRef() [7/12]

template<class _elementType>
vctDynamicMatrixRef< _elementType >::vctDynamicMatrixRef ( const nsize_type & matrixSize,
pointer dataPointer,
bool storageOrder = VCT_DEFAULT_STORAGE )
inline

◆ vctDynamicMatrixRef() [8/12]

template<class _elementType>
template<size_type __rows, size_type __cols, stride_type __rowStride, stride_type __colStride, typename __dataPtrType>
vctDynamicMatrixRef< _elementType >::vctDynamicMatrixRef ( vctFixedSizeMatrixBase< __rows, __cols, __rowStride, __colStride, _elementType, __dataPtrType > & otherMatrix)
inline

Construct a dynamic reference to a fixed-size matrix.

Note
the strides of this reference will be identical to the strides of the input matrix. For a more advanced access, customize the parameters yourself (see the other ctors).

◆ vctDynamicMatrixRef() [9/12]

template<class _elementType>
template<size_type __rows, size_type __cols, stride_type __rowStride, stride_type __colStride, typename __dataPtrType>
vctDynamicMatrixRef< _elementType >::vctDynamicMatrixRef ( vctFixedSizeMatrixBase< __rows, __cols, __rowStride, __colStride, _elementType, __dataPtrType > & otherMatrix,
size_type startRow,
size_type startCol,
size_type rows,
size_type cols )
inline

Construct a dynamic reference to a fixed-size matrix.

Parameters
otherMatrixa fixed size matrix to which a reference is created.
startRowrow index of the position where the reference will start.
startColcolumn index of the position where the reference will start.
rowsthe number of rows being referenced
colsthe number of columns being referenced
Note
the strides of this reference will be identical to the strides of the input matrix. For a more advanced access, customize the parameters yourself (see the other ctors).

◆ vctDynamicMatrixRef() [10/12]

template<class _elementType>
template<class __ownerType>
vctDynamicMatrixRef< _elementType >::vctDynamicMatrixRef ( vctDynamicMatrixBase< __ownerType, _elementType > & otherMatrix)
inline

Construct a dynamic reference to a dynamic matrix.

Note
the strides of this reference will be identical to the strides of the input matrix. For a more advanced access, customize the parameters yourself (see the other ctors).

◆ vctDynamicMatrixRef() [11/12]

template<class _elementType>
template<class __ownerType>
vctDynamicMatrixRef< _elementType >::vctDynamicMatrixRef ( vctDynamicMatrixBase< __ownerType, _elementType > & otherMatrix,
size_type startRow,
size_type startCol,
size_type rows,
size_type cols )
inline

Construct a dynamic reference to a submatrix of a dynamic matrix.

Parameters
otherMatrixa dynamic matrix to which a reference is created.
startRowrow index of the position where the reference will start.
startColcolumn index of the position where the reference will start.
rowsthe number of rows being referenced
colsthe number of columns being referenced
Note
the strides of this reference will be identical to the strides of the input matrix. For a more advanced access, customize the parameters yourself (see the other ctors).

◆ vctDynamicMatrixRef() [12/12]

template<class _elementType>
template<class __ownerType>
vctDynamicMatrixRef< _elementType >::vctDynamicMatrixRef ( vctDynamicMatrixBase< __ownerType, _elementType > & otherMatrix,
const nsize_type & start,
const nsize_type & matrixSize )
inline

Member Function Documentation

◆ DeSerializeRaw()

template<class _elementType>
void vctDynamicMatrixRef< _elementType >::DeSerializeRaw ( std::istream & inputStream)
inline

Binary deserialization. This method can not resize the existing block of memory and will throw an exception is the sizes don't match.

◆ operator=() [1/5]

template<class _elementType>
ThisType & vctDynamicMatrixRef< _elementType >::operator= ( const ThisType & other)
inline

◆ operator=() [2/5]

template<class _elementType>
ThisType & vctDynamicMatrixRef< _elementType >::operator= ( const value_type & value)
inline

Assignement of a scalar to all elements. See also SetAll.

◆ operator=() [3/5]

template<class _elementType>
template<class __matrixOwnerType, typename __elementType>
ThisType & vctDynamicMatrixRef< _elementType >::operator= ( const vctDynamicConstMatrixBase< __matrixOwnerType, __elementType > & other)
inline

◆ operator=() [4/5]

template<class _elementType>
ThisType & vctDynamicMatrixRef< _elementType >::operator= ( const vctDynamicConstMatrixRef< _elementType > & other)
inline

◆ operator=() [5/5]

template<class _elementType>
template<size_type __rows, size_type __cols, stride_type __rowStride, stride_type __colStride, typename __dataPtrType>
ThisType & vctDynamicMatrixRef< _elementType >::operator= ( const vctFixedSizeConstMatrixBase< __rows, __cols, __rowStride, __colStride, _elementType, __dataPtrType > & other)
inline

◆ SetRef() [1/10]

template<class _elementType>
void vctDynamicMatrixRef< _elementType >::SetRef ( const nsize_type & matrixSize,
const nstride_type & matrixStride,
pointer dataPointer )
inline

◆ SetRef() [2/10]

template<class _elementType>
void vctDynamicMatrixRef< _elementType >::SetRef ( const nsize_type & matrixSize,
stride_type rowStride,
stride_type colStride,
pointer dataPointer )
inline

◆ SetRef() [3/10]

template<class _elementType>
void vctDynamicMatrixRef< _elementType >::SetRef ( const nsize_type & sizes,
pointer dataPointer,
bool storageOrder = VCT_DEFAULT_STORAGE )
inline

◆ SetRef() [4/10]

template<class _elementType>
void vctDynamicMatrixRef< _elementType >::SetRef ( size_type rows,
size_type cols,
pointer dataPointer,
bool storageOrder = VCT_DEFAULT_STORAGE )
inline

Set a dynamic reference to a memory location. The user should specify the dimension, start memory address and desired storage order. This method assumes there is enough memory and will create a compact matrix reference.

◆ SetRef() [5/10]

template<class _elementType>
void vctDynamicMatrixRef< _elementType >::SetRef ( size_type rows,
size_type cols,
stride_type rowStride,
stride_type colStride,
pointer dataPointer )
inline

Set a dynamic reference to a memory location. The user should specify all the parameters of the referenced memory, including a start memory address.

◆ SetRef() [6/10]

template<class _elementType>
template<class __ownerType>
void vctDynamicMatrixRef< _elementType >::SetRef ( vctDynamicMatrixBase< __ownerType, _elementType > & otherMatrix)
inline

Set a dynamic reference to a dynamic matrix. The reference will have identical dimensions and strides as the input matrix.

◆ SetRef() [7/10]

template<class _elementType>
template<class __ownerType>
void vctDynamicMatrixRef< _elementType >::SetRef ( vctDynamicMatrixBase< __ownerType, _elementType > & otherMatrix,
const nsize_type & start,
const nsize_type & matrixSize )
inline

◆ SetRef() [8/10]

template<class _elementType>
template<class __ownerType>
void vctDynamicMatrixRef< _elementType >::SetRef ( vctDynamicMatrixBase< __ownerType, _elementType > & otherMatrix,
size_type startRow,
size_type startCol,
size_type rows,
size_type cols )
inline

Set a dynamic reference to a submatrix of a dynamic matrix.

Parameters
otherMatrixa dynamic matrix to which a reference is created.
startRowrow index of the position where the reference will start.
startColcolumn index of the position where the reference will start.
rowsthe number of rows being referenced
colsthe number of columns being referenced
Note
the strides of this reference will be identical to the strides of the input matrix. For a more advanced access, customize the parameters yourself (see the other SetRef methods).
This method verifies that the size of this matrix does not exceed the size of the input matrix (otherwise cmnThrow is used to throw std::out_of_range).

◆ SetRef() [9/10]

template<class _elementType>
template<size_type __rows, size_type __cols, stride_type __rowStride, stride_type __colStride, typename __dataPtrType>
void vctDynamicMatrixRef< _elementType >::SetRef ( vctFixedSizeMatrixBase< __rows, __cols, __rowStride, __colStride, _elementType, __dataPtrType > & otherMatrix)
inline

Set a dynamic reference to a fixed-size matrix. The reference will have identical dimensions and strides as the input matrix.

◆ SetRef() [10/10]

template<class _elementType>
template<size_type __rows, size_type __cols, stride_type __rowStride, stride_type __colStride, typename __dataPtrType>
void vctDynamicMatrixRef< _elementType >::SetRef ( vctFixedSizeMatrixBase< __rows, __cols, __rowStride, __colStride, _elementType, __dataPtrType > & otherMatrix,
size_type startRow,
size_type startCol,
size_type rows,
size_type cols )
inline

Set a dynamic reference to a submatrix of a fixed-size matrix.

Parameters
otherMatrixa fixed size matrix to which a reference is created.
startRowrow index of the position where the reference will start.
startColcolumn index of the position where the reference will start.
rowsthe number of rows being referenced
colsthe number of columns being referenced
Note
the strides of this reference will be identical to the strides of the input matrix. For a more advanced access, customize the parameters yourself (see the SetRef methods).
This method verifies that the size of this matrix does not exceed the size of the input matrix (otherwise cmnThrow is used to throw std::out_of_range).

◆ VCT_CONTAINER_TRAITS_TYPEDEFS()

template<class _elementType>
vctDynamicMatrixRef< _elementType >::VCT_CONTAINER_TRAITS_TYPEDEFS ( _elementType )

◆ VCT_NARRAY_TRAITS_TYPEDEFS()

template<class _elementType>
vctDynamicMatrixRef< _elementType >::VCT_NARRAY_TRAITS_TYPEDEFS ( DIMENSION )

The documentation for this class was generated from the following file: