sqrtm Interface

public interface sqrtm

Computes the non-negative square root of a symmetric positive definite matrix using its singular value decomposition.

Description

This interface provides methods to compute the non-negative square root of a symmetric (hermitian) positive definite matrix .

Syntax

call sqrtm(A, sqrtmA, info)

Arguments

A: Symmetric (hermitian) positive definite matrix whose non-negative square root needs to be computed. It is an intent(in) argument.

sqrtmA: Non-negative square root of A. It has the same size, kind and type as A. It is an intent(out) argument.

info: Information flag. It is an intent(out) argument.


Module Procedures

private subroutine sqrtm_rsp(X, sqrtmX, info)

Matrix-valued sqrt function for dense symmetric/hermitian positive (semi-)definite matrices

Arguments

Type IntentOptional Attributes Name
real(kind=sp), intent(inout) :: X(:,:)

Matrix of which to compute the sqrt

real(kind=sp), intent(out) :: sqrtmX(size(X,1),size(X,1))

Return matrix

integer, intent(out) :: info

Information flag

private subroutine sqrtm_rdp(X, sqrtmX, info)

Matrix-valued sqrt function for dense symmetric/hermitian positive (semi-)definite matrices

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(inout) :: X(:,:)

Matrix of which to compute the sqrt

real(kind=dp), intent(out) :: sqrtmX(size(X,1),size(X,1))

Return matrix

integer, intent(out) :: info

Information flag

private subroutine sqrtm_csp(X, sqrtmX, info)

Matrix-valued sqrt function for dense symmetric/hermitian positive (semi-)definite matrices

Arguments

Type IntentOptional Attributes Name
complex(kind=sp), intent(inout) :: X(:,:)

Matrix of which to compute the sqrt

complex(kind=sp), intent(out) :: sqrtmX(size(X,1),size(X,1))

Return matrix

integer, intent(out) :: info

Information flag

private subroutine sqrtm_cdp(X, sqrtmX, info)

Matrix-valued sqrt function for dense symmetric/hermitian positive (semi-)definite matrices

Arguments

Type IntentOptional Attributes Name
complex(kind=dp), intent(inout) :: X(:,:)

Matrix of which to compute the sqrt

complex(kind=dp), intent(out) :: sqrtmX(size(X,1),size(X,1))

Return matrix

integer, intent(out) :: info

Information flag