|
|
This function computes the product of the matrix with its transpose then subtracts the identity and verifies that all elements are null within some tolerance.
This function is overloaded to be used with either a fixed size or a dynamic matrix (see vctFixedSizeMatrix and vctDynamicMatrix). Furthermore, it is possible to provide a workspace to store the product of the matrix and its transpose and avoid any undesired memory allocation:
-
The workspace can be provided using the dedicated classes nmrIsOrthonormalDynamicData and nmrIsOrthonormalFixedSizeData. The user has to create the data based on the matrix to be tested and then pass it to nmrIsOrthonormal:
int i; bool result;
for (i = 0; i < 100; i++) {
...
}
-
The workspace can be provided as a dynamic vector (vctDynamicVector) large enough to store the product of the matrix with its transpose:
-
If no workspace is provided the nmrIsOrthonormal function will allocate one for you. This might be more convenient for most users but one must be aware that a memory allocation has to be performed (stack allocation for fixed size matrices, dynamic allocation for dynamic matrices):
- Note
- For a dynamic matrix, the function will throw an exception is the matrix is not square (std::runtime_error).
-
The workspace needs to be compact and large enough otherwise nmrIsOrthonormal will throw an exception (std::runtime_error).
- See Also
- nmrIsOrthonormalDynamicData nmrIsOrthonormalFixedSizeData
|
template<vct::size_type _size, vct::stride_type _rowStride, vct::stride_type _colStride, typename _elementType , class _dataPtrType > |
bool | nmrIsOrthonormal (const vctFixedSizeConstMatrixBase< _size, _size, _rowStride, _colStride, _elementType, _dataPtrType > &A, nmrIsOrthonormalFixedSizeData< _elementType, _size > &data, _elementType tolerance=cmnTypeTraits< _elementType >::Tolerance()) |
|
template<vct::size_type _size, vct::stride_type _rowStride, vct::stride_type _colStride, typename _elementType , class _dataPtrType > |
bool | nmrIsOrthonormal (const vctFixedSizeConstMatrixBase< _size, _size, _rowStride, _colStride, _elementType, _dataPtrType > &A, _elementType tolerance=cmnTypeTraits< _elementType >::Tolerance()) |
|
template<class _matrixOwnerTypeA , class _elementType > |
bool | nmrIsOrthonormal (const vctDynamicConstMatrixBase< _matrixOwnerTypeA, _elementType > &A, nmrIsOrthonormalDynamicData< _elementType > &data, _elementType tolerance=cmnTypeTraits< _elementType >::Tolerance()) throw (std::runtime_error) |
|
template<class _matrixOwnerTypeA , typename _elementType > |
bool | nmrIsOrthonormal (const vctDynamicConstMatrixBase< _matrixOwnerTypeA, _elementType > &A, _elementType tolerance=cmnTypeTraits< _elementType >::Tolerance()) throw (std::runtime_error) |
|
template<class _matrixOwnerTypeA , class _vectorOwnerTypeWorkspace , typename _elementType > |
bool | nmrIsOrthonormal (const vctDynamicConstMatrixBase< _matrixOwnerTypeA, _elementType > &A, vctDynamicVectorBase< _vectorOwnerTypeWorkspace, _elementType > &workspace, _elementType tolerance=cmnTypeTraits< _elementType >::Tolerance()) throw (std::runtime_error) |
|
Declaration of functions nmrIsOrthonormal.