cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
nmrHFTISolver Class Reference

#include <nmrHFTISolver.h>

Public Member Functions

 nmrHFTISolver (void)
 
 nmrHFTISolver (CISSTNETLIB_INTEGER m, CISSTNETLIB_INTEGER n, CISSTNETLIB_INTEGER nb)
 
 nmrHFTISolver (vctDynamicMatrix< CISSTNETLIB_DOUBLE > &A, vctDynamicMatrix< CISSTNETLIB_DOUBLE > &B)
 
void Allocate (CISSTNETLIB_INTEGER m, CISSTNETLIB_INTEGER n, CISSTNETLIB_INTEGER nb)
 
void Allocate (vctDynamicMatrix< CISSTNETLIB_DOUBLE > &A, vctDynamicMatrix< CISSTNETLIB_DOUBLE > &B)
 
void Solve (vctDynamicMatrix< CISSTNETLIB_DOUBLE > &A, vctDynamicMatrix< CISSTNETLIB_DOUBLE > &B) throw (std::runtime_error)
 

Protected Attributes

CISSTNETLIB_INTEGER M
 
CISSTNETLIB_INTEGER N
 
CISSTNETLIB_INTEGER NB
 
vctDynamicMatrix
< CISSTNETLIB_DOUBLE > 
A
 
vctDynamicMatrix
< CISSTNETLIB_DOUBLE > 
B
 
CISSTNETLIB_DOUBLE tau
 
CISSTNETLIB_INTEGER krank
 
vctDynamicMatrix
< CISSTNETLIB_DOUBLE > 
RNORM
 
vctDynamicMatrix
< CISSTNETLIB_DOUBLE > 
G
 
vctDynamicMatrix
< CISSTNETLIB_DOUBLE > 
H
 
vctDynamicMatrix
< CISSTNETLIB_INTEGER > 
IP
 
vctDynamicMatrix
< CISSTNETLIB_DOUBLE > 
X
 

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.

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.

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
mNumber of rows of A
nNumber of columns of A
nbNumber of columns of B
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.

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
mNumber of rows of A
nNumber of columns of A
nbNumber of columns of B
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.

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).

Member Data Documentation

vctDynamicMatrix<CISSTNETLIB_DOUBLE> nmrHFTISolver::A
protected
vctDynamicMatrix<CISSTNETLIB_DOUBLE> nmrHFTISolver::B
protected
vctDynamicMatrix<CISSTNETLIB_DOUBLE> nmrHFTISolver::G
protected
vctDynamicMatrix<CISSTNETLIB_DOUBLE> nmrHFTISolver::H
protected
vctDynamicMatrix<CISSTNETLIB_INTEGER> nmrHFTISolver::IP
protected
CISSTNETLIB_INTEGER nmrHFTISolver::krank
protected
CISSTNETLIB_INTEGER nmrHFTISolver::M
protected
CISSTNETLIB_INTEGER nmrHFTISolver::N
protected
CISSTNETLIB_INTEGER nmrHFTISolver::NB
protected
vctDynamicMatrix<CISSTNETLIB_DOUBLE> nmrHFTISolver::RNORM
protected
CISSTNETLIB_DOUBLE nmrHFTISolver::tau
protected
vctDynamicMatrix<CISSTNETLIB_DOUBLE> nmrHFTISolver::X
protected

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