NAG FL Interface
f07adf (dgetrf)
1
Purpose
f07adf computes the factorization of a real by matrix.
2
Specification
Fortran Interface
Integer, Intent (In) |
:: |
m, n, lda |
Integer, Intent (Out) |
:: |
ipiv(min(m,n)), info |
Real (Kind=nag_wp), Intent (Inout) |
:: |
a(lda,*) |
|
C Header Interface
#include <nag.h>
void |
f07adf_ (const Integer *m, const Integer *n, double a[], const Integer *lda, Integer ipiv[], Integer *info) |
|
C++ Header Interface
#include <nag.h> extern "C" {
void |
f07adf_ (const Integer &m, const Integer &n, double a[], const Integer &lda, Integer ipiv[], Integer &info) |
}
|
The routine may be called by the names f07adf, nagf_lapacklin_dgetrf or its LAPACK name dgetrf.
3
Description
f07adf forms the factorization of a real by matrix as , where is a permutation matrix, is lower triangular with unit diagonal elements (lower trapezoidal if ) and is upper triangular (upper trapezoidal if ). Usually is square , and both and are triangular. The routine uses partial pivoting, with row interchanges.
4
References
Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore
5
Arguments
-
1:
– Integer
Input
-
On entry: , the number of rows of the matrix .
Constraint:
.
-
2:
– Integer
Input
-
On entry: , the number of columns of the matrix .
Constraint:
.
-
3:
– Real (Kind=nag_wp) array
Input/Output
-
Note: the second dimension of the array
a
must be at least
.
On entry: the by matrix .
On exit: the factors and from the factorization ; the unit diagonal elements of are not stored.
-
4:
– Integer
Input
-
On entry: the first dimension of the array
a as declared in the (sub)program from which
f07adf is called.
Constraint:
.
-
5:
– Integer array
Output
-
On exit: the pivot indices that define the permutation matrix. At the
th step, if then row of the matrix was interchanged with row , for . indicates that, at the th step, a row interchange was not required.
-
6:
– Integer
Output
-
On exit:
unless the routine detects an error (see
Section 6).
6
Error Indicators and Warnings
If , argument had an illegal value. An explanatory message is output, and execution of the program is terminated.
-
Element of the diagonal is exactly zero.
The factorization has been completed, but the factor
is exactly singular, and division by zero will occur if it is used to solve
a system of equations.
7
Accuracy
The computed factors
and
are the exact factors of a perturbed matrix
, where
is a modest linear function of
, and
is the
machine precision.
8
Parallelism and Performance
f07adf is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
f07adf makes calls to BLAS and/or LAPACK routines, which may be threaded within the vendor library used by this implementation. Consult the documentation for the vendor library for further information.
Please consult the
X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this routine. Please also consult the
Users' Note for your implementation for any additional implementation-specific information.
The total number of floating-point operations is approximately if (the usual case), if and if .
A call to this routine with
may be followed by calls to the routines:
- f07aef to solve or ;
- f07agf to estimate the condition number of ;
- f07ajf to compute the inverse of .
The complex analogue of this routine is
f07arf.
10
Example
This example computes the
factorization of the matrix
, where
10.1
Program Text
10.2
Program Data
10.3
Program Results