DLSSUD(3)

SYNOPSIS
SUBROUTINE DLSSUD (A, X, B, N, M, NRDA, U, NRDU, IFLAG, MLSO, + IRANK, ISCALE, Q, DIAG, KPIVOT, S, DIV, TD, ISFLG, SCALES)

NAME
dlssud - Subsidiary to DBVSUP and DSUDS

LIBRARY
SLATEC

TYPE
DOUBLE PRECISION (LSSUDS-S, DLSSUD-D)

AUTHOR
Watts, H. A., (SNLA)

DESCRIPTION
DLSSUD solves the underdetermined system of equations A Z = B, where A is N by M and N .LE. M. In particular, if rank A equals IRA, a vector X and a matrix U are determined such that X is the UNIQUE solution of smallest length, satisfying A X = B, and the columns of U form an orthonormal basis for the null space of A, satisfying A U = 0 . Then all solutions Z are given by Z = X + C(1)*U(1) + ..... + C(M-IRA)*U(M-IRA) where U(J) represents the J-th column of U and the C(J) are arbitrary constants. If the system of equations are not compatible, only the least squares solution of minimal length is computed. ********************************************************************* INPUT ********************************************************************* A -- Contains the matrix of N equations in M unknowns, A remains unchanged, must be dimensioned NRDA by M. X -- Solution array of length at least M. B -- Given constant vector of length N, B remains unchanged. N -- Number of equations, N greater or equal to 1. M -- Number of unknowns, M greater or equal to N. NRDA -- Row dimension of A, NRDA greater or equal to N. U -- Matrix used for solution, must be dimensioned NRDU by (M - rank of A). (storage for U may be ignored when only the minimal length solution X is desired) NRDU -- Row dimension of U, NRDU greater or equal to M. (if only the minimal length solution is wanted, NRDU=0 is acceptable) IFLAG -- Status indicator =0 for the first call (and for each new problem defined by a new matrix A) when the matrix data is treated as exact =-K for the first call (and for each new problem defined by a new matrix A) when the matrix data is assumed to be accurate to about K digits. =1 for subsequent calls whenever the matrix A has already been decomposed (problems with new vectors B but same matrix A can be handled efficiently). MLSO -- =0 if only the minimal length solution is wanted. =1 if the complete solution is wanted, includes the linear space defined by the matrix U. IRANK -- Variable used for the rank of A, set by the code. ISCALE -- Scaling indicator =-1 if the matrix A is to be pre-scaled by columns when appropriate. If the scaling indicator is not equal to -1 no scaling will be attempted. For most problems scaling will probably not be necessary. Q -- Matrix used for the transformation, must be dimensioned NRDA by M. DIAG,KPIVOT,S, -- Arrays of length at least N used for internal DIV,TD,SCALES storage (except for SCALES which is M). ISFLG -- Storage for an internal variable. ********************************************************************* OUTPUT ********************************************************************* IFLAG -- Status indicator =1 if solution was obtained. =2 if improper input is detected. =3 if rank of matrix is less than N. To continue, simply reset IFLAG=1 and call DLSSUD again. =4 if the system of equations appears to be inconsistent. However, the least squares solution of minimal length was obtained. X -- Minimal length least squares solution of A Z = B IRANK -- Numerically determined rank of A, must not be altered on succeeding calls with input values of IFLAG=1. U -- Matrix whose M-IRANK columns are mutually orthogonal unit vectors which span the null space of A. This is to be ignored when MLSO was set to zero or IFLAG=4 on output. Q -- Contains the strictly upper triangular part of the reduced matrix and transformation information. DIAG -- Contains the diagonal elements of the triangular reduced matrix. KPIVOT -- Contains the pivotal information. The row interchanges performed on the original matrix are recorded here. S -- Contains the solution of the lower triangular system. DIV,TD -- Contains transformation information for rank deficient problems. SCALES -- Contains the column scaling parameters. *********************************************************************

SEE ALSO
DBVSUP, DSUDS

REFERENCES
H. A. Watts, Solving linear least squares problems using SODS/SUDS/CODS, Sandia Report SAND77-0683, Sandia Laboratories, 1977.

ROUTINES CALLED
D1MACH, DDOT, DOHTRL, DORTHR, J4SAVE, XERMAX, XERMSG, XGETF, XSETF

REVISION HISTORY (YYMMDD)
750601 DATE WRITTEN
890531 Changed all specific intrinsics to generic. (WRB)
891214 Prologue converted to Version 4.0 format. (BAB)
900315 CALLs to XERROR changed to CALLs to XERMSG. (THJ)
900328 Added TYPE section. (WRB)
910408 Updated the AUTHOR and REFERENCES sections. (WRB)
920501 Reformatted the REFERENCES section. (WRB)