cqrsl
cqrsl - (obsolete) solve the linear system Ax = b for a general matrix A, which has been QR-
factored by CQRDC, and vectors b and x.
SUBROUTINE CQRSL( A, LDA, N, K, QRAUX, Y, QY, QTY, B, RESID, AB,
* JOB, INFO)
COMPLEX A(LDA,*), QRAUX(*), Y(*), QY(*), QTY(*), B(*), RESID(*), AB(*)
INTEGER LDA, N, K, JOB, INFO
SUBROUTINE CQRSL_64( A, LDA, N, K, QRAUX, Y, QY, QTY, B, RESID, AB,
* JOB, INFO)
COMPLEX A(LDA,*), QRAUX(*), Y(*), QY(*), QTY(*), B(*), RESID(*), AB(*)
INTEGER*8 LDA, N, K, JOB, INFO
#include <sunperf.h>
void cqrsl(complex *a, int lda, int n, int k, complex *qraux, complex *y, complex *qy, complex *qty, complex *b, complex *resid, complex *ab, int job, int *info);
void cqrsl_64(complex *a, long lda, long n, long k, complex *qraux, complex *y, complex *qy, complex *qty, complex *b, complex *resid, complex *ab, long job, long *info);
-
* A (input)
-
Part of the QR factorization of matrix A as computed by CQRDC.
-
* LDA (input)
-
Leading dimension of the array A as specified in a dimension
or type statement. LDA >= max(1,N).
-
* N (input)
-
Number of rows in the matrix AK where AK is described below. N >= 0.
-
* K (input)
-
Number of columns in the matrix AK where AK is described below.
K >= 0.
-
* QRAUX (input)
-
Auxiliary output from CQRDC.
-
* Y (input)
-
Vector to be manipulated by CQRSL.
-
* QY (output)
-
On exit, QY contains Q * Y if its computation has been requested in
JOB; QY is not referenced if its computation is not requested.
-
* QTY (output)
-
On exit, QTY contains QT * Y if its computation has been requested
in JOB; QTY is not referenced if its computation is not requested.
-
* B (input/output)
-
On entry, the right-hand side vector b.
On exit, the solution vector x. B is not referenced if its
computation is not requested.
-
* RESID (output)
-
On exit, RESID contains the least squares residual y - AK * b if
its computation has been requested.
RESID also is the orthogonal projection of y onto the orthogonal
complement of the column space of AK. RESID is not referenced if its
computation is not requested.
-
* AB (output)
-
On exit, AB contains the least squares approximation AK * b if
its computation has been requested. AB is the orthogonal projection of y
onto the column space of x. AB is not referenced if its computation is
not requested.
-
* JOB (input)
-
Integer in the form abcde; determines which operation or
operations the subroutine will perform:
a <> 0 compute QY
b, c, d, or e <> 0 compute QTY
c <> 0 compute B
d <> 0 compute RESID
e <> 0 compute AB
-
* INFO (output)
-
On exit:
INFO = 0 Subroutine completed normally.
INFO > 0 Returns a value k if the computation of B has been
requested and R is singular; the value of k is then the index of the
first zero element of R. The matrix AK is constructed from the factored
orthogonal matrix Q and upper triangular matrix R from CQRDC.