cisst-saw
|
Data (workspace) for nmrIsOrthonormal (Dynamic). More...
#include <nmrIsOrthonormal.h>
Classes | |
class | Friend |
Public Types | |
typedef vct::size_type | size_type |
Public Member Functions | |
nmrIsOrthonormalDynamicData () | |
nmrIsOrthonormalDynamicData (size_type m) | |
template<class __matrixOwnerTypeA > | |
nmrIsOrthonormalDynamicData (const vctDynamicConstMatrixBase< __matrixOwnerTypeA, _elementType > &A) | |
template<class __matrixOwnerTypeA , class __vectorOwnerTypeWorkspace > | |
nmrIsOrthonormalDynamicData (const vctDynamicConstMatrixBase< __matrixOwnerTypeA, _elementType > &A, vctDynamicVectorBase< __vectorOwnerTypeWorkspace, _elementType > &inWorkspace) | |
template<class __matrixOwnerTypeA > | |
void | Allocate (const vctDynamicConstMatrixBase< __matrixOwnerTypeA, _elementType > &A) |
template<class __matrixOwnerTypeA , class __vectorOwnerTypeWorkspace > | |
void | SetRef (const vctDynamicConstMatrixBase< __matrixOwnerTypeA, _elementType > &A, vctDynamicVectorBase< __vectorOwnerTypeWorkspace, _elementType > &inWorkspace) |
void | Allocate (size_type m) |
Static Public Member Functions | |
static size_type | WorkspaceSize (size_type m) |
template<class __matrixOwnerTypeA > | |
static size_type | WorkspaceSize (const vctDynamicConstMatrixBase< __matrixOwnerTypeA, _elementType > &A) |
Protected Member Functions | |
void | SetDimension (size_type m) |
void | AllocateWorkspace (bool allocateWorkspace) |
template<typename __vectorOwnerTypeWorkspace > | |
void | ThrowUnlessWorkspaceSizeIsCorrect (vctDynamicVectorBase< __vectorOwnerTypeWorkspace, _elementType > &inWorkspace) const throw (std::runtime_error) |
Protected Attributes | |
vctDynamicVector< _elementType > | WorkspaceMemory |
vctDynamicVectorRef< _elementType > | WorkspaceReference |
size_type | Size |
Friends | |
class | Friend |
Data (workspace) for nmrIsOrthonormal (Dynamic).
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:
typedef vct::size_type nmrIsOrthonormalDynamicData< _elementType >::size_type |
Type used for sizes within 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.
|
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. |
|
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 |
|
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 |
|
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. |
|
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. |
|
inlineprotected |
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:
|
inlineprotected |
Private method to set the data member Size. This method must be called before AllocateWorkspace or ThrowUnlessWorkspaceSizeIsCorrect.
|
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. |
|
inlineprotected |
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.
|
inlinestatic |
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. |
|
inlinestatic |
Helper methods for user to set minimum working space required for nmrIsOrthonormal.
A | The matrix to be tested. A must be square. |
|
friend |
|
protected |
Just store the size of the matrix, i.e. M * N.
|
protected |
Memory allocated for Workspace matrices if needed.
|
protected |
References to work or return types, these point either to user allocated memory or our memory chunks if needed.