#include <nmrIsOrthonormal.h>
Collaboration diagram for nmrIsOrthonormalDynamicData< _elementType >:

Any size mismatch will lead to an exception thrown (std::runtime_error). Since we are using cmnThrow, it is possible to configure cisst (at compilation time) to abort the program instead of throwing an exception.
The nmrIsOrthonormalDynamicData class allows 2 different configurations:
Definition at line 65 of file nmrIsOrthonormal.h.
| typedef vct::size_type nmrIsOrthonormalDynamicData< _elementType >::size_type |
Type used for sizes within nmrIsOrthonormalDynamicData.
Definition at line 69 of file nmrIsOrthonormal.h.
| nmrIsOrthonormalDynamicData< _elementType >::nmrIsOrthonormalDynamicData | ( | ) | [inline] |
The default constuctor. For dynamic size, there are assigned default values, i.e. sets all the dimensions to zero. These MUST be changed by calling the appropriate method.
Definition at line 198 of file nmrIsOrthonormal.h.
References nmrIsOrthonormalDynamicData< _elementType >::AllocateWorkspace().
| nmrIsOrthonormalDynamicData< _elementType >::nmrIsOrthonormalDynamicData | ( | size_type | m | ) | [inline] |
Constructor where the user specifies the size. Memory allocation is performed for the workspace. This should be used when the user doesn't need to share the workspace between different algorithms.
| m | Number of rows of the matrix to be decomposed. The matrix must be square. |
Definition at line 214 of file nmrIsOrthonormal.h.
References nmrIsOrthonormalDynamicData< _elementType >::Allocate().
| nmrIsOrthonormalDynamicData< _elementType >::nmrIsOrthonormalDynamicData | ( | const vctDynamicConstMatrixBase< __matrixOwnerTypeA, _elementType > & | A | ) | [inline] |
Constructor where the user provides the input matrix to specify the size. Memory allocation is performed for the workspace. This should be used when the user doesn't need to share the workspace between different algorithms.
| A | input matrix |
Definition at line 229 of file nmrIsOrthonormal.h.
References nmrIsOrthonormalDynamicData< _elementType >::Allocate().
| nmrIsOrthonormalDynamicData< _elementType >::nmrIsOrthonormalDynamicData | ( | const vctDynamicConstMatrixBase< __matrixOwnerTypeA, _elementType > & | A, | |
| vctDynamicVectorBase< __vectorOwnerTypeWorkspace, _elementType > & | inWorkspace | |||
| ) | [inline] |
Constructor where the user provides the input matrix to specify the size and storage order. There is no memory allocation performed in this case. This constructor should be used when the user cares wants to avoid allocating different workspaces for different numerical routines. Please note that since multiple routines can share the workspace, these routines must be called in a thread safe manner.
| A | input matrix | |
| inWorkspace | workspace |
Definition at line 248 of file nmrIsOrthonormal.h.
References nmrIsOrthonormalDynamicData< _elementType >::SetRef().
| void nmrIsOrthonormalDynamicData< _elementType >::SetDimension | ( | size_type | m | ) | [inline, protected] |
Private method to set the data member Size. This method must be called before AllocateWorkspace or ThrowUnlessWorkspaceSizeIsCorrect.
Definition at line 78 of file nmrIsOrthonormal.h.
References nmrIsOrthonormalDynamicData< _elementType >::Size.
Referenced by nmrIsOrthonormalDynamicData< _elementType >::Allocate(), and nmrIsOrthonormalDynamicData< _elementType >::SetRef().
| void nmrIsOrthonormalDynamicData< _elementType >::AllocateWorkspace | ( | bool | allocateWorkspace | ) | [inline, protected] |
Private method to allocate memory for the workspace if needed. This method assumes that the size of the problem has been set. It is important to use this method in all the methods provided in the user API, even if all the memory is provided by the user since this method will ensure that the data (nmrIsOrthonormalDynamicData) does not keep any memory allocated. This is for the case where a single data object is used first to allocate everything and, later on, used with user allocated memory (for either the workspace or the output). For example:
vctDynamicMatrix<double> A(20, 20); vctRandom(A, 10, 10); nmrIsOrthonormalDynamicData data(A); // allocate workspace vctDynamicVector<double> workspace(nmrIsOrthonormalDynamicData::WorkspaceSize(A)); data.SetRef(A, workspace); // after all, use my own workspace
Definition at line 103 of file nmrIsOrthonormal.h.
References nmrIsOrthonormalDynamicData< _elementType >::Size, nmrIsOrthonormalDynamicData< _elementType >::WorkspaceMemory, and nmrIsOrthonormalDynamicData< _elementType >::WorkspaceReference.
Referenced by nmrIsOrthonormalDynamicData< _elementType >::Allocate(), nmrIsOrthonormalDynamicData< _elementType >::nmrIsOrthonormalDynamicData(), and nmrIsOrthonormalDynamicData< _elementType >::SetRef().
| void nmrIsOrthonormalDynamicData< _elementType >::ThrowUnlessWorkspaceSizeIsCorrect | ( | vctDynamicVectorBase< __vectorOwnerTypeWorkspace, _elementType > & | inWorkspace | ) | const throw (std::runtime_error) [inline, protected] |
Verifies that the user provided references for the workspace match (or is greated than) the size of the data object as set by SetDimension. This method also checks that the workspace is compact.
Definition at line 122 of file nmrIsOrthonormal.h.
References cmnThrow(), and nmrIsOrthonormalDynamicData< _elementType >::Size.
Referenced by nmrIsOrthonormalDynamicData< _elementType >::SetRef().
| static size_type nmrIsOrthonormalDynamicData< _elementType >::WorkspaceSize | ( | size_type | m | ) | [inline, static] |
Helper methods for user to set minimum working space required for nmrIsOrthonormal.
| m | The number or rows of matrix to be tested. The matrix must be square. |
Definition at line 149 of file nmrIsOrthonormal.h.
Referenced by nmrIsOrthonormalDynamicData< _elementType >::WorkspaceSize().
| static size_type nmrIsOrthonormalDynamicData< _elementType >::WorkspaceSize | ( | const vctDynamicConstMatrixBase< __matrixOwnerTypeA, _elementType > & | A | ) | [inline, static] |
Helper methods for user to set minimum working space required for nmrIsOrthonormal.
| A | The matrix to be tested. A must be square. |
Definition at line 160 of file nmrIsOrthonormal.h.
References vctDynamicConstMatrixBase< _matrixOwnerType, _elementType >::rows(), and nmrIsOrthonormalDynamicData< _elementType >::WorkspaceSize().
| void nmrIsOrthonormalDynamicData< _elementType >::Allocate | ( | const vctDynamicConstMatrixBase< __matrixOwnerTypeA, _elementType > & | A | ) | [inline] |
This method allocates memory for the workspace. The input matrix is used only to determine the size of the problem.
This method should be called before the nmrIsOrthonormalDynamicData object is passed on to nmrIsOrthonormal function.
| A | The matrix to be used with nmrIsOrthonormal. |
Definition at line 264 of file nmrIsOrthonormal.h.
References vctDynamicConstMatrixBase< _matrixOwnerType, _elementType >::rows().
Referenced by nmrIsOrthonormal(), and nmrIsOrthonormalDynamicData< _elementType >::nmrIsOrthonormalDynamicData().
| void nmrIsOrthonormalDynamicData< _elementType >::SetRef | ( | const vctDynamicConstMatrixBase< __matrixOwnerTypeA, _elementType > & | A, | |
| vctDynamicVectorBase< __vectorOwnerTypeWorkspace, _elementType > & | inWorkspace | |||
| ) | [inline] |
This method uses the memory provided by user for workspace. The input matrix A is used to determine the size of the problem.
This method verifies that the workspace provided by the user is large enough and is compact.
| A | The matrix to be used with IsOrthonormal. | |
| inWorkspace | The vector used for workspace. |
Definition at line 279 of file nmrIsOrthonormal.h.
References nmrIsOrthonormalDynamicData< _elementType >::AllocateWorkspace(), vctDynamicConstMatrixBase< _matrixOwnerType, _elementType >::rows(), nmrIsOrthonormalDynamicData< _elementType >::SetDimension(), nmrIsOrthonormalDynamicData< _elementType >::ThrowUnlessWorkspaceSizeIsCorrect(), and nmrIsOrthonormalDynamicData< _elementType >::WorkspaceReference.
Referenced by nmrIsOrthonormal(), and nmrIsOrthonormalDynamicData< _elementType >::nmrIsOrthonormalDynamicData().
| void nmrIsOrthonormalDynamicData< _elementType >::Allocate | ( | size_type | m | ) | [inline] |
This method allocates the memory for the workspace. This method is not meant to be a top-level user API, but is used by other overloaded Allocate methods.
| m | Number of rows of input matrix A. A must be a square matrix. |
Definition at line 298 of file nmrIsOrthonormal.h.
References nmrIsOrthonormalDynamicData< _elementType >::AllocateWorkspace(), and nmrIsOrthonormalDynamicData< _elementType >::SetDimension().
vctDynamicVector<_elementType> nmrIsOrthonormalDynamicData< _elementType >::WorkspaceMemory [protected] |
Memory allocated for Workspace matrices if needed.
Definition at line 73 of file nmrIsOrthonormal.h.
Referenced by nmrIsOrthonormalDynamicData< _elementType >::AllocateWorkspace().
vctDynamicVectorRef<_elementType> nmrIsOrthonormalDynamicData< _elementType >::WorkspaceReference [protected] |
References to work or return types, these point either to user allocated memory or our memory chunks if needed.
Definition at line 136 of file nmrIsOrthonormal.h.
Referenced by nmrIsOrthonormalDynamicData< _elementType >::AllocateWorkspace(), and nmrIsOrthonormalDynamicData< _elementType >::SetRef().
size_type nmrIsOrthonormalDynamicData< _elementType >::Size [protected] |
Just store the size of the matrix, i.e. M * N.
Definition at line 139 of file nmrIsOrthonormal.h.
Referenced by nmrIsOrthonormalDynamicData< _elementType >::AllocateWorkspace(), nmrIsOrthonormal(), nmrIsOrthonormalDynamicData< _elementType >::SetDimension(), and nmrIsOrthonormalDynamicData< _elementType >::ThrowUnlessWorkspaceSizeIsCorrect().