fortran-lapack
Loading...
Searching...
No Matches
la_norms::cond Interface Reference

Compute the condition number of a matrix. More...

Public Member Functions

pure real(sp) function la_cond_char_s (a, order)
 
real(sp) function la_cond_err_char_s (a, order, err)
 
pure real(sp) function la_cond_int_s (a, order)
 
real(sp) function la_cond_err_int_s (a, order, err)
 
pure real(dp) function la_cond_char_d (a, order)
 
real(dp) function la_cond_err_char_d (a, order, err)
 
pure real(dp) function la_cond_int_d (a, order)
 
real(dp) function la_cond_err_int_d (a, order, err)
 
pure real(sp) function la_cond_char_c (a, order)
 
real(sp) function la_cond_err_char_c (a, order, err)
 
pure real(sp) function la_cond_int_c (a, order)
 
real(sp) function la_cond_err_int_c (a, order, err)
 
pure real(dp) function la_cond_char_z (a, order)
 
real(dp) function la_cond_err_char_z (a, order, err)
 
pure real(dp) function la_cond_int_z (a, order)
 
real(dp) function la_cond_err_int_z (a, order, err)
 

Detailed Description

Compute the condition number of a matrix.

This function returns the condition number \( \kappa(A) = \|A\| \cdot \|A^{-1}\| \) of a real or complex matrix \( A \), in the norm that order selects:

  • 2-norm (the default), \( \sigma_{max} / \sigma_{min} \) from the singular values: order = 2 or "2". \( A \) may be rectangular.
  • 1-norm, order = 1 or "1", and infinity norm, order = huge(0) or "inf": LAPACK's gecon estimate from the LU factorization of the square matrix \( A \).
  • Frobenius norm, order = "fro": from the explicit inverse of the square matrix \( A \).
Parameters
[in]aThe input matrix \( A \) of size \( [m,n] \).
[in]order(Optional) The norm, as an integer(ilp) or a character string. Default is 2.
[out]err(Optional) A state return flag. Without it the function is pure, and an error stops execution.
Returns
The condition number, a real scalar of the kind of \( A \): \( +\infty \) for a singular matrix, and 0 if the computation failed.
Note
Unlike mnorm, which reads order = 2 as the Frobenius norm, cond reads it as the spectral norm, as NumPy does.

Member Function/Subroutine Documentation

◆ la_cond_char_c()

pure real(sp) function la_norms::cond::la_cond_char_c ( complex(sp), dimension(:,:), intent(in) a,
character(len=*), intent(in) order )
Parameters
[in]aInput matrix a(m,n)
[in]orderOrder of the matrix norm
Returns
Condition number

◆ la_cond_char_d()

pure real(dp) function la_norms::cond::la_cond_char_d ( real(dp), dimension(:,:), intent(in) a,
character(len=*), intent(in) order )
Parameters
[in]aInput matrix a(m,n)
[in]orderOrder of the matrix norm
Returns
Condition number

◆ la_cond_char_s()

pure real(sp) function la_norms::cond::la_cond_char_s ( real(sp), dimension(:,:), intent(in) a,
character(len=*), intent(in) order )
Parameters
[in]aInput matrix a(m,n)
[in]orderOrder of the matrix norm
Returns
Condition number

◆ la_cond_char_z()

pure real(dp) function la_norms::cond::la_cond_char_z ( complex(dp), dimension(:,:), intent(in) a,
character(len=*), intent(in) order )
Parameters
[in]aInput matrix a(m,n)
[in]orderOrder of the matrix norm
Returns
Condition number

◆ la_cond_err_char_c()

real(sp) function la_norms::cond::la_cond_err_char_c ( complex(sp), dimension(:,:), intent(in) a,
character(len=*), intent(in) order,
type(la_state), intent(out) err )
Parameters
[in]aInput matrix a(m,n)
[in]orderOrder of the matrix norm
[out]errOutput state return flag.
Returns
Condition number

◆ la_cond_err_char_d()

real(dp) function la_norms::cond::la_cond_err_char_d ( real(dp), dimension(:,:), intent(in) a,
character(len=*), intent(in) order,
type(la_state), intent(out) err )
Parameters
[in]aInput matrix a(m,n)
[in]orderOrder of the matrix norm
[out]errOutput state return flag.
Returns
Condition number

◆ la_cond_err_char_s()

real(sp) function la_norms::cond::la_cond_err_char_s ( real(sp), dimension(:,:), intent(in) a,
character(len=*), intent(in) order,
type(la_state), intent(out) err )
Parameters
[in]aInput matrix a(m,n)
[in]orderOrder of the matrix norm
[out]errOutput state return flag.
Returns
Condition number

◆ la_cond_err_char_z()

real(dp) function la_norms::cond::la_cond_err_char_z ( complex(dp), dimension(:,:), intent(in) a,
character(len=*), intent(in) order,
type(la_state), intent(out) err )
Parameters
[in]aInput matrix a(m,n)
[in]orderOrder of the matrix norm
[out]errOutput state return flag.
Returns
Condition number

◆ la_cond_err_int_c()

real(sp) function la_norms::cond::la_cond_err_int_c ( complex(sp), dimension(:,:), intent(in) a,
integer(ilp), intent(in), optional order,
type(la_state), intent(out) err )
Parameters
[in]aInput matrix a(m,n)
[in]order[optional] Order of the matrix norm: 1, 2 (default) or huge(0)
[out]errOutput state return flag.
Returns
Condition number

◆ la_cond_err_int_d()

real(dp) function la_norms::cond::la_cond_err_int_d ( real(dp), dimension(:,:), intent(in) a,
integer(ilp), intent(in), optional order,
type(la_state), intent(out) err )
Parameters
[in]aInput matrix a(m,n)
[in]order[optional] Order of the matrix norm: 1, 2 (default) or huge(0)
[out]errOutput state return flag.
Returns
Condition number

◆ la_cond_err_int_s()

real(sp) function la_norms::cond::la_cond_err_int_s ( real(sp), dimension(:,:), intent(in) a,
integer(ilp), intent(in), optional order,
type(la_state), intent(out) err )
Parameters
[in]aInput matrix a(m,n)
[in]order[optional] Order of the matrix norm: 1, 2 (default) or huge(0)
[out]errOutput state return flag.
Returns
Condition number

◆ la_cond_err_int_z()

real(dp) function la_norms::cond::la_cond_err_int_z ( complex(dp), dimension(:,:), intent(in) a,
integer(ilp), intent(in), optional order,
type(la_state), intent(out) err )
Parameters
[in]aInput matrix a(m,n)
[in]order[optional] Order of the matrix norm: 1, 2 (default) or huge(0)
[out]errOutput state return flag.
Returns
Condition number

◆ la_cond_int_c()

pure real(sp) function la_norms::cond::la_cond_int_c ( complex(sp), dimension(:,:), intent(in) a,
integer(ilp), intent(in), optional order )
Parameters
[in]aInput matrix a(m,n)
[in]order[optional] Order of the matrix norm: 1, 2 (default) or huge(0)
Returns
Condition number

◆ la_cond_int_d()

pure real(dp) function la_norms::cond::la_cond_int_d ( real(dp), dimension(:,:), intent(in) a,
integer(ilp), intent(in), optional order )
Parameters
[in]aInput matrix a(m,n)
[in]order[optional] Order of the matrix norm: 1, 2 (default) or huge(0)
Returns
Condition number

◆ la_cond_int_s()

pure real(sp) function la_norms::cond::la_cond_int_s ( real(sp), dimension(:,:), intent(in) a,
integer(ilp), intent(in), optional order )
Parameters
[in]aInput matrix a(m,n)
[in]order[optional] Order of the matrix norm: 1, 2 (default) or huge(0)
Returns
Condition number

◆ la_cond_int_z()

pure real(dp) function la_norms::cond::la_cond_int_z ( complex(dp), dimension(:,:), intent(in) a,
integer(ilp), intent(in), optional order )
Parameters
[in]aInput matrix a(m,n)
[in]order[optional] Order of the matrix norm: 1, 2 (default) or huge(0)
Returns
Condition number

The documentation for this interface was generated from the following file: