Namespace LinAlg

namespace linalg


af::array lls(const af::array &A, const af::array &b)

Calculates the minimum norm least squares solution \(x\) \((\left\lVert{A·x - b}\right\rVert^2)\) to \(A·x = b\). This function uses the singular value decomposition function of Arrayfire. The actual formula that this function computes is \(x = V·D\dagger·U^T·b\). Where \(U\) and \(V\) are orthogonal matrices and \(D\dagger\) contains the inverse values of the singular values contained in D if they are not zero, and zero otherwise.

af::array Contains the solution to the linear equation problem minimizing the norm 2.
  • A: Coefficient matrix containing the coefficients of the linear equation problem to solve.
  • b: Vector with the measured values.