solve linear least square problem (min_x ||a*x-b||)
with inequality constraints ux>=co
If a is rank deficient, regularization term lambda^2*||mnorm*(x-x0)||^2
is added to ||a*x-b||^2.
lsi_reg(a, b, u = NULL, co = NULL, rcond = 1e+10, mnorm = NULL, x0 = NULL)solution vector whose attribute 'mes' may contain a message about possible numerical problems and 'lambda' is regularization parameter used in solution.
dense matrix A or its QR decomposition
right hand side vector
dense matrix of inequality constraints
right hand side vector of inequality constraints
used for calculating lambda=d[1]/sqrt(rcond) where d[1] is maximal singular value of a
norm matrix (can be dense or sparse) for which %*% operation with a dense vector is defined
optional vector from which a least norm distance is searched for
The rank of a is estimated as number of singular values
above d[1]*1.e-10 where d[1] is the highest singular value.
The scalar lambda is an positive number
and is calculated as d[1]/sqrt(rcond) ('rcond' parameter is preserved
for compatibility with others lsi_...() functions).
At return, lambda can be found in attributes of the returned vector x.
NB. lambda is set to NA
if rank(a)==0 or a is of full rank
or if there is no inequality. If the matrix mnorm is NULL, it is supposed to be an identity matrix. If the vector x0 is NULL, it is treated as 0 vector.
lsi_ln