DESERT 4.0.0
LSSQ Namespace Reference

Enumerations

enum  LeastSqResult { OK = 0 , TIMEOUT = 1 , ERROR = 2 }
 

Functions

LeastSqResult nnLeastSquares (std::vector< std::vector< double > > a, std::vector< double > b, std::vector< double > &x, double *resid=nullptr)
 

Enumeration Type Documentation

◆ LeastSqResult

Enumerator
OK 
TIMEOUT 
ERROR 

Function Documentation

◆ nnLeastSquares()

LSSQ::LeastSqResult LSSQ::nnLeastSquares ( std::vector< std::vector< double > >  a,
std::vector< double >  b,
std::vector< double > &  x,
double *  resid = nullptr 
)
@brief Least Squares Linear Regressor solves the least squares problem A * X

= B, X>=0

Parameters
aNxM matrix A: the first index returns the vector of samples related to a single unknown, the second index individuates the sample
bvector of known terms of size M
xvector of size N to hold the solution output
resid(optional) outputs the squared norm of the residual vector
Returns
0 = OK, 1 = TIMEOUT, 2 = ERROR

Referenced by UwRangingTokenBus::computeDist().