|
| | 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) |
- Parameters
-
| other | The matrix to be copied. |
|
| ThisType & | operator= (const ThisType &other) |
| ThisType & | operator= (const vctDynamicConstMatrixRef< _elementType > &other) |
| template<class __matrixOwnerType, typename __elementType> |
| ThisType & | operator= (const vctDynamicConstMatrixBase< __matrixOwnerType, __elementType > &other) |
| template<size_type __rows, size_type __cols, stride_type __rowStride, stride_type __colStride, typename __dataPtrType> |
| ThisType & | operator= (const vctFixedSizeConstMatrixBase< __rows, __cols, __rowStride, __colStride, _elementType, __dataPtrType > &other) |
| ThisType & | operator= (const value_type &value) |
| void | DeSerializeRaw (std::istream &inputStream) CISST_THROW(std |
| | 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 OwnerType & | Owner (void) const |
| OwnerType & | Owner (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) |
| VectorPointerType & | RowPointers (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) |
| ThisType & | Assign (const vctDynamicConstMatrixBase< __matrixOwnerType, value_type > &other) |
| ThisType & | Assign (const vctDynamicConstMatrixBase< __matrixOwnerType, __elementType > &other) |
| ThisType & | operator= (const vctDynamicConstMatrixBase< __matrixOwnerType, __elementType > &other) |
| ThisType & | Assign (const vctFixedSizeConstMatrixBase< __rows, __cols, __rowStride, __colStride, __elementType, __dataPtrType > &other) |
| ThisType & | ForceAssign (const vctDynamicConstMatrixBase< __matrixOwnerType, __elementType > &other) |
| ThisType & | ForceAssign (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 |
| ThisType & | Assign (const value_type *elements, bool inputIsRowMajor=true) |
| ThisType & | Assign (const value_type element0,...) |
| RefTransposeType | TransposeRef (void) |
| ConstRefTransposeType | TransposeRef (void) const |
| ThisType & | SumOf (const vctDynamicConstMatrixBase< __matrixOwnerType1, _elementType > &matrix1, const vctDynamicConstMatrixBase< __matrixOwnerType2, _elementType > &matrix2) |
| ThisType & | DifferenceOf (const vctDynamicConstMatrixBase< __matrixOwnerType1, _elementType > &matrix1, const vctDynamicConstMatrixBase< __matrixOwnerType2, _elementType > &matrix2) |
| ThisType & | ElementwiseProductOf (const vctDynamicConstMatrixBase< __matrixOwnerType1, _elementType > &matrix1, const vctDynamicConstMatrixBase< __matrixOwnerType2, _elementType > &matrix2) |
| ThisType & | ElementwiseRatioOf (const vctDynamicConstMatrixBase< __matrixOwnerType1, _elementType > &matrix1, const vctDynamicConstMatrixBase< __matrixOwnerType2, _elementType > &matrix2) |
| ThisType & | ElementwiseMinOf (const vctDynamicConstMatrixBase< __matrixOwnerType1, _elementType > &matrix1, const vctDynamicConstMatrixBase< __matrixOwnerType2, _elementType > &matrix2) |
| ThisType & | ElementwiseMaxOf (const vctDynamicConstMatrixBase< __matrixOwnerType1, _elementType > &matrix1, const vctDynamicConstMatrixBase< __matrixOwnerType2, _elementType > &matrix2) |
| ThisType & | Add (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix) |
| ThisType & | Subtract (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix) |
| ThisType & | ElementwiseMultiply (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix) |
| ThisType & | ElementwiseDivide (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix) |
| ThisType & | ElementwiseMin (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix) |
| ThisType & | ElementwiseMax (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix) |
| ThisType & | operator+= (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix) |
| ThisType & | operator-= (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix) |
| ThisType & | SumOf (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix, const value_type scalar) |
| ThisType & | DifferenceOf (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix, const value_type scalar) |
| ThisType & | ProductOf (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix, const value_type scalar) |
| ThisType & | RatioOf (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix, const value_type scalar) |
| ThisType & | ClippedAboveOf (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix, const value_type lowerBound) |
| ThisType & | ClippedBelowOf (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix, const value_type upperBound) |
| ThisType & | SumOf (const value_type scalar, const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix) |
| ThisType & | DifferenceOf (const value_type scalar, const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix) |
| ThisType & | ProductOf (const value_type scalar, const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix) |
| ThisType & | RatioOf (const value_type scalar, const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix) |
| ThisType & | ClippedAboveOf (const value_type upperBound, const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix) |
| ThisType & | ClippedBelowOf (const value_type lowerBound, const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix) |
| ThisType & | Add (const value_type scalar) |
| ThisType & | Subtract (const value_type scalar) |
| ThisType & | Multiply (const value_type scalar) |
| ThisType & | Divide (const value_type scalar) |
| ThisType & | ClipAbove (const value_type upperBound) |
| ThisType & | ClipBelow (const value_type lowerBound) |
| ThisType & | operator+= (const value_type scalar) |
| ThisType & | operator-= (const value_type scalar) |
| ThisType & | operator*= (const value_type scalar) |
| ThisType & | operator/= (const value_type scalar) |
| ThisType & | AddProductOf (const value_type scalar, const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix) |
| ThisType & | AddElementwiseProductOf (const vctDynamicConstMatrixBase< __matrixOwnerType1, _elementType > &matrix1, const vctDynamicConstMatrixBase< __matrixOwnerType2, _elementType > &matrix2) |
| ThisType & | AbsOf (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix) |
| ThisType & | NegationOf (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix) |
| ThisType & | FloorOf (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix) |
| ThisType & | CeilOf (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix) |
| ThisType & | TransposeOf (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix) |
| ThisType & | AbsSelf (void) |
| ThisType & | NegationSelf (void) |
| ThisType & | FloorSelf (void) |
| ThisType & | CeilSelf (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) |
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:
first5x5.
SetRef(wholeMatrix, 0, 0, 5, 5);
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
-