sqrdc
sqrdc - (obsolete) compute the QR factorization of a general matrix A. It is typical to follow
a call to SQRDC with a call to SQRSL to solve Ax = b or to SPODI to compute
the determinant of A.
SUBROUTINE SQRDC( A, LDA, N, P, QRAUX, IPIVOT, WORK, JOB)
INTEGER LDA, N, P, JOB
INTEGER IPIVOT(*)
REAL A(LDA,*), QRAUX(*), WORK(*)
SUBROUTINE SQRDC_64( A, LDA, N, P, QRAUX, IPIVOT, WORK, JOB)
INTEGER*8 LDA, N, P, JOB
INTEGER*8 IPIVOT(*)
REAL A(LDA,*), QRAUX(*), WORK(*)
#include <sunperf.h>
void sqrdc(float *a, int lda, int n, int p, float *qraux, int *ipivot, int job);
void sqrdc_64(float *a, long lda, long n, long p, float *qraux, long *ipivot, long job);
-
* A (input/output)
-
On entry, the matrix A.
On exit, the upper triangle of A contains the matrix R and the strict
lower triangle of A contains information that will allow construction
of the matrix Q. If pivoting was requested, A contains the factorization
of the original matrix A permuted by the requested pivots.
-
* 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 A. N >= 0.
-
* P (input)
-
Number of columns in the matrix A. P >= 0.
-
* QRAUX (output)
-
On exit, contains information required to construct the
orthogonal matrix Q.
-
* IPIVOT (input)
-
If JOB selected no pivoting, then IPIVOT is not referenced.
If JOB selected pivoting, then on entry to the subroutines, IPIVOT contains
integers representing array indices that control the selection of pivot
elements from the diagonal of A according to the system below:
IPIVOT(k) > 0 A(k,k) is an initial element.
IPIVOT(k) = 0 A(k,k) is a free element.
IPIVOT(k) < 0 A(k,k) is a final element.
Before the decomposition is computed, symmetric row and column interchanges
are used to move initial elements to the beginning of A and final elements
to the end of A. During the computation, symmetric row and column
interchanges are used to move the largest remaining free diagonal element
into the pivot position. On exit, IPIVOT(k) contains the index of the
diagonal element of A that was moved into the kth position.
-
* WORK (workspace)
-
Scratch array with a dimension of N. WORK is not referenced if
JOB = 0.
-
* JOB (input)
-
Determines how the factorization is done:
not 0 with pivoting