?geequ
?geequ
Computes row and column scaling factors intended to equilibrate a general matrix and reduce its condition number.
Syntax
lapack_int LAPACKE_sgeequ
(
int
matrix_layout
,
lapack_int
m
,
lapack_int
n
,
const float*
a
,
lapack_int
lda
,
float*
r
,
float*
c
,
float*
rowcnd
,
float*
colcnd
,
float*
amax
);
lapack_int LAPACKE_dgeequ
(
int
matrix_layout
,
lapack_int
m
,
lapack_int
n
,
const double*
a
,
lapack_int
lda
,
double*
r
,
double*
c
,
double*
rowcnd
,
double*
colcnd
,
double*
amax
);
lapack_int LAPACKE_cgeequ
(
int
matrix_layout
,
lapack_int
m
,
lapack_int
n
,
const lapack_complex_float*
a
,
lapack_int
lda
,
float*
r
,
float*
c
,
float*
rowcnd
,
float*
colcnd
,
float*
amax
);
lapack_int LAPACKE_zgeequ
(
int
matrix_layout
,
lapack_int
m
,
lapack_int
n
,
const lapack_complex_double*
a
,
lapack_int
lda
,
double*
r
,
double*
c
,
double*
rowcnd
,
double*
colcnd
,
double*
amax
);
Include Files
- mkl.h
Description
The routine computes row and column scalings intended to equilibrate an =* have absolute value 1.
m
-by-n
matrix A
and reduce its condition number. The output array r
returns the row scale factors and the array c
the column scale factors. These factors are chosen to try to make the largest element in each row and column of the matrix B
with elements b
i
j
r
[i-1]*a
i
j
c
[j-1]Input Parameters
- matrix_layout
- Specifies whether matrix storage layout is row major (LAPACK_ROW_MAJOR) or column major (LAPACK_COL_MAJOR).
- m
- The number of rows of the matrixA;.m≥0
- n
- The number of columns of the matrixA;.n≥0
- a
- Array: sizemax(1,.lda*n) for column major layout and max(1,lda*m) for row major layoutContains them-by-nmatrixAwhose equilibration factors are to be computed.
- lda
- The leading dimension ofa;.lda≥max(1,m)
Output Parameters
- r,c
- Arrays:r(sizem),c(sizen).If, orinfo= 0info>m, the arrayrcontains the row scale factors of the matrixA.If, the arrayinfo= 0ccontains the column scale factors of the matrixA.
- rowcnd
- Iforinfo= 0,info>mrowcndcontains the ratio of the smallestto the largestr[i].r[i]
- colcnd
- If,info= 0colcndcontains the ratio of the smallestto the largestc[i].c[i]
- amax
- Absolute value of the largest element of the matrixA.
Return Values
This function returns a value
info
.If , the execution is successful.
info
= 0If , parameter
info
= -i
i
had an illegal value.If , , and
info
= i
i
> 0i
≤
m
i
-th row of A
is exactly zero;i
>
m
i
-m
)th column of A
is exactly zero.Application Notes
All the components of
r
and c
are restricted to be between SMLNUM
= smallest safe number and BIGNUM
= largest safe number. Use of these scaling factors is not guaranteed to reduce the condition number of A
but works well in practice.SMLNUM
and
BIGNUM
are parameters representing machine precision. You can use the
?lamch
routines to compute them. For example, compute single precision values of
SMLNUM
and
BIGNUM
as follows:
SMLNUM = slamch ('s') BIGNUM = 1 / SMLNUM
If and
rowcnd
≥
0.1amax
is neither too large nor too small, it is not worth scaling by r
. If , it is not worth scaling by
colcnd
≥
0.1c
.If
amax
is very close to SMLNUM
or very close to BIGNUM
, the matrix A
should be scaled.