fortran-lapack
Loading...
Searching...
No Matches
la_matrix_functions::matrix_power Interface Reference

Compute an integer power of a square matrix. More...

Public Member Functions

pure real(sp) function, dimension(:,:), allocatable la_s_matrix_power (a, n)
 Integer power of a square matrix, function form: pure, stops on error.
 
real(sp) function, dimension(:,:), allocatable la_s_matrix_power_err (a, n, err)
 Integer power of a square matrix, function form with a state return flag.
 
pure real(dp) function, dimension(:,:), allocatable la_d_matrix_power (a, n)
 Integer power of a square matrix, function form: pure, stops on error.
 
real(dp) function, dimension(:,:), allocatable la_d_matrix_power_err (a, n, err)
 Integer power of a square matrix, function form with a state return flag.
 
pure complex(sp) function, dimension(:,:), allocatable la_c_matrix_power (a, n)
 Integer power of a square matrix, function form: pure, stops on error.
 
complex(sp) function, dimension(:,:), allocatable la_c_matrix_power_err (a, n, err)
 Integer power of a square matrix, function form with a state return flag.
 
pure complex(dp) function, dimension(:,:), allocatable la_z_matrix_power (a, n)
 Integer power of a square matrix, function form: pure, stops on error.
 
complex(dp) function, dimension(:,:), allocatable la_z_matrix_power_err (a, n, err)
 Integer power of a square matrix, function form with a state return flag.
 

Detailed Description

Compute an integer power of a square matrix.

This function computes \( A^n \) for a real or complex square matrix \( A \) and an integer \( n \), by repeated squaring: about \( 2 \log_2 |n| \) matrix products. \( A^0 \) is the identity matrix, also for a singular \( A \), and a negative power is the power \( (A^{-1})^{|n|} \) of the inverse.

Parameters
[in]AThe input square matrix of size \( [m, m] \).
[in]nThe power, an integer(ilp).
[out]err(Optional) A state return flag. Without it the function is pure, and an error stops execution.
Returns
The matrix \( A^n \), of the same type, kind and size as \( A \). With err, an error returns an empty matrix.
Note
The matrix products use the BLAS gemm; the inverse comes from invert.

Member Function/Subroutine Documentation

◆ la_c_matrix_power()

pure complex(sp) function, dimension(:,:), allocatable la_matrix_functions::matrix_power::la_c_matrix_power ( complex(sp), dimension(:,:), intent(in) a,
integer(ilp), intent(in) n )

Integer power of a square matrix, function form: pure, stops on error.

Parameters
[in]aInput matrix a[m,m]
[in]nPower
Returns
Matrix power a^n [m,m]

◆ la_c_matrix_power_err()

complex(sp) function, dimension(:,:), allocatable la_matrix_functions::matrix_power::la_c_matrix_power_err ( complex(sp), dimension(:,:), intent(in) a,
integer(ilp), intent(in) n,
type(la_state), intent(out) err )

Integer power of a square matrix, function form with a state return flag.

Parameters
[in]aInput matrix a[m,m]
[in]nPower
[out]errState return flag
Returns
Matrix power a^n [m,m]; empty on error

◆ la_d_matrix_power()

pure real(dp) function, dimension(:,:), allocatable la_matrix_functions::matrix_power::la_d_matrix_power ( real(dp), dimension(:,:), intent(in) a,
integer(ilp), intent(in) n )

Integer power of a square matrix, function form: pure, stops on error.

Parameters
[in]aInput matrix a[m,m]
[in]nPower
Returns
Matrix power a^n [m,m]

◆ la_d_matrix_power_err()

real(dp) function, dimension(:,:), allocatable la_matrix_functions::matrix_power::la_d_matrix_power_err ( real(dp), dimension(:,:), intent(in) a,
integer(ilp), intent(in) n,
type(la_state), intent(out) err )

Integer power of a square matrix, function form with a state return flag.

Parameters
[in]aInput matrix a[m,m]
[in]nPower
[out]errState return flag
Returns
Matrix power a^n [m,m]; empty on error
Here is the call graph for this function:

◆ la_s_matrix_power()

pure real(sp) function, dimension(:,:), allocatable la_matrix_functions::matrix_power::la_s_matrix_power ( real(sp), dimension(:,:), intent(in) a,
integer(ilp), intent(in) n )

Integer power of a square matrix, function form: pure, stops on error.

Parameters
[in]aInput matrix a[m,m]
[in]nPower
Returns
Matrix power a^n [m,m]

◆ la_s_matrix_power_err()

real(sp) function, dimension(:,:), allocatable la_matrix_functions::matrix_power::la_s_matrix_power_err ( real(sp), dimension(:,:), intent(in) a,
integer(ilp), intent(in) n,
type(la_state), intent(out) err )

Integer power of a square matrix, function form with a state return flag.

Parameters
[in]aInput matrix a[m,m]
[in]nPower
[out]errState return flag
Returns
Matrix power a^n [m,m]; empty on error

◆ la_z_matrix_power()

pure complex(dp) function, dimension(:,:), allocatable la_matrix_functions::matrix_power::la_z_matrix_power ( complex(dp), dimension(:,:), intent(in) a,
integer(ilp), intent(in) n )

Integer power of a square matrix, function form: pure, stops on error.

Parameters
[in]aInput matrix a[m,m]
[in]nPower
Returns
Matrix power a^n [m,m]

◆ la_z_matrix_power_err()

complex(dp) function, dimension(:,:), allocatable la_matrix_functions::matrix_power::la_z_matrix_power_err ( complex(dp), dimension(:,:), intent(in) a,
integer(ilp), intent(in) n,
type(la_state), intent(out) err )

Integer power of a square matrix, function form with a state return flag.

Parameters
[in]aInput matrix a[m,m]
[in]nPower
[out]errState return flag
Returns
Matrix power a^n [m,m]; empty on error
Here is the call graph for this function:

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