You are here: Symbol Reference > MtxVec Namespace > Classes > TMtx Class > public > TMtx.LSESolve Method
MtxVec VCL
ContentsIndex
PreviousUpNext
TMtx.LSESolve Method

Solves the linear equality-constrained least squares (LSE).

Pascal
function LSESolve(const B: TMtx; const C: TVec; const D: TVec; const X: TVec): double; overload;

Solves the linear equality-constrained least squares (LSE) problem: 

 

minimize || c - A*x ||_2 subject to B*x = d

 

where A is an M-by-N matrix, B is a P-by-N matrix, c is a given vector of length M, and d is a given vector of length P. The sign "_2", denotes Norm L2. It is assumed that P <= N <= M+P, and 

 

rank(B) = P and rank( (A) ) = N ( (B) )

 

These conditions ensure that the LSE problem has a unique solution, which is obtained using a generalized RQ factorization of the matrices (B, A) given by 

 

B = (0 R)*Q, A = Z*T*Q

 

The function returns the residual sum of squares for the solution 

References:  

1.) Lapack v3.4 source code  

2.) http://isites.harvard.edu/fs/docs/icb.topic774900.files/lec16.09.pdf  

3.) http://www.cs.ucdavis.edu/~bai/publications/andersonbaidongarra92.pdf  

 

Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!