1.7. Namespace LinAlg

class LinAlg

Khiva Linear Algebra class containing linear algebra methods.

Public Static Functions

static KhivaArray Khiva.LinAlg.Lls(KhivaArray a, KhivaArray 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.

Return
Contains the solution to the linear equation problem minimizing the norm 2.
Parameters
  • a: A coefficient matrix containing the coefficients of the linear equation problem to solve.
  • b: A vector with the measured values.