cisst-saw
|
#include <nmrNNLSSolver.h>
Public Member Functions | |
nmrNNLSSolver (void) | |
nmrNNLSSolver (CISSTNETLIB_INTEGER m, CISSTNETLIB_INTEGER n) | |
nmrNNLSSolver (vctDynamicMatrix< CISSTNETLIB_DOUBLE > &C, vctDynamicMatrix< CISSTNETLIB_DOUBLE > &d) | |
void | Allocate (CISSTNETLIB_INTEGER m, CISSTNETLIB_INTEGER n) |
void | Allocate (vctDynamicMatrix< CISSTNETLIB_DOUBLE > &C, vctDynamicMatrix< CISSTNETLIB_DOUBLE > &CMN_UNUSED(d)) |
void | Solve (vctDynamicMatrix< CISSTNETLIB_DOUBLE > &C, vctDynamicMatrix< CISSTNETLIB_DOUBLE > d) throw (std::runtime_error) |
const vctDynamicMatrix < CISSTNETLIB_DOUBLE > & | GetX (void) const |
const vctDynamicMatrix < CISSTNETLIB_DOUBLE > & | GetDual (void) const |
CISSTNETLIB_DOUBLE | GetRNorm (void) const |
Protected Attributes | |
CISSTNETLIB_INTEGER | M |
CISSTNETLIB_INTEGER | N |
CISSTNETLIB_INTEGER | Mda |
CISSTNETLIB_INTEGER | Mode |
CISSTNETLIB_DOUBLE | RNorm |
vctDynamicMatrix < CISSTNETLIB_DOUBLE > | X |
vctDynamicMatrix < CISSTNETLIB_DOUBLE > | W |
vctDynamicMatrix < CISSTNETLIB_DOUBLE > | Zz |
vctDynamicMatrix < CISSTNETLIB_INTEGER > | Index |
Algorithm NNLS: Non Negative Least Squares
The original version of this code was developed by Charles L. Lawson and Richard J. Hanson at Jet Propulsion Laboratory 1973 JUN 15, and published in the book "Solves Least Squares Problems", Prentice-Hall, 1974.
Given a matrix A, and a
vector B, compute a
vector X, that solves the least squares problem:
The data members of this class are:
|
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.
|
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 C |
n | Number of columns of C |
|
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.
|
inline |
This method allocates the memory based on M and N. The next call to the Solve() method will check that the parameters match the dimension.
m | Number of rows of C |
n | Number of columns of C |
|
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.
|
inline |
|
inline |
|
inline |
Get X. This method must be used after Solve().
|
inline |
Given a matrix A, and a
vector B, compute a
vector X, that solves the least squares problem:
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |