cisst-saw
Loading...
Searching...
No Matches
vctDynamicMatrixBase< _matrixOwnerType, _elementType > Class Template Reference

#include <vctDynamicMatrixBase.h>

Inheritance diagram for vctDynamicMatrixBase< _matrixOwnerType, _elementType >:
vctDynamicConstMatrixBase< _matrixOwnerType, _elementType > vctDynamicMatrixRef< value_type >

Classes

class  Submatrix

Public Types

typedef vctDynamicMatrixBase ThisType
typedef vctDynamicConstMatrixBase< _matrixOwnerType, _elementType > BaseType
typedef _matrixOwnerType 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)
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
Row and column references.
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)
template<class __inputMatrixOwnerType, class __indexVectorOwnerType>
void SelectRowsFrom (const vctDynamicConstMatrixBase< __inputMatrixOwnerType, _elementType > &inputMatrix, const vctDynamicConstVectorBase< __indexVectorOwnerType, index_type > &rowIndexVector)
template<class __inputMatrixOwnerType, class __indexVectorOwnerType>
void SelectColsFrom (const vctDynamicConstMatrixBase< __inputMatrixOwnerType, _elementType > &inputMatrix, const vctDynamicConstVectorBase< __indexVectorOwnerType, index_type > &colIndexVector)
template<class __matrixOwnerType>
void RowPermutationOf (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &inputMatrix, const index_type permutedRowIndexes[])
template<class __matrixOwnerType>
void RowInversePermutationOf (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &inputMatrix, const index_type permutedRowIndexes[])
template<class __matrixOwnerType>
void ColumnPermutationOf (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &inputMatrix, const index_type permutedColumnIndexes[])
template<class __matrixOwnerType>
void ColumnInversePermutationOf (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &inputMatrix, const index_type permutedColumnIndexes[])
value_type SetAll (const value_type value)
bool Zeros (void)
Assignment operation between matrices containing the same data type but different owners
Parameters
otherThe matrix to be copied.
template<class __matrixOwnerType>
ThisTypeAssign (const vctDynamicConstMatrixBase< __matrixOwnerType, value_type > &other)
Assignment operation between matrices of different types.
Parameters
otherThe matrix to be copied.
template<class __matrixOwnerType, typename __elementType>
ThisTypeAssign (const vctDynamicConstMatrixBase< __matrixOwnerType, __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, class __elementType, class __dataPtrType>
ThisTypeAssign (const vctFixedSizeConstMatrixBase< __rows, __cols, __rowStride, __colStride, __elementType, __dataPtrType > &other)
Forced assignment operation between matrices of

different types. This method will use SetSize on the destination matrix (this matrix) to make sure the assignment will work. It is important to note that if the sizes don't match, memory for this matrix will be re-allocated. If the program has previously created some references (as in vctDynamic{Const}MatrixRef) on this matrix, they will become invalid.

Note
For a non-reallocating Assign, it is recommended to use the Assign() methods.
If the destination matrix doesn't have the same size as the source and can not be resized, an exception will be thrown by the Assign method called internally.
This method is provided for both fixed size and dynamic matrices for API consistency (usable in templated code). There is obviously not resize involved on fixed size matrices.
Parameters
otherThe matrix to be copied.
template<class __matrixOwnerType, typename __elementType>
ThisTypeForceAssign (const vctDynamicConstMatrixBase< __matrixOwnerType, __elementType > &other)
template<size_type __rows, size_type __cols, stride_type __rowStride, stride_type __colStride, class __elementType, class __dataPtrType>
ThisTypeForceAssign (const vctFixedSizeConstMatrixBase< __rows, __cols, __rowStride, __colStride, __elementType, __dataPtrType > &other)
template<class __matrixOwnerType>
bool FastCopyOf (const vctDynamicConstMatrixBase< __matrixOwnerType, value_type > &source, bool performSafetyChecks=vctFastCopy::PerformChecks) CISST_THROW(std
template<size_type __rows, size_type __cols, stride_type __rowStride, stride_type __colStride, class __dataPtrType>
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
Binary elementwise operations between two matrices.

Store the result of op(this, otherMatrix) back to this matrix.

template<class __matrixOwnerType1, class __matrixOwnerType2>
ThisTypeSumOf (const vctDynamicConstMatrixBase< __matrixOwnerType1, _elementType > &matrix1, const vctDynamicConstMatrixBase< __matrixOwnerType2, _elementType > &matrix2)
template<class __matrixOwnerType1, class __matrixOwnerType2>
ThisTypeDifferenceOf (const vctDynamicConstMatrixBase< __matrixOwnerType1, _elementType > &matrix1, const vctDynamicConstMatrixBase< __matrixOwnerType2, _elementType > &matrix2)
template<class __matrixOwnerType1, class __matrixOwnerType2>
ThisTypeElementwiseProductOf (const vctDynamicConstMatrixBase< __matrixOwnerType1, _elementType > &matrix1, const vctDynamicConstMatrixBase< __matrixOwnerType2, _elementType > &matrix2)
template<class __matrixOwnerType1, class __matrixOwnerType2>
ThisTypeElementwiseRatioOf (const vctDynamicConstMatrixBase< __matrixOwnerType1, _elementType > &matrix1, const vctDynamicConstMatrixBase< __matrixOwnerType2, _elementType > &matrix2)
template<class __matrixOwnerType1, class __matrixOwnerType2>
ThisTypeElementwiseMinOf (const vctDynamicConstMatrixBase< __matrixOwnerType1, _elementType > &matrix1, const vctDynamicConstMatrixBase< __matrixOwnerType2, _elementType > &matrix2)
template<class __matrixOwnerType1, class __matrixOwnerType2>
ThisTypeElementwiseMaxOf (const vctDynamicConstMatrixBase< __matrixOwnerType1, _elementType > &matrix1, const vctDynamicConstMatrixBase< __matrixOwnerType2, _elementType > &matrix2)
template<class __matrixOwnerType>
ThisTypeAdd (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix)
template<class __matrixOwnerType>
ThisTypeSubtract (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix)
template<class __matrixOwnerType>
ThisTypeElementwiseMultiply (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix)
template<class __matrixOwnerType>
ThisTypeElementwiseDivide (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix)
template<class __matrixOwnerType>
ThisTypeElementwiseMin (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix)
template<class __matrixOwnerType>
ThisTypeElementwiseMax (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix)
template<class __matrixOwnerType>
ThisTypeoperator+= (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix)
template<class __matrixOwnerType>
ThisTypeoperator-= (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix)
Binary elementwise operations a matrix and a scalar.

Store the result of op(matrix, scalar) to a third matrix.

template<class __matrixOwnerType>
ThisTypeSumOf (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix, const value_type scalar)
template<class __matrixOwnerType>
ThisTypeDifferenceOf (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix, const value_type scalar)
template<class __matrixOwnerType>
ThisTypeProductOf (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix, const value_type scalar)
template<class __matrixOwnerType>
ThisTypeRatioOf (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix, const value_type scalar)
template<class __matrixOwnerType>
ThisTypeClippedAboveOf (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix, const value_type lowerBound)
template<class __matrixOwnerType>
ThisTypeClippedBelowOf (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix, const value_type upperBound)
Binary elementwise operations a scalar and a matrix.

Store the result of op(scalar, matrix) to a third matrix.

template<class __matrixOwnerType>
ThisTypeSumOf (const value_type scalar, const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix)
template<class __matrixOwnerType>
ThisTypeDifferenceOf (const value_type scalar, const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix)
template<class __matrixOwnerType>
ThisTypeProductOf (const value_type scalar, const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix)
template<class __matrixOwnerType>
ThisTypeRatioOf (const value_type scalar, const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix)
template<class __matrixOwnerType>
ThisTypeClippedAboveOf (const value_type upperBound, const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix)
template<class __matrixOwnerType>
ThisTypeClippedBelowOf (const value_type lowerBound, const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &matrix)
Binary elementwise operations between a matrix and a scalar.

Store the result of op(this, scalar) back to this 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)
template<class __matrixOwnerType>
ThisTypeAddProductOf (const value_type scalar, const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix)
template<class __matrixOwnerType1, class __matrixOwnerType2>
ThisTypeAddElementwiseProductOf (const vctDynamicConstMatrixBase< __matrixOwnerType1, _elementType > &matrix1, const vctDynamicConstMatrixBase< __matrixOwnerType2, _elementType > &matrix2)
Unary elementwise operations.

Store the result of op(matrix) to another matrix.

template<class __matrixOwnerType>
ThisTypeAbsOf (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix)
template<class __matrixOwnerType>
ThisTypeNegationOf (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix)
template<class __matrixOwnerType>
ThisTypeFloorOf (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix)
template<class __matrixOwnerType>
ThisTypeCeilOf (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix)
template<class __matrixOwnerType>
ThisTypeTransposeOf (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix)
Store back unary elementwise operations.

Store the result of op(this) to this matrix.

ThisTypeAbsSelf (void)
ThisTypeNegationSelf (void)
ThisTypeFloorSelf (void)
ThisTypeCeilSelf (void)
template<class __matrixOwnerType1, class __matrixOwnerType2>
void ProductOf (const vctDynamicConstMatrixBase< __matrixOwnerType1, _elementType > &matrix1, const vctDynamicConstMatrixBase< __matrixOwnerType2, _elementType > &matrix2)
template<class __vectorOwnerType1, class __vectorOwnerType2>
void OuterProductOf (const vctDynamicConstVectorBase< __vectorOwnerType1, _elementType > &colVector, const vctDynamicConstVectorBase< __vectorOwnerType2, _elementType > &rowVector)

Detailed Description

template<class _matrixOwnerType, typename _elementType>
class vctDynamicMatrixBase< _matrixOwnerType, _elementType >

This class provides all the const methods inherited from vctConstMatrixBase, and extends them with non-const methods, such as SumOf.

See also
vctDynamicConstMatrixBase

Member Typedef Documentation

◆ BaseType

template<class _matrixOwnerType, typename _elementType>
typedef vctDynamicConstMatrixBase<_matrixOwnerType, _elementType> vctDynamicMatrixBase< _matrixOwnerType, _elementType >::BaseType

Type of the base class.

◆ ColumnRefType

template<class _matrixOwnerType, typename _elementType>
typedef BaseType::ColumnRefType vctDynamicMatrixBase< _matrixOwnerType, _elementType >::ColumnRefType

◆ const_iterator

template<class _matrixOwnerType, typename _elementType>
typedef BaseType::const_iterator vctDynamicMatrixBase< _matrixOwnerType, _elementType >::const_iterator

◆ const_reverse_iterator

template<class _matrixOwnerType, typename _elementType>
typedef BaseType::const_reverse_iterator vctDynamicMatrixBase< _matrixOwnerType, _elementType >::const_reverse_iterator

◆ ConstColumnRefType

template<class _matrixOwnerType, typename _elementType>
typedef BaseType::ConstColumnRefType vctDynamicMatrixBase< _matrixOwnerType, _elementType >::ConstColumnRefType

◆ ConstDiagonalRefType

template<class _matrixOwnerType, typename _elementType>
typedef BaseType::ConstDiagonalRefType vctDynamicMatrixBase< _matrixOwnerType, _elementType >::ConstDiagonalRefType

◆ ConstRefTransposeType

template<class _matrixOwnerType, typename _elementType>
typedef BaseType::ConstRefTransposeType vctDynamicMatrixBase< _matrixOwnerType, _elementType >::ConstRefTransposeType

◆ ConstRowRefType

template<class _matrixOwnerType, typename _elementType>
typedef BaseType::ConstRowRefType vctDynamicMatrixBase< _matrixOwnerType, _elementType >::ConstRowRefType

◆ ConstVectorPointerType

template<class _matrixOwnerType, typename _elementType>
typedef BaseType::ConstVectorPointerType vctDynamicMatrixBase< _matrixOwnerType, _elementType >::ConstVectorPointerType

◆ DiagonalRefType

template<class _matrixOwnerType, typename _elementType>
typedef BaseType::DiagonalRefType vctDynamicMatrixBase< _matrixOwnerType, _elementType >::DiagonalRefType

◆ iterator

template<class _matrixOwnerType, typename _elementType>
typedef BaseType::iterator vctDynamicMatrixBase< _matrixOwnerType, _elementType >::iterator

◆ OwnerType

template<class _matrixOwnerType, typename _elementType>
typedef _matrixOwnerType vctDynamicMatrixBase< _matrixOwnerType, _elementType >::OwnerType

◆ RefTransposeType

template<class _matrixOwnerType, typename _elementType>
typedef BaseType::RefTransposeType vctDynamicMatrixBase< _matrixOwnerType, _elementType >::RefTransposeType

◆ reverse_iterator

template<class _matrixOwnerType, typename _elementType>
typedef BaseType::reverse_iterator vctDynamicMatrixBase< _matrixOwnerType, _elementType >::reverse_iterator

◆ RowRefType

template<class _matrixOwnerType, typename _elementType>
typedef BaseType::RowRefType vctDynamicMatrixBase< _matrixOwnerType, _elementType >::RowRefType

◆ ThisType

template<class _matrixOwnerType, typename _elementType>
typedef vctDynamicMatrixBase vctDynamicMatrixBase< _matrixOwnerType, _elementType >::ThisType

◆ VectorPointerType

template<class _matrixOwnerType, typename _elementType>
typedef BaseType::VectorPointerType vctDynamicMatrixBase< _matrixOwnerType, _elementType >::VectorPointerType

Member Function Documentation

◆ AbsOf()

template<class _matrixOwnerType, typename _elementType>
template<class __matrixOwnerType>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::AbsOf ( const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > & otherMatrix)
inline

Unary elementwise operations on a matrix. For each element of the matrix "this", performs \( this[i] \leftarrow op(otherMatrix[i])\) where \(op\) can calculate the absolute value (AbsOf), the opposite (NegationOf) or the transpose (TransposeOf).

Parameters
otherMatrixThe operand of the unary operation.
Returns
The matrix "this" modified.

◆ AbsSelf()

template<class _matrixOwnerType, typename _elementType>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::AbsSelf ( void )
inline

Unary elementwise operations on a matrix. For each element of the matrix "this", performs \( this[i] \leftarrow op(this[i])\) where \(op\) can calculate the absolute value (AbsSelf) or the opposite (NegationSelf).

Returns
The matrix "this" modified.

◆ Add() [1/2]

template<class _matrixOwnerType, typename _elementType>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::Add ( const value_type scalar)
inline

Store back binary elementwise operations between a matrix and a scalar. For each element of the matrix "this", performs \(this[i] \leftarrow op(this[i], scalar)\) where \(op\) is either an addition (Add), a subtraction (Subtract), a multiplication (Multiply), a division (Divide), a minimum (ClipAbove) or a maximum (ClipBelow).

Parameters
scalarThe second operand of the binary operation (this[i] is the first operand.
Returns
The matrix "this" modified.

◆ Add() [2/2]

template<class _matrixOwnerType, typename _elementType>
template<class __matrixOwnerType>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::Add ( const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > & otherMatrix)
inline

Store back binary elementwise operations between two matrices. For each element of the matrices, performs \(this[i] \leftarrow op(this[i], otherMatrix[i])\) where \(op\) is either an addition (Add), a subtraction (Subtraction), a multiplication (ElementwiseMultiply) a division (ElementwiseDivide), a minimization (ElementwiseMin) or a maximisation (ElementwiseMax).

Parameters
otherMatrixThe second operand of the binary operation (this[i] is the first operand)
Returns
The matrix "this" modified.

◆ AddElementwiseProductOf()

template<class _matrixOwnerType, typename _elementType>
template<class __matrixOwnerType1, class __matrixOwnerType2>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::AddElementwiseProductOf ( const vctDynamicConstMatrixBase< __matrixOwnerType1, _elementType > & matrix1,
const vctDynamicConstMatrixBase< __matrixOwnerType2, _elementType > & matrix2 )
inline

◆ AddProductOf()

template<class _matrixOwnerType, typename _elementType>
template<class __matrixOwnerType>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::AddProductOf ( const value_type scalar,
const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > & otherMatrix )
inline

◆ Assign() [1/5]

template<class _matrixOwnerType, typename _elementType>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::Assign ( const value_type * elements,
bool inputIsRowMajor = true )
inline

Assign to this matrix values from a C array given as a pointer to value_type. The purpose of this method is to simplify the syntax by not necessitating the creation of an explicit matrix for the given array. However, we only provide this method for an array of value_type. For arrays of other types a matrix still needs to be declared.

Parameters
elementsa pointer to a C array of elements to be assigned to this matrix.
inputIsRowMajora flag indicating the storage order of the elements in the input array.
Note
For lack of better knowledge, this method assumes that the input array is packed, that is, that all the elements are stored in a contiguous memory block with no gaps. The only existing options now relate to the storage order of the input elements. If the input is not packed, you should create a MatrixRef explicitly, with stride specifications, or use other tricks.
Returns
a reference to this object.

◆ Assign() [2/5]

template<class _matrixOwnerType, typename _elementType>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::Assign ( const value_type element0,
... )
inline

Assign to this matrix a set of values provided as independent arguments, by using cstdarg macros, that is, an unspecified number of arguments. This operation assumes that all the arguments are of type value_type, and that their number is equal to the size of the matrix. The arguments are passed by value. The user may need to explicitly cast the parameters to value_type to avoid runtime bugs and errors. The order of the paramaters is row first which allows to keep the code pretty intuitive:

matrix.Assign( 0.0, 1.0,
-1.0, 0.0);
Returns
a reference to this matrix.

◆ Assign() [3/5]

template<class _matrixOwnerType, typename _elementType>
template<class __matrixOwnerType, typename __elementType>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::Assign ( const vctDynamicConstMatrixBase< __matrixOwnerType, __elementType > & other)
inline

◆ Assign() [4/5]

template<class _matrixOwnerType, typename _elementType>
template<class __matrixOwnerType>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::Assign ( const vctDynamicConstMatrixBase< __matrixOwnerType, value_type > & other)
inline

◆ Assign() [5/5]

template<class _matrixOwnerType, typename _elementType>
template<size_type __rows, size_type __cols, stride_type __rowStride, stride_type __colStride, class __elementType, class __dataPtrType>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::Assign ( const vctFixedSizeConstMatrixBase< __rows, __cols, __rowStride, __colStride, __elementType, __dataPtrType > & other)
inline

◆ at() [1/4]

template<class _matrixOwnerType, typename _elementType>
reference vctDynamicMatrixBase< _matrixOwnerType, _elementType >::at ( size_type index)
inline

Access an element by index (const). Compare with std::vector::at. This method can be a handy substitute for the overloaded operator [] when operator overloading is unavailable or inconvenient.

Returns
a non-const reference to element[index]

◆ at() [2/4]

template<class _matrixOwnerType, typename _elementType>
const_reference vctDynamicMatrixBase< _matrixOwnerType, _elementType >::at ( size_type index) const
inline

◆ at() [3/4]

template<class _matrixOwnerType, typename _elementType>
reference vctDynamicMatrixBase< _matrixOwnerType, _elementType >::at ( size_type rowIndex,
size_type colIndex )
inline

Access an element by index. Compare with std::vector::at(). This method can be a handy substitute for the overloaded operator () when operator overloading is unavailable or inconvenient.

Returns
a reference to the element at rowIndex, colIndex

◆ at() [4/4]

template<class _matrixOwnerType, typename _elementType>
const_reference vctDynamicMatrixBase< _matrixOwnerType, _elementType >::at ( size_type rowIndex,
size_type colIndex ) const
inline

◆ begin() [1/2]

template<class _matrixOwnerType, typename _elementType>
iterator vctDynamicMatrixBase< _matrixOwnerType, _elementType >::begin ( void )
inline

Returns an iterator on the first element (STL compatibility).

◆ begin() [2/2]

template<class _matrixOwnerType, typename _elementType>
const_iterator vctDynamicMatrixBase< _matrixOwnerType, _elementType >::begin ( void ) const
inline

◆ CeilOf()

template<class _matrixOwnerType, typename _elementType>
template<class __matrixOwnerType>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::CeilOf ( const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > & otherMatrix)
inline

◆ CeilSelf()

template<class _matrixOwnerType, typename _elementType>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::CeilSelf ( void )
inline

◆ ClipAbove()

template<class _matrixOwnerType, typename _elementType>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::ClipAbove ( const value_type upperBound)
inline

◆ ClipBelow()

template<class _matrixOwnerType, typename _elementType>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::ClipBelow ( const value_type lowerBound)
inline

◆ ClippedAboveOf() [1/2]

template<class _matrixOwnerType, typename _elementType>
template<class __matrixOwnerType>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::ClippedAboveOf ( const value_type upperBound,
const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > & matrix )
inline

◆ ClippedAboveOf() [2/2]

template<class _matrixOwnerType, typename _elementType>
template<class __matrixOwnerType>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::ClippedAboveOf ( const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > & matrix,
const value_type lowerBound )
inline

◆ ClippedBelowOf() [1/2]

template<class _matrixOwnerType, typename _elementType>
template<class __matrixOwnerType>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::ClippedBelowOf ( const value_type lowerBound,
const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > & matrix )
inline

◆ ClippedBelowOf() [2/2]

template<class _matrixOwnerType, typename _elementType>
template<class __matrixOwnerType>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::ClippedBelowOf ( const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > & matrix,
const value_type upperBound )
inline

◆ Column() [1/2]

template<class _matrixOwnerType, typename _elementType>
ColumnRefType vctDynamicMatrixBase< _matrixOwnerType, _elementType >::Column ( size_type index)
inline

Create a column reference.

◆ Column() [2/2]

template<class _matrixOwnerType, typename _elementType>
ConstColumnRefType vctDynamicMatrixBase< _matrixOwnerType, _elementType >::Column ( size_type index) const
inline

◆ ColumnInversePermutationOf()

template<class _matrixOwnerType, typename _elementType>
template<class __matrixOwnerType>
void vctDynamicMatrixBase< _matrixOwnerType, _elementType >::ColumnInversePermutationOf ( const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > & inputMatrix,
const index_type permutedColumnIndexes[] )
inline

Assign a permutation of the columns of the input matrix to the column of this matrix. Both matrices must have the same size.

Parameters
inputMatrixthe input matrix for the permutation.
permutedColumnIndexesan array of column indices. The assignment performed is: this->Column( permutedColumnIndexes[i] ) <– inputMatrix.Column(i).
Note
The current implementation does not validate that the input permuted indexes is an actual permutation of the numbers 0..(COLS-1). Nor does it assure that the input permutation array has the right size. Both are the caller's responsibility.
Do not use this method for an in-place permutation of the input matrix.

◆ ColumnPermutationOf()

template<class _matrixOwnerType, typename _elementType>
template<class __matrixOwnerType>
void vctDynamicMatrixBase< _matrixOwnerType, _elementType >::ColumnPermutationOf ( const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > & inputMatrix,
const index_type permutedColumnIndexes[] )
inline

Assign a permutation of the columns of the input matrix to the column of this matrix. Both matrices must have the same size.

Parameters
inputMatrixthe input matrix for the permutation.
permutedColumnIndexesan array of column indices. The assignment performed is: this->Column(i) <– inputMatrix.Column( permutedColumnIndexes[i] ).
Note
The current implementation does not validate that the input permuted indexes is an actual permutation of the numbers 0..(COLS-1). Nor does it assure that the input permutation array has the right size. Both are the caller's responsibility.
Do not use this method for an in-place permutation of the input matrix.

◆ Diagonal() [1/2]

template<class _matrixOwnerType, typename _elementType>
DiagonalRefType vctDynamicMatrixBase< _matrixOwnerType, _elementType >::Diagonal ( void )
inline

Create a non-const reference to the main diagonal of this matrix

◆ Diagonal() [2/2]

template<class _matrixOwnerType, typename _elementType>
ConstDiagonalRefType vctDynamicMatrixBase< _matrixOwnerType, _elementType >::Diagonal ( void ) const
inline

◆ DifferenceOf() [1/3]

template<class _matrixOwnerType, typename _elementType>
template<class __matrixOwnerType>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::DifferenceOf ( const value_type scalar,
const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > & matrix )
inline

◆ DifferenceOf() [2/3]

template<class _matrixOwnerType, typename _elementType>
template<class __matrixOwnerType>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::DifferenceOf ( const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > & matrix,
const value_type scalar )
inline

◆ DifferenceOf() [3/3]

template<class _matrixOwnerType, typename _elementType>
template<class __matrixOwnerType1, class __matrixOwnerType2>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::DifferenceOf ( const vctDynamicConstMatrixBase< __matrixOwnerType1, _elementType > & matrix1,
const vctDynamicConstMatrixBase< __matrixOwnerType2, _elementType > & matrix2 )
inline

◆ Divide()

template<class _matrixOwnerType, typename _elementType>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::Divide ( const value_type scalar)
inline

◆ Element() [1/2]

template<class _matrixOwnerType, typename _elementType>
reference vctDynamicMatrixBase< _matrixOwnerType, _elementType >::Element ( size_type rowIndex,
size_type colIndex )
inline

Access an element by indices (non const). This method allows to access an element without any bounds checking. It doesn't create any temporary row reference as a matrix[][] would do.

Returns
a reference to the element at rowIndex, colIndex

◆ Element() [2/2]

template<class _matrixOwnerType, typename _elementType>
const_reference vctDynamicMatrixBase< _matrixOwnerType, _elementType >::Element ( size_type rowIndex,
size_type colIndex ) const
inline

◆ ElementwiseDivide()

template<class _matrixOwnerType, typename _elementType>
template<class __matrixOwnerType>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::ElementwiseDivide ( const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > & otherMatrix)
inline

◆ ElementwiseMax()

template<class _matrixOwnerType, typename _elementType>
template<class __matrixOwnerType>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::ElementwiseMax ( const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > & otherMatrix)
inline

◆ ElementwiseMaxOf()

template<class _matrixOwnerType, typename _elementType>
template<class __matrixOwnerType1, class __matrixOwnerType2>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::ElementwiseMaxOf ( const vctDynamicConstMatrixBase< __matrixOwnerType1, _elementType > & matrix1,
const vctDynamicConstMatrixBase< __matrixOwnerType2, _elementType > & matrix2 )
inline

◆ ElementwiseMin()

template<class _matrixOwnerType, typename _elementType>
template<class __matrixOwnerType>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::ElementwiseMin ( const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > & otherMatrix)
inline

◆ ElementwiseMinOf()

template<class _matrixOwnerType, typename _elementType>
template<class __matrixOwnerType1, class __matrixOwnerType2>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::ElementwiseMinOf ( const vctDynamicConstMatrixBase< __matrixOwnerType1, _elementType > & matrix1,
const vctDynamicConstMatrixBase< __matrixOwnerType2, _elementType > & matrix2 )
inline

◆ ElementwiseMultiply()

template<class _matrixOwnerType, typename _elementType>
template<class __matrixOwnerType>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::ElementwiseMultiply ( const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > & otherMatrix)
inline

◆ ElementwiseProductOf()

template<class _matrixOwnerType, typename _elementType>
template<class __matrixOwnerType1, class __matrixOwnerType2>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::ElementwiseProductOf ( const vctDynamicConstMatrixBase< __matrixOwnerType1, _elementType > & matrix1,
const vctDynamicConstMatrixBase< __matrixOwnerType2, _elementType > & matrix2 )
inline

◆ ElementwiseRatioOf()

template<class _matrixOwnerType, typename _elementType>
template<class __matrixOwnerType1, class __matrixOwnerType2>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::ElementwiseRatioOf ( const vctDynamicConstMatrixBase< __matrixOwnerType1, _elementType > & matrix1,
const vctDynamicConstMatrixBase< __matrixOwnerType2, _elementType > & matrix2 )
inline

◆ end() [1/2]

template<class _matrixOwnerType, typename _elementType>
iterator vctDynamicMatrixBase< _matrixOwnerType, _elementType >::end ( void )
inline

Returns an iterator on the last element (STL compatibility).

◆ end() [2/2]

template<class _matrixOwnerType, typename _elementType>
const_iterator vctDynamicMatrixBase< _matrixOwnerType, _elementType >::end ( void ) const
inline

◆ ExchangeColumns()

template<class _matrixOwnerType, typename _elementType>
void vctDynamicMatrixBase< _matrixOwnerType, _elementType >::ExchangeColumns ( const size_type col1Index,
const size_type col2Index )
inline

Exchange two colums of the matrix

◆ ExchangeRows()

template<class _matrixOwnerType, typename _elementType>
void vctDynamicMatrixBase< _matrixOwnerType, _elementType >::ExchangeRows ( const size_type row1Index,
const size_type row2Index )
inline

Exchange two rows of the matrix

◆ FastCopyOf() [1/2]

template<class _matrixOwnerType, typename _elementType>
template<class __matrixOwnerType>
bool vctDynamicMatrixBase< _matrixOwnerType, _elementType >::FastCopyOf ( const vctDynamicConstMatrixBase< __matrixOwnerType, value_type > & source,
bool performSafetyChecks = vctFastCopy::PerformChecks )
inline

Fast copy. This method uses memcpy whenever it is possible to perform a fast copy from another matrix to this matrix.

  • The method will first verify that the source and destination have the same size (rows and columns) and throws an exception otherwise (std::runtime_error). See cmnThrow for details.
  • If any of the two matrices is not compact or if the two matrices use a different storage order, this method will return false. If both matrices are compact and use the same storage order, a single memcpy is performed and the method returns true.
  • If the two matrices are compact by row or column, this method will use multiple calls to memcpy, i.e. one per row or column and the method returns true
  • To avoid the tests above, one can set the parameter performSafetyChecks to vctFastCopy::SkipChecks (boolean defined false). This should be used only when the programmer knows for sure that the source and destination are compatible (size, storage order and compactness).
  • As opposed to Assign, this method doesn't perform any type conversion.
  • Since no constructor is called for the contained elements, this function performs a "shallow copy". If the contained objects have a pointer as data member, the copied object will carry on the same pointer (hence pointing at the same memory block which could easily lead to bugs).

The basic and safe use of this method for a matrix would be:

if (!destination.FastCopyOf(source)) {
destination.Assign(source);
}

If the method is to be called many times (in a loop for example), it is recommended to check that the source and destination are compatible once and then use the option to turn off the different safety checks for each FastCopyOf.

bool canUseFastCopy = destination.FastCopyCompatible(source);
for (index = 0; index < 1000; index++) {
DoSomethingUseful(source);
if (canUseFastCopy) {
destination.FastCopyOf(source, vctFastCopy::SkipChecks); // Do not check again
} else {
destination.Assign(source);
}
}
static const bool SkipChecks
Definition vctFastCopy.h:118
size_t index_type
Definition vctContainerTraits.h:36

Finally, this method will work on either matrices which have allocated their memory of matrix references (such as vctDynamicMatrixRef). So, to copy a part of a matrix, the programmer can do:

typedef unsigned short PixelType;
vctDynamicMatrixRef<PixelType> upperLeftRef(image, 0, 0, 320, 240);
// use FastCopyCompatible to make sure the sizes and strides match
// and then use FastCopyOf without the safety checks
working.FastCopyOf(upperLeft, vctFastCopy::SkipChecks);
Definition vctForwardDeclarations.h:157
Dynamic matrix referencing existing memory.
Definition vctDynamicMatrixRef.h:75
const bool VCT_ROW_MAJOR
Definition vctForwardDeclarations.h:41
Parameters
sourceMatrix used to set the content of this matrix.
performSafetyChecksFlag set to false to avoid safety checks, use with extreme caution. To make your code more readable use vctFastCopy::SkipChecks or vctFastCopy::PerformChecks.

◆ FastCopyOf() [2/2]

template<class _matrixOwnerType, typename _elementType>
template<size_type __rows, size_type __cols, stride_type __rowStride, stride_type __colStride, class __dataPtrType>
bool vctDynamicMatrixBase< _matrixOwnerType, _elementType >::FastCopyOf ( const vctFixedSizeConstMatrixBase< __rows, __cols, __rowStride, __colStride, value_type, __dataPtrType > & source,
bool performSafetyChecks = vctFastCopy::PerformChecks )
inline

◆ FloorOf()

template<class _matrixOwnerType, typename _elementType>
template<class __matrixOwnerType>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::FloorOf ( const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > & otherMatrix)
inline

◆ FloorSelf()

template<class _matrixOwnerType, typename _elementType>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::FloorSelf ( void )
inline

◆ ForceAssign() [1/2]

template<class _matrixOwnerType, typename _elementType>
template<class __matrixOwnerType, typename __elementType>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::ForceAssign ( const vctDynamicConstMatrixBase< __matrixOwnerType, __elementType > & other)
inline

◆ ForceAssign() [2/2]

template<class _matrixOwnerType, typename _elementType>
template<size_type __rows, size_type __cols, stride_type __rowStride, stride_type __colStride, class __elementType, class __dataPtrType>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::ForceAssign ( const vctFixedSizeConstMatrixBase< __rows, __cols, __rowStride, __colStride, __elementType, __dataPtrType > & other)
inline

◆ Multiply()

template<class _matrixOwnerType, typename _elementType>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::Multiply ( const value_type scalar)
inline

◆ NegationOf()

template<class _matrixOwnerType, typename _elementType>
template<class __matrixOwnerType>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::NegationOf ( const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > & otherMatrix)
inline

◆ NegationSelf()

template<class _matrixOwnerType, typename _elementType>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::NegationSelf ( void )
inline

◆ operator()() [1/2]

template<class _matrixOwnerType, typename _elementType>
reference vctDynamicMatrixBase< _matrixOwnerType, _elementType >::operator() ( size_type rowIndex,
size_type colIndex )
inline

Overloaded operator () for simplified (non const) element access with bounds checking

◆ operator()() [2/2]

template<class _matrixOwnerType, typename _elementType>
const_reference vctDynamicMatrixBase< _matrixOwnerType, _elementType >::operator() ( size_type rowIndex,
size_type colIndex ) const
inline

◆ operator*=()

template<class _matrixOwnerType, typename _elementType>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::operator*= ( const value_type scalar)
inline

◆ operator+=() [1/2]

template<class _matrixOwnerType, typename _elementType>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::operator+= ( const value_type scalar)
inline

◆ operator+=() [2/2]

template<class _matrixOwnerType, typename _elementType>
template<class __matrixOwnerType>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::operator+= ( const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > & otherMatrix)
inline

◆ operator-=() [1/2]

template<class _matrixOwnerType, typename _elementType>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::operator-= ( const value_type scalar)
inline

◆ operator-=() [2/2]

template<class _matrixOwnerType, typename _elementType>
template<class __matrixOwnerType>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::operator-= ( const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > & otherMatrix)
inline

◆ operator/=()

template<class _matrixOwnerType, typename _elementType>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::operator/= ( const value_type scalar)
inline

◆ operator=()

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

◆ operator[]() [1/2]

template<class _matrixOwnerType, typename _elementType>
RowRefType vctDynamicMatrixBase< _matrixOwnerType, _elementType >::operator[] ( size_type index)
inline

Reference a row of this matrix by index.

Returns
a reference to the element[index]

◆ operator[]() [2/2]

template<class _matrixOwnerType, typename _elementType>
ConstRowRefType vctDynamicMatrixBase< _matrixOwnerType, _elementType >::operator[] ( size_type index) const
inline

◆ OuterProductOf()

template<class _matrixOwnerType, typename _elementType>
template<class __vectorOwnerType1, class __vectorOwnerType2>
void vctDynamicMatrixBase< _matrixOwnerType, _elementType >::OuterProductOf ( const vctDynamicConstVectorBase< __vectorOwnerType1, _elementType > & colVector,
const vctDynamicConstVectorBase< __vectorOwnerType2, _elementType > & rowVector )
inline

Compute the outer product of two vectors and store the result to this matrix. The outer product (v1*v2)[i,j] = v1[i] * v2[j]

◆ Owner() [1/2]

template<class _matrixOwnerType, typename _elementType>
OwnerType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::Owner ( void )
inline

◆ Owner() [2/2]

template<class _matrixOwnerType, typename _elementType>
const OwnerType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::Owner ( void ) const
inline

◆ Pointer() [1/4]

template<class _matrixOwnerType, typename _elementType>
pointer vctDynamicMatrixBase< _matrixOwnerType, _elementType >::Pointer ( size_type rowIndex,
size_type colIndex )
inline

Return a non const pointer to an element of the container, specified by its indices. Addition to the STL requirements.

◆ Pointer() [2/4]

template<class _matrixOwnerType, typename _elementType>
const_pointer vctDynamicMatrixBase< _matrixOwnerType, _elementType >::Pointer ( size_type rowIndex,
size_type colIndex ) const
inline

◆ Pointer() [3/4]

template<class _matrixOwnerType, typename _elementType>
pointer vctDynamicMatrixBase< _matrixOwnerType, _elementType >::Pointer ( void )
inline

Returns a non const pointer to the first element of the container. Addition to the STL requirements.

◆ Pointer() [4/4]

template<class _matrixOwnerType, typename _elementType>
const_pointer vctDynamicMatrixBase< _matrixOwnerType, _elementType >::Pointer ( void ) const
inline

◆ ProductOf() [1/3]

template<class _matrixOwnerType, typename _elementType>
template<class __matrixOwnerType>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::ProductOf ( const value_type scalar,
const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > & matrix )
inline

◆ ProductOf() [2/3]

template<class _matrixOwnerType, typename _elementType>
template<class __matrixOwnerType>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::ProductOf ( const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > & matrix,
const value_type scalar )
inline

◆ ProductOf() [3/3]

template<class _matrixOwnerType, typename _elementType>
template<class __matrixOwnerType1, class __matrixOwnerType2>
void vctDynamicMatrixBase< _matrixOwnerType, _elementType >::ProductOf ( const vctDynamicConstMatrixBase< __matrixOwnerType1, _elementType > & matrix1,
const vctDynamicConstMatrixBase< __matrixOwnerType2, _elementType > & matrix2 )
inline

Product of two matrices. If the sizes of the matrices don't match, an exception is thrown.

Parameters
matrix1The left operand of the binary operation.
matrix2The right operand of the binary operation.
Returns
The matrix "this" modified.

◆ RatioOf() [1/2]

template<class _matrixOwnerType, typename _elementType>
template<class __matrixOwnerType>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::RatioOf ( const value_type scalar,
const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > & matrix )
inline

◆ RatioOf() [2/2]

template<class _matrixOwnerType, typename _elementType>
template<class __matrixOwnerType>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::RatioOf ( const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > & matrix,
const value_type scalar )
inline

◆ rbegin() [1/2]

template<class _matrixOwnerType, typename _elementType>
reverse_iterator vctDynamicMatrixBase< _matrixOwnerType, _elementType >::rbegin ( void )
inline

Returns a reverse iterator on the last element (STL compatibility).

◆ rbegin() [2/2]

template<class _matrixOwnerType, typename _elementType>
const_reverse_iterator vctDynamicMatrixBase< _matrixOwnerType, _elementType >::rbegin ( void ) const
inline

◆ Ref() [1/2]

template<class _matrixOwnerType, typename _elementType>
vctDynamicMatrixRef< _elementType > vctDynamicMatrixBase< _matrixOwnerType, _elementType >::Ref ( const size_type rows,
const size_type cols,
const size_type startRow = 0,
const size_type startCol = 0 )
inline

Create a reference to a sub matrix

◆ Ref() [2/2]

template<class _matrixOwnerType, typename _elementType>
vctDynamicConstMatrixRef< _elementType > vctDynamicMatrixBase< _matrixOwnerType, _elementType >::Ref ( const size_type rows,
const size_type cols,
const size_type startRow = 0,
const size_type startCol = 0 ) const
inline

◆ rend() [1/2]

template<class _matrixOwnerType, typename _elementType>
reverse_iterator vctDynamicMatrixBase< _matrixOwnerType, _elementType >::rend ( void )
inline

Returns a reverse iterator on the element before first (STL compatibility).

◆ rend() [2/2]

template<class _matrixOwnerType, typename _elementType>
const_reverse_iterator vctDynamicMatrixBase< _matrixOwnerType, _elementType >::rend ( void ) const
inline

◆ Row() [1/2]

template<class _matrixOwnerType, typename _elementType>
RowRefType vctDynamicMatrixBase< _matrixOwnerType, _elementType >::Row ( size_type index)
inline

Create a row reference.

◆ Row() [2/2]

template<class _matrixOwnerType, typename _elementType>
ConstRowRefType vctDynamicMatrixBase< _matrixOwnerType, _elementType >::Row ( size_type index) const
inline

◆ RowInversePermutationOf()

template<class _matrixOwnerType, typename _elementType>
template<class __matrixOwnerType>
void vctDynamicMatrixBase< _matrixOwnerType, _elementType >::RowInversePermutationOf ( const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > & inputMatrix,
const index_type permutedRowIndexes[] )
inline

Assign a permutation of the rows of the input matrix to the rows of this matrix. Both matrices must have the same size.

Parameters
inputMatrixthe input matrix for the permutation.
permutedRowIndexesan array of row indices. The assignment performed is: this->Row( permutedRowIndexes[i] ) <– inputMatrix.Row(i).
Note
The current implementation does not validate that the input permuted indexes is an actual permutation of the numbers 0..(ROWS-1). Nor does it assure that the input permutation array has the right size. Both are the caller's responsibility.
Do not use this method for an in-place permutation of the input matrix.

◆ RowPermutationOf()

template<class _matrixOwnerType, typename _elementType>
template<class __matrixOwnerType>
void vctDynamicMatrixBase< _matrixOwnerType, _elementType >::RowPermutationOf ( const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > & inputMatrix,
const index_type permutedRowIndexes[] )
inline

Assign a permutation of the rows of the input matrix to the rows of this matrix. Both matrices must have the same size.

Parameters
inputMatrixthe input matrix for the permutation.
permutedRowIndexesan array of row indices. The assignment performed is: this->Row(i) <– inputMatrix.Row( permutedRowIndexes[i] ).
Note
The current implementation does not validate that the input permuted indexes is an actual permutation of the numbers 0..(ROWS-1). Nor does it assure that the input permutation array has the right size. Both are the caller's responsibility.
Do not use this method for an in-place permutation of the input matrix.

◆ RowPointers() [1/2]

template<class _matrixOwnerType, typename _elementType>
ConstVectorPointerType vctDynamicMatrixBase< _matrixOwnerType, _elementType >::RowPointers ( ConstVectorPointerType & rowPointers) const
inline

◆ RowPointers() [2/2]

template<class _matrixOwnerType, typename _elementType>
VectorPointerType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::RowPointers ( VectorPointerType & rowPointers)
inline

Resize and fill a vector of pointers on the rows of the matrix. This method is provided to ease the interfacing with C libraries using matrices stored as value_type**.

To use this method, one must first create a dynamic vector of pointers, update it with the RowPointers method and then call the C function:

vctDynamicMatrix<double> myMatrix = ...;
myMatrix.RowPointers(rowPointers);
c_function(rowPointers.Pointer());
Definition vctForwardDeclarations.h:131
Note
This method will throw an exception if the rows are not compact, i.e. if the column stride is not equal to 1.

◆ SelectColsFrom()

template<class _matrixOwnerType, typename _elementType>
template<class __inputMatrixOwnerType, class __indexVectorOwnerType>
void vctDynamicMatrixBase< _matrixOwnerType, _elementType >::SelectColsFrom ( const vctDynamicConstMatrixBase< __inputMatrixOwnerType, _elementType > & inputMatrix,
const vctDynamicConstVectorBase< __indexVectorOwnerType, index_type > & colIndexVector )
inline

Select a subset of columns from another matrix

◆ SelectRowsFrom()

template<class _matrixOwnerType, typename _elementType>
template<class __inputMatrixOwnerType, class __indexVectorOwnerType>
void vctDynamicMatrixBase< _matrixOwnerType, _elementType >::SelectRowsFrom ( const vctDynamicConstMatrixBase< __inputMatrixOwnerType, _elementType > & inputMatrix,
const vctDynamicConstVectorBase< __indexVectorOwnerType, index_type > & rowIndexVector )
inline

Select a subset of rows from another matrix

◆ SetAll()

template<class _matrixOwnerType, typename _elementType>
value_type vctDynamicMatrixBase< _matrixOwnerType, _elementType >::SetAll ( const value_type value)
inline

Assign the given value to all the elements.

Parameters
valuethe value used to set all the elements of the matrix
Returns
The value used to set all the elements

◆ Subtract() [1/2]

template<class _matrixOwnerType, typename _elementType>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::Subtract ( const value_type scalar)
inline

◆ Subtract() [2/2]

template<class _matrixOwnerType, typename _elementType>
template<class __matrixOwnerType>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::Subtract ( const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > & otherMatrix)
inline

◆ SumOf() [1/3]

template<class _matrixOwnerType, typename _elementType>
template<class __matrixOwnerType>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::SumOf ( const value_type scalar,
const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > & matrix )
inline

Binary elementwise operations between a scalar and a matrix. For each element of the matrix "this", performs \( this[i] \leftarrow op(scalar, matrix[i])\) where \(op\) is either an addition (SumOf), a subtraction (DifferenceOf), a multiplication (ProductOf), a division (RatioOf), a minimum (ClippedAboveOf) or a maximum (ClippedBelowOf).

Parameters
scalarThe first operand of the binary operation.
matrixThe second operand of the binary operation.
Returns
The matrix "this" modified.

◆ SumOf() [2/3]

template<class _matrixOwnerType, typename _elementType>
template<class __matrixOwnerType>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::SumOf ( const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > & matrix,
const value_type scalar )
inline

Binary elementwise operations between a matrix and a scalar. For each element of the matrix "this", performs \( this[i] \leftarrow op(matrix[i], scalar)\) where \(op\) is either an addition (SumOf), a subtraction (DifferenceOf), a multiplication (ProductOf), a division (RatioOf), a minimum (ClippedAboveOf) or a maximum (ClippedBelowOf).

Parameters
matrixThe first operand of the binary operation.
scalarThe second operand of the binary operation.
Returns
The matrix "this" modified.

◆ SumOf() [3/3]

template<class _matrixOwnerType, typename _elementType>
template<class __matrixOwnerType1, class __matrixOwnerType2>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::SumOf ( const vctDynamicConstMatrixBase< __matrixOwnerType1, _elementType > & matrix1,
const vctDynamicConstMatrixBase< __matrixOwnerType2, _elementType > & matrix2 )
inline

Binary elementwise operations between two matrices. For each element of the matrices, performs \( this[i] \leftarrow op(matrix1[i], matrix2[i])\) where \(op\) is either an addition (SumOf), a subtraction (DifferenceOf), a multiplication (ElementwiseProductOf), a division (ElementwiseRatioOf), a minimum (ElementwiseMinOf) or a maximum (ElementwiseMaxOf).

Parameters
matrix1The first operand of the binary operation
matrix2The second operand of the binary operation
Returns
The matrix "this" modified.

◆ TransposeOf()

template<class _matrixOwnerType, typename _elementType>
template<class __matrixOwnerType>
ThisType & vctDynamicMatrixBase< _matrixOwnerType, _elementType >::TransposeOf ( const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > & otherMatrix)
inline

◆ TransposeRef() [1/2]

template<class _matrixOwnerType, typename _elementType>
RefTransposeType vctDynamicMatrixBase< _matrixOwnerType, _elementType >::TransposeRef ( void )
inline

Return a transposed reference to this matrix.

◆ TransposeRef() [2/2]

template<class _matrixOwnerType, typename _elementType>
ConstRefTransposeType vctDynamicMatrixBase< _matrixOwnerType, _elementType >::TransposeRef ( void ) const
inline

◆ VCT_CONTAINER_TRAITS_TYPEDEFS()

template<class _matrixOwnerType, typename _elementType>
vctDynamicMatrixBase< _matrixOwnerType, _elementType >::VCT_CONTAINER_TRAITS_TYPEDEFS ( _elementType )

◆ Zeros()

template<class _matrixOwnerType, typename _elementType>
bool vctDynamicMatrixBase< _matrixOwnerType, _elementType >::Zeros ( void )
inline

Assign zero to all elements. This methods assumes that the element type has a zero and this zero value can be set using memset(0). If the matrix is not compact this method will use SetAll(0) and memset otherwise. This provides a slightly more efficent way to set all elements to zero.

Returns
true if the matrix is compact and memset was used, false otherwise.

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