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
);
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

in
ltrans

If nonzero, A-transpose will be used. If zero, A will be used.

in
na

The size of the matrix A. It may (only) be 1 or 2.

in
nw

1 if “w” is real, 2 if “w” is complex. It may only be 1 or 2.

in
smin

The desired lower bound on the singular values of A.

in
ca

The coefficient c, which A is multiplied by.

in
A

Double precision array, dimension (lda, na). The NA x NA matrix A.

in
lda

The leading dimension of A. lda >= na.

in
d1

The 1,1 element in the diagonal matrix D.

in
d2

The 2,2 element in the diagonal matrix D. Not used if na=1.

in
B

Double precision array, dimension (ldb, nw). The NA x NW matrix B.

in
ldb

The leading dimension of B. ldb >= na.

in
wr

The real part of the scalar “w”.

in
wi

The imaginary part of the scalar “w”. Not used if nw=1.

out
X

Double precision array, dimension (ldx, nw). The NA x NW solution matrix X.

in
ldx

The leading dimension of X. ldx >= na.

out
scale

The scale factor that B must be multiplied by. At most 1.

out
xnorm

The infinity-norm of X.

out
info

  • = 0: No error, (ca A - w D) did not have to be perturbed.

  • = 1: (ca A - w D) had to be perturbed.

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
);
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 &#8212; 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

in
ltrans

If nonzero, A-transpose will be used. If zero, A will be used.

in
na

The size of the matrix A. It may (only) be 1 or 2.

in
nw

1 if “w” is real, 2 if “w” is complex. It may only be 1 or 2.

in
smin

The desired lower bound on the singular values of A.

in
ca

The coefficient c, which A is multiplied by.

in
A

Double precision array, dimension (lda, na). The NA x NA matrix A.

in
lda

The leading dimension of A. lda >= na.

in
d1

The 1,1 element in the diagonal matrix D.

in
d2

The 2,2 element in the diagonal matrix D. Not used if na=1.

in
B

Double precision array, dimension (ldb, nw). The NA x NW matrix B.

in
ldb

The leading dimension of B. ldb >= na.

in
wr

The real part of the scalar “w”.

in
wi

The imaginary part of the scalar “w”. Not used if nw=1.

out
X

Double precision array, dimension (ldx, nw). The NA x NW solution matrix X.

in
ldx

The leading dimension of X. ldx >= na.

out
scale

The scale factor that B must be multiplied by. At most 1.

out
xnorm

The infinity-norm of X.

out
info

  • = 0: No error, (ca A - w D) did not have to be perturbed.

  • = 1: (ca A - w D) had to be perturbed.