cisst-saw
Loading...
Searching...
No Matches
nmrLSMinNorm.h File Reference

Go to the source code of this file.

Classes

class  nmrLSMinNorm
class  nmrLSMinNorm::Data

Functions

vctDynamicMatrix< double > CISST_EXPORT nmrLSMinNorm (vctDynamicMatrix< double > &A, vctDynamicMatrix< double > &b, CISSTNETLIB_DOUBLE r=-1.0)
 Computes the minimum norm solution to a real linear least squares problem.
vctDynamicMatrix< double > CISST_EXPORT nmrLSMinNorm (vctDynamicMatrix< double > &A, vctDynamicMatrix< double > &b, nmrLSMinNorm::Data &data, CISSTNETLIB_DOUBLE r=-1.0)
 Computes the minimum norm solution to a real linear least squares problem.

Function Documentation

◆ nmrLSMinNorm() [1/2]

vctDynamicMatrix< double > CISST_EXPORT nmrLSMinNorm ( vctDynamicMatrix< double > & A,
vctDynamicMatrix< double > & b,
CISSTNETLIB_DOUBLE r = -1.0 )

Computes the minimum norm solution to a real linear least squares problem.

Computes the minimum norm solution to a real linear least squares problem: \( \min_{\mathbf{x}} \| \mathbf{b} - A\mathbf{x} \| \)

Parameters
[in]AThe \( M \times N \) column major matrix.
[out]AThe first \( \min ( M \times N ) \) right singular vectors.
[in]bThe \( M \times O \) column major matrix. The matrix can be overwritten.
rUsed to determine the effective rank of A. Singular values \( \sigma_i \leq r\sigma_1 \) are treated as zero (low rank approximation). If \( r<0 \), machine precision is used instead.
Returns
The \( N \times O \) minimum norm solutions \( \mathbf{x} \).

◆ nmrLSMinNorm() [2/2]

vctDynamicMatrix< double > CISST_EXPORT nmrLSMinNorm ( vctDynamicMatrix< double > & A,
vctDynamicMatrix< double > & b,
nmrLSMinNorm::Data & data,
CISSTNETLIB_DOUBLE r = -1.0 )

Computes the minimum norm solution to a real linear least squares problem.

Computes the minimum norm solution to a real linear least squares problem: \( \min_{\mathbf{x}} \| \mathbf{b} - A\mathbf{x} \| \)

Parameters
[in]AA \( M \times N \) column major matrix.
[out]AThe first \( \min ( M \times N ) \) right singular vectors.
[in]bA \( M \times O \) column major matrix. The matrix can be overwritten.
[in]dataProvide pre-allocated workspace. If the workspace is not adequate it will be reallocated.
rUsed to determine the effective rank of A. Singular values \( \sigma_i \leq r\sigma_1 \) are treated as zero (low rank approximation). If \( r<0 \), machine precision is used instead.
Returns
The \( N \times O \) minimum norm solutions \( \mathbf{x} \).