forinv Module

This module provides functions and subroutines for inverse and pseudo-inverse calculations.


Uses

    • forsvd
    • kinds
  • module~~forinv~~UsesGraph module~forinv forinv forsvd forsvd module~forinv->forsvd kinds kinds module~forinv->kinds

Used by

  • module~~forinv~~UsedByGraph module~forinv forinv program~test1 test1 program~test1->module~forinv program~test2 test2 program~test2->module~forinv program~test3 test3 program~test3->module~forinv

Interfaces

public interface inv

  • private pure function pinv_rel(A, method, tol) result(Apinv)

    Author
    Seyed Ali Ghasemi

    Calculates the pseudoinverse of a matrix A.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=rk), intent(in), dimension(:, :), contiguous :: A
    character(len=*), intent(in), optional :: method
    real(kind=rk), intent(in), optional :: tol

    Return Value real(kind=rk), dimension(size(A,2), size(A,1))


Functions

private pure function pinv_rel(A, method, tol) result(Apinv)

Author
Seyed Ali Ghasemi

Calculates the pseudoinverse of a matrix A.

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in), dimension(:, :), contiguous :: A
character(len=*), intent(in), optional :: method
real(kind=rk), intent(in), optional :: tol

Return Value real(kind=rk), dimension(size(A,2), size(A,1))

private pure function pinvSVD_rel(A, method, tol) result(Apinv)

Author
Seyed Ali Ghasemi

Calculates the pseudoinverse of a matrix A using the SVD.

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in), dimension(:, :), contiguous :: A
character(len=*), intent(in), optional :: method
real(kind=rk), intent(in), optional :: tol

Return Value real(kind=rk), dimension(size(A,2), size(A,1))

private pure function pinvLU_rel(A) result(Apinv)

Author
ZUO Zhihua, Seyed Ali Ghasemi

Calculates the pseudoinverse of a matrix A using the LU decomposition.

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in), dimension(:, :), contiguous :: A

Return Value real(kind=rk), dimension(size(A,2), size(A,1))

private pure function invLU_rel(A) result(Ainv)

Author
ZUO Zhihua, Seyed Ali Ghasemi

Calculates the inverse of a matrix A using the LU decomposition.

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in), dimension(:, :), contiguous :: A

Return Value real(kind=rk), dimension(size(A,2), size(A,1))

private pure function gemm(A, B) result(C)

Author
ZUO Zhihua, Seyed Ali Ghasemi

Calculates the matrix-matrix product of two matrices A and B.

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in), dimension(:, :), contiguous :: A
real(kind=rk), intent(in), dimension(:, :), contiguous :: B

Return Value real(kind=rk), dimension(size(A,1), size(B,2))