DESERT 3.5.1
Loading...
Searching...
No Matches
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 

Definition at line 38 of file least_squares.h.

Function Documentation

◆ nnLeastSquares()

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

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

Definition at line 115 of file least_squares.cpp.