
Inversion of a square matrix (Specification)
This interface provides methods for inverting a square real or complex matrix in-place.
 The inverse  is defined such that .
This subroutine interface provides a way to compute the inverse of a matrix.  
 Supported data types include real and complex. 
 The user may provide a unique matrix argument a. In this case, a is replaced by the inverse matrix.
 on output. Otherwise, one may provide two separate arguments: an input matrix a and an output matrix 
 inva. In this case, a will not be modified, and the inverse is returned in inva.
 Pre-allocated storage may be provided for the array of pivot indices, pivot. If all pre-allocated 
 work spaces are provided, no internal memory allocations take place when using this interface.             
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex(kind=sp), | intent(inout) | :: | a(:,:) | 
                 Input matrix a[n,n]  | 
        ||
| integer(kind=ilp), | intent(inout), | optional, | target | :: | pivot(:) | 
                 [optional] Storage array for the diagonal pivot indices  | 
        
| type(linalg_state_type), | intent(out), | optional | :: | err | 
                 [optional] state return flag. On error if not requested, the code will stop  | 
        
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(inout) | :: | a(:,:) | 
                 Input matrix a[n,n]  | 
        ||
| integer(kind=ilp), | intent(inout), | optional, | target | :: | pivot(:) | 
                 [optional] Storage array for the diagonal pivot indices  | 
        
| type(linalg_state_type), | intent(out), | optional | :: | err | 
                 [optional] state return flag. On error if not requested, the code will stop  | 
        
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=sp), | intent(inout) | :: | a(:,:) | 
                 Input matrix a[n,n]  | 
        ||
| integer(kind=ilp), | intent(inout), | optional, | target | :: | pivot(:) | 
                 [optional] Storage array for the diagonal pivot indices  | 
        
| type(linalg_state_type), | intent(out), | optional | :: | err | 
                 [optional] state return flag. On error if not requested, the code will stop  | 
        
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex(kind=dp), | intent(inout) | :: | a(:,:) | 
                 Input matrix a[n,n]  | 
        ||
| integer(kind=ilp), | intent(inout), | optional, | target | :: | pivot(:) | 
                 [optional] Storage array for the diagonal pivot indices  | 
        
| type(linalg_state_type), | intent(out), | optional | :: | err | 
                 [optional] state return flag. On error if not requested, the code will stop  | 
        
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex(kind=sp), | intent(in) | :: | a(:,:) | 
                 Input matrix a[n,n].  | 
        ||
| complex(kind=sp), | intent(out) | :: | inva(:,:) | 
                 Inverse matrix a[n,n].  | 
        ||
| integer(kind=ilp), | intent(inout), | optional, | target | :: | pivot(:) | 
                 [optional] Storage array for the diagonal pivot indices  | 
        
| type(linalg_state_type), | intent(out), | optional | :: | err | 
                 [optional] state return flag. On error if not requested, the code will stop  | 
        
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in) | :: | a(:,:) | 
                 Input matrix a[n,n].  | 
        ||
| real(kind=dp), | intent(out) | :: | inva(:,:) | 
                 Inverse matrix a[n,n].  | 
        ||
| integer(kind=ilp), | intent(inout), | optional, | target | :: | pivot(:) | 
                 [optional] Storage array for the diagonal pivot indices  | 
        
| type(linalg_state_type), | intent(out), | optional | :: | err | 
                 [optional] state return flag. On error if not requested, the code will stop  | 
        
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=sp), | intent(in) | :: | a(:,:) | 
                 Input matrix a[n,n].  | 
        ||
| real(kind=sp), | intent(out) | :: | inva(:,:) | 
                 Inverse matrix a[n,n].  | 
        ||
| integer(kind=ilp), | intent(inout), | optional, | target | :: | pivot(:) | 
                 [optional] Storage array for the diagonal pivot indices  | 
        
| type(linalg_state_type), | intent(out), | optional | :: | err | 
                 [optional] state return flag. On error if not requested, the code will stop  | 
        
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex(kind=dp), | intent(in) | :: | a(:,:) | 
                 Input matrix a[n,n].  | 
        ||
| complex(kind=dp), | intent(out) | :: | inva(:,:) | 
                 Inverse matrix a[n,n].  | 
        ||
| integer(kind=ilp), | intent(inout), | optional, | target | :: | pivot(:) | 
                 [optional] Storage array for the diagonal pivot indices  | 
        
| type(linalg_state_type), | intent(out), | optional | :: | err | 
                 [optional] state return flag. On error if not requested, the code will stop  |