laln2#
Functions
-
void slaln2(const INT ltrans, const INT na, const INT nw, const f32 smin, const f32 ca, const f32 *A, const INT lda, const f32 d1, const f32 d2, const f32 *B, const INT ldb, const f32 wr, const f32 wi, f32 *X, const INT ldx, f32 *scale, f32 *xnorm, INT *info)#
SLALN2 solves a system of the form (ca A - w D ) X = s B or (ca A**T - w D) X = s B with possible scaling (“s”) and perturbation of A.
(A**T means A-transpose.)
A is an NA x NA real matrix, ca is a real scalar, D is an NA x NA real diagonal matrix, w is a real or complex value, and X and B are NA x 1 matrices — real if w is real, complex if w is complex. NA may be 1 or 2.
If w is complex, X and B are represented as NA x 2 matrices, the first column of each being the real part and the second being the imaginary part.
“s” is a scaling factor (<= 1), computed by SLALN2, which is so chosen that X can be computed without overflow. X is further scaled if necessary to assure that norm(ca A - w D)*norm(X) is less than overflow.
If both singular values of (ca A - w D) are less than SMIN, SMIN*identity will be used instead of (ca A - w D). If only one singular value is less than SMIN, one element of (ca A - w D) will be perturbed enough to make the smallest singular value roughly SMIN. If both singular values are at least SMIN, (ca A - w D) will not be perturbed. In any case, the perturbation will be at most some small multiple of max( SMIN, ulp*norm(ca A - w D) ). The singular values are computed by infinity-norm approximations, and thus will only be correct to a factor of 2 or so.
Note: all input quantities are assumed to be smaller than overflow by a reasonable factor. (See BIGNUM.)
Parameters
inltransIf nonzero, A-transpose will be used. If zero, A will be used.
innaThe size of the matrix A. It may (only) be 1 or 2.
innw1 if “w” is real, 2 if “w” is complex. It may only be 1 or 2.
insminThe desired lower bound on the singular values of A.
incaThe coefficient c, which A is multiplied by.
inADouble precision array, dimension (lda, na). The NA x NA matrix A.
inldaThe leading dimension of A. lda >= na.
ind1The 1,1 element in the diagonal matrix D.
ind2The 2,2 element in the diagonal matrix D. Not used if na=1.
inBDouble precision array, dimension (ldb, nw). The NA x NW matrix B.
inldbThe leading dimension of B. ldb >= na.
inwrThe real part of the scalar “w”.
inwiThe imaginary part of the scalar “w”. Not used if nw=1.
outXDouble precision array, dimension (ldx, nw). The NA x NW solution matrix X.
inldxThe leading dimension of X. ldx >= na.
outscaleThe scale factor that B must be multiplied by. At most 1.
outxnormThe infinity-norm of X.
outinfo= 0: No error, (ca A - w D) did not have to be perturbed.
= 1: (ca A - w D) had to be perturbed.
void slaln2(
const INT ltrans,
const INT na,
const INT nw,
const f32 smin,
const f32 ca,
const f32* A,
const INT lda,
const f32 d1,
const f32 d2,
const f32* B,
const INT ldb,
const f32 wr,
const f32 wi,
f32* X,
const INT ldx,
f32* scale,
f32* xnorm,
INT* info
);
Functions
-
void dlaln2(const INT ltrans, const INT na, const INT nw, const f64 smin, const f64 ca, const f64 *A, const INT lda, const f64 d1, const f64 d2, const f64 *B, const INT ldb, const f64 wr, const f64 wi, f64 *X, const INT ldx, f64 *scale, f64 *xnorm, INT *info)#
DLALN2 solves a system of the form (ca A - w D ) X = s B or (ca A**T - w D) X = s B with possible scaling (“s”) and perturbation of A.
(A**T means A-transpose.)
A is an NA x NA real matrix, ca is a real scalar, D is an NA x NA real diagonal matrix, w is a real or complex value, and X and B are NA x 1 matrices — real if w is real, complex if w is complex. NA may be 1 or 2.
If w is complex, X and B are represented as NA x 2 matrices, the first column of each being the real part and the second being the imaginary part.
“s” is a scaling factor (<= 1), computed by DLALN2, which is so chosen that X can be computed without overflow. X is further scaled if necessary to assure that norm(ca A - w D)*norm(X) is less than overflow.
If both singular values of (ca A - w D) are less than SMIN, SMIN*identity will be used instead of (ca A - w D). If only one singular value is less than SMIN, one element of (ca A - w D) will be perturbed enough to make the smallest singular value roughly SMIN. If both singular values are at least SMIN, (ca A - w D) will not be perturbed. In any case, the perturbation will be at most some small multiple of max( SMIN, ulp*norm(ca A - w D) ). The singular values are computed by infinity-norm approximations, and thus will only be correct to a factor of 2 or so.
Note: all input quantities are assumed to be smaller than overflow by a reasonable factor. (See BIGNUM.)
Parameters
inltransIf nonzero, A-transpose will be used. If zero, A will be used.
innaThe size of the matrix A. It may (only) be 1 or 2.
innw1 if “w” is real, 2 if “w” is complex. It may only be 1 or 2.
insminThe desired lower bound on the singular values of A.
incaThe coefficient c, which A is multiplied by.
inADouble precision array, dimension (lda, na). The NA x NA matrix A.
inldaThe leading dimension of A. lda >= na.
ind1The 1,1 element in the diagonal matrix D.
ind2The 2,2 element in the diagonal matrix D. Not used if na=1.
inBDouble precision array, dimension (ldb, nw). The NA x NW matrix B.
inldbThe leading dimension of B. ldb >= na.
inwrThe real part of the scalar “w”.
inwiThe imaginary part of the scalar “w”. Not used if nw=1.
outXDouble precision array, dimension (ldx, nw). The NA x NW solution matrix X.
inldxThe leading dimension of X. ldx >= na.
outscaleThe scale factor that B must be multiplied by. At most 1.
outxnormThe infinity-norm of X.
outinfo= 0: No error, (ca A - w D) did not have to be perturbed.
= 1: (ca A - w D) had to be perturbed.
void dlaln2(
const INT ltrans,
const INT na,
const INT nw,
const f64 smin,
const f64 ca,
const f64* A,
const INT lda,
const f64 d1,
const f64 d2,
const f64* B,
const INT ldb,
const f64 wr,
const f64 wi,
f64* X,
const INT ldx,
f64* scale,
f64* xnorm,
INT* info
);