fortran-lapack
|
Compute the pseudo-inverse of a matrix (subroutine version). More...
Public Member Functions | |
subroutine | la_pseudoinvert_s (a, pinva, rtol, err) |
subroutine | la_pseudoinvert_d (a, pinva, rtol, err) |
subroutine | la_pseudoinvert_q (a, pinva, rtol, err) |
subroutine | la_pseudoinvert_c (a, pinva, rtol, err) |
subroutine | la_pseudoinvert_z (a, pinva, rtol, err) |
subroutine | la_pseudoinvert_w (a, pinva, rtol, err) |
Compute the pseudo-inverse of a matrix (subroutine version).
This subroutine computes the Moore-Penrose pseudo-inverse of a real or complex matrix A , storing the result in a pre-allocated output matrix A^+ . The computation is based on Singular Value Decomposition (SVD):
A^+ = V \Sigma^+ U^T
where U and V are unitary matrices, and \Sigma^+ is the pseudo-inverse of the singular values.
[in,out] | A | The input matrix of size [m, n] . Its contents may be modified. |
[out] | pinva | The output pseudo-inverse matrix of size [n, m] . |
[in] | rtol | (Optional) Relative tolerance for singular value truncation. |
[out] | err | (Optional) A state return flag. If an error occurs and err is not provided, the function will stop execution. |
pinva
is already allocated and avoids memory allocation inside the routine. A
may be modified during computation. subroutine la_pseudoinverse::pseudoinvert::la_pseudoinvert_c | ( | complex(sp), dimension(:,:), intent(inout) | a, |
complex(sp), dimension(:,:), intent(inout) | pinva, | ||
real(sp), intent(in), optional | rtol, | ||
type(la_state), intent(out), optional | err ) |
[in,out] | a | Input matrix a[m,n] |
[in,out] | pinva | Output pseudo-inverse matrix |
[in] | rtol | [optional] .... |
[out] | err | [optional] state return flag. On error if not requested, the code will stop |
subroutine la_pseudoinverse::pseudoinvert::la_pseudoinvert_d | ( | real(dp), dimension(:,:), intent(inout) | a, |
real(dp), dimension(:,:), intent(inout) | pinva, | ||
real(dp), intent(in), optional | rtol, | ||
type(la_state), intent(out), optional | err ) |
[in,out] | a | Input matrix a[m,n] |
[in,out] | pinva | Output pseudo-inverse matrix |
[in] | rtol | [optional] .... |
[out] | err | [optional] state return flag. On error if not requested, the code will stop |
subroutine la_pseudoinverse::pseudoinvert::la_pseudoinvert_q | ( | real(qp), dimension(:,:), intent(inout) | a, |
real(qp), dimension(:,:), intent(inout) | pinva, | ||
real(qp), intent(in), optional | rtol, | ||
type(la_state), intent(out), optional | err ) |
[in,out] | a | Input matrix a[m,n] |
[in,out] | pinva | Output pseudo-inverse matrix |
[in] | rtol | [optional] .... |
[out] | err | [optional] state return flag. On error if not requested, the code will stop |
subroutine la_pseudoinverse::pseudoinvert::la_pseudoinvert_s | ( | real(sp), dimension(:,:), intent(inout) | a, |
real(sp), dimension(:,:), intent(inout) | pinva, | ||
real(sp), intent(in), optional | rtol, | ||
type(la_state), intent(out), optional | err ) |
[in,out] | a | Input matrix a[m,n] |
[in,out] | pinva | Output pseudo-inverse matrix |
[in] | rtol | [optional] .... |
[out] | err | [optional] state return flag. On error if not requested, the code will stop |
subroutine la_pseudoinverse::pseudoinvert::la_pseudoinvert_w | ( | complex(qp), dimension(:,:), intent(inout) | a, |
complex(qp), dimension(:,:), intent(inout) | pinva, | ||
real(qp), intent(in), optional | rtol, | ||
type(la_state), intent(out), optional | err ) |
[in,out] | a | Input matrix a[m,n] |
[in,out] | pinva | Output pseudo-inverse matrix |
[in] | rtol | [optional] .... |
[out] | err | [optional] state return flag. On error if not requested, the code will stop |
subroutine la_pseudoinverse::pseudoinvert::la_pseudoinvert_z | ( | complex(dp), dimension(:,:), intent(inout) | a, |
complex(dp), dimension(:,:), intent(inout) | pinva, | ||
real(dp), intent(in), optional | rtol, | ||
type(la_state), intent(out), optional | err ) |
[in,out] | a | Input matrix a[m,n] |
[in,out] | pinva | Output pseudo-inverse matrix |
[in] | rtol | [optional] .... |
[out] | err | [optional] state return flag. On error if not requested, the code will stop |