ERC CISST - cisst software

nmrHFTISolver Class Reference
[Numerical Methods]

#include <nmrHFTISolver.h>

Collaboration diagram for nmrHFTISolver:

Collaboration graph
[legend]
List of all members.

Detailed Description

Algorithm LDP: Least Distance Programming

The original version of this code was developed by Charles L. Lawson and Richard J. Hanson at Jet Propulsion Laboratory 1974 MAR 1, and published in the book "Solving Least Squares Problems", Prentice-Hall, 1974.

This can be used to solve a linear least squares problem or a set of least square problem having same matrix but different right-hand side vectors.

The data members of this class are:

Note:
The input matrices of this class must use a column major storage order. To do so, use VCT_COL_MAJOR whenever you declare a matrix. They must also be compact (see vctDynamicMatrix::IsFortran()).

This code relies on the ERC CISST cnetlib library. Since cnetlib is optional, make sure that CISST_HAS_CNETLIB has been turned ON during the configuration with CMake.

Definition at line 75 of file nmrHFTISolver.h.

Public Member Functions

Protected Attributes


Constructor & Destructor Documentation

nmrHFTISolver::nmrHFTISolver ( void   )  [inline]

Default constructor. This constructor doesn't allocate any memory. If you use this constructor, you will need to use one of the Allocate() methods before you can use the Solve method.

Definition at line 96 of file nmrHFTISolver.h.

References Allocate(), M, N, and NB.

nmrHFTISolver::nmrHFTISolver ( CISSTNETLIB_INTEGER  m,
CISSTNETLIB_INTEGER  n,
CISSTNETLIB_INTEGER  nb 
) [inline]

Constructor with memory allocation. This constructor allocates the memory based on M, N and NB. It relies on the method Allocate(). The next call to the Solve() method will check that the parameters match the dimension.

Parameters:
m Number of rows of A
n Number of columns of A
nb Number of columns of B

Definition at line 114 of file nmrHFTISolver.h.

References Allocate().

nmrHFTISolver::nmrHFTISolver ( vctDynamicMatrix< CISSTNETLIB_DOUBLE > &  A,
vctDynamicMatrix< CISSTNETLIB_DOUBLE > &  B 
) [inline]

Constructor with memory allocation. This constructor allocates the memory based on the actual input of the Solve() method. It relies on the method Allocate(). The next call to the Solve() method will check that the parameters match the dimension.

Definition at line 124 of file nmrHFTISolver.h.

References A, Allocate(), and B.


Member Function Documentation

void nmrHFTISolver::Allocate ( CISSTNETLIB_INTEGER  m,
CISSTNETLIB_INTEGER  n,
CISSTNETLIB_INTEGER  nb 
) [inline]

This method allocates the memory based on Ma, Na and Nb. The next call to the Solve() method will check that the parameters match the dimension.

Parameters:
m Number of rows of A
n Number of columns of A
nb Number of columns of B

Definition at line 137 of file nmrHFTISolver.h.

References A, B, G, H, IP, M, N, NB, RNORM, vctDynamicMatrix< _elementType >::SetSize(), VCT_COL_MAJOR, and X.

Referenced by Allocate(), and nmrHFTISolver().

void nmrHFTISolver::Allocate ( vctDynamicMatrix< CISSTNETLIB_DOUBLE > &  A,
vctDynamicMatrix< CISSTNETLIB_DOUBLE > &  B 
) [inline]

Allocate memory to solve this problem. This method provides a convenient way to extract the required sizes from the input containers. The next call to the Solve() method will check that the parameters match the dimension.

Definition at line 159 of file nmrHFTISolver.h.

References A, Allocate(), B, vctDynamicConstMatrixBase< _matrixOwnerType, _elementType >::cols(), and vctDynamicConstMatrixBase< _matrixOwnerType, _elementType >::rows().

void nmrHFTISolver::Solve ( vctDynamicMatrix< CISSTNETLIB_DOUBLE > &  A,
vctDynamicMatrix< CISSTNETLIB_DOUBLE > &  B 
) throw (std::runtime_error) [inline]

Note:
This method verifies that the input parameters are using a column major storage order and that they are compact. Both conditions are tested using vctDynamicMatrix::IsFortran(). If the parameters don't meet all the requirements, an exception is thrown (std::runtime_error).

Definition at line 170 of file nmrHFTISolver.h.

References A, B, cmnThrow(), vctDynamicConstMatrixBase< _matrixOwnerType, _elementType >::cols(), G, H, IP, vctDynamicConstMatrixBase< _matrixOwnerType, _elementType >::IsFortran(), krank, M, N, NB, vctDynamicMatrixBase< _matrixOwnerType, _elementType >::Pointer(), RNORM, vctDynamicConstMatrixBase< _matrixOwnerType, _elementType >::rows(), and tau.


The documentation for this class was generated from the following file:
erc-cisst-devel<at>lists.johnshopkins.edu