#include <nmrLDPSolver.h>
Collaboration diagram for nmrLDPSolver:

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.
Given a
matrix G and a
vector h, compute a
vector X, that solves the linear distance problem:

The data members of this class are:
matrix h
matrix passed as A matrix to NNLS
matrix passed as B to NNLS
matrix in which solution to NNLS is obtained
working matrix
working matrix
working array.
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 nmrLDPSolver.h.
| nmrLDPSolver::nmrLDPSolver | ( | 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 95 of file nmrLDPSolver.h.
References Allocate(), M, and N.
| nmrLDPSolver::nmrLDPSolver | ( | CISSTNETLIB_INTEGER | m, | |
| CISSTNETLIB_INTEGER | n | |||
| ) | [inline] |
Constructor with memory allocation. This constructor allocates the memory based on M and N. It relies on the method Allocate(). The next call to the Solve() method will check that the parameters match the dimension.
| m | Number of rows of G | |
| n | Number of columns of G |
Definition at line 111 of file nmrLDPSolver.h.
References Allocate().
| nmrLDPSolver::nmrLDPSolver | ( | vctDynamicMatrix< CISSTNETLIB_DOUBLE > & | G, | |
| vctDynamicMatrix< CISSTNETLIB_DOUBLE > & | h | |||
| ) | [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 121 of file nmrLDPSolver.h.
References Allocate().
| void nmrLDPSolver::Allocate | ( | CISSTNETLIB_INTEGER | m, | |
| CISSTNETLIB_INTEGER | n | |||
| ) | [inline] |
This method allocates the memory based on Ma, Na and Mg. The next call to the Solve() method will check that the parameters match the dimension.
| m | Number of rows of G | |
| n | Number of columns of G |
Definition at line 133 of file nmrLDPSolver.h.
References CopyE, E, F, Index, M, N, R, vctDynamicMatrix< _elementType >::SetSize(), U, VCT_COL_MAJOR, W, X, and Zz.
Referenced by Allocate(), nmrLSISolver::Allocate(), and nmrLDPSolver().
| void nmrLDPSolver::Allocate | ( | vctDynamicMatrix< CISSTNETLIB_DOUBLE > & | G, | |
| vctDynamicMatrix< CISSTNETLIB_DOUBLE > & | CMN_UNUSED(h) | |||
| ) | [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 152 of file nmrLDPSolver.h.
References Allocate(), vctDynamicConstMatrixBase< vctDynamicMatrixOwner< _elementType >, _elementType >::cols(), and vctDynamicConstMatrixBase< vctDynamicMatrixOwner< _elementType >, _elementType >::rows().
| CISST_EXPORT void nmrLDPSolver::Solve | ( | vctDynamicMatrix< CISSTNETLIB_DOUBLE > & | G, | |
| vctDynamicMatrix< CISSTNETLIB_DOUBLE > & | h | |||
| ) | throw (std::runtime_error) |
Given a
matrix G and a
vector h, compute a
vector X, that solves the linear distance problem:

| const vctDynamicMatrix<CISSTNETLIB_DOUBLE>& nmrLDPSolver::GetX | ( | void | ) | const [inline] |
Get X. This method must be used after Solve().
Definition at line 173 of file nmrLDPSolver.h.
References X.