RcdMathLib_doc
Open Source Library for Linear and Non-linear Algebra
qr_pseudo_inverse.h File Reference

QR decomposition algorithms to compute the pseudo-inverse of a matrix. More...

#include <inttypes.h>
#include "matrix.h"
#include "qr_common.h"

Go to the source code of this file.

Functions

int8_t qr_get_pinv (uint8_t m, uint8_t n, matrix_t A[m][n], matrix_t pinv_A[n][m], enum QR_ALGORITHM algo)
 Calculate the pseudo inverse of a rectangular matrix using the QR decomposition. More...
 

Detailed Description

QR decomposition algorithms to compute the pseudo-inverse of a matrix.

The computation of the pseudo-inverse is implemented using the Householder or the Givens algorithms.

Author
Zakaria Kasmi zkasm.nosp@m.i@in.nosp@m.f.fu-.nosp@m.berl.nosp@m.in.de

Definition in file qr_pseudo_inverse.h.

Function Documentation

◆ qr_get_pinv()

int8_t qr_get_pinv ( uint8_t  m,
uint8_t  n,
matrix_t  A[m][n],
matrix_t  pinv_A[n][m],
enum QR_ALGORITHM  algo 
)

Calculate the pseudo inverse of a rectangular matrix using the QR decomposition.

The computation of the pseudo inverse is based on the Householder or Givens algorithm.

Parameters
[in]mrow number of the matrix to inverse.
[in]ncolumn number of the matrix to inverse.
[in]A[][]pointer to the matrix A.
[out]pinv_A[][]pointer to the pseudo-inverse matrix.
[in]algochoice between the Householder or Givens algorithms.
Returns
1, if computing the pseudo-inverse matrix is successful.
-1, if computing the pseudo-inverse matrix is not successful.

Definition at line 32 of file qr_pseudo_inverse.c.

Referenced by qr_pinv_test().