LAPACK 3.11.0 LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

## ◆ zlsets()

 subroutine zlsets ( integer M, integer P, integer N, complex*16, dimension( lda, * ) A, complex*16, dimension( lda, * ) AF, integer LDA, complex*16, dimension( ldb, * ) B, complex*16, dimension( ldb, * ) BF, integer LDB, complex*16, dimension( * ) C, complex*16, dimension( * ) CF, complex*16, dimension( * ) D, complex*16, dimension( * ) DF, complex*16, dimension( * ) X, complex*16, dimension( lwork ) WORK, integer LWORK, double precision, dimension( * ) RWORK, double precision, dimension( 2 ) RESULT )

ZLSETS

Purpose:
``` ZLSETS tests ZGGLSE - a subroutine for solving linear equality
constrained least square problem (LSE).```
Parameters
 [in] M ``` M is INTEGER The number of rows of the matrix A. M >= 0.``` [in] P ``` P is INTEGER The number of rows of the matrix B. P >= 0.``` [in] N ``` N is INTEGER The number of columns of the matrices A and B. N >= 0.``` [in] A ``` A is COMPLEX*16 array, dimension (LDA,N) The M-by-N matrix A.``` [out] AF ` AF is COMPLEX*16 array, dimension (LDA,N)` [in] LDA ``` LDA is INTEGER The leading dimension of the arrays A, AF, Q and R. LDA >= max(M,N).``` [in] B ``` B is COMPLEX*16 array, dimension (LDB,N) The P-by-N matrix A.``` [out] BF ` BF is COMPLEX*16 array, dimension (LDB,N)` [in] LDB ``` LDB is INTEGER The leading dimension of the arrays B, BF, V and S. LDB >= max(P,N).``` [in] C ``` C is COMPLEX*16 array, dimension( M ) the vector C in the LSE problem.``` [out] CF ` CF is COMPLEX*16 array, dimension( M )` [in] D ``` D is COMPLEX*16 array, dimension( P ) the vector D in the LSE problem.``` [out] DF ` DF is COMPLEX*16 array, dimension( P )` [out] X ``` X is COMPLEX*16 array, dimension( N ) solution vector X in the LSE problem.``` [out] WORK ` WORK is COMPLEX*16 array, dimension (LWORK)` [in] LWORK ``` LWORK is INTEGER The dimension of the array WORK.``` [out] RWORK ` RWORK is DOUBLE PRECISION array, dimension (M)` [out] RESULT ``` RESULT is DOUBLE PRECISION array, dimension (2) The test ratios: RESULT(1) = norm( A*x - c )/ norm(A)*norm(X)*EPS RESULT(2) = norm( B*x - d )/ norm(B)*norm(X)*EPS```

Definition at line 149 of file zlsets.f.

151*
152* -- LAPACK test routine --
153* -- LAPACK is a software package provided by Univ. of Tennessee, --
154* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
155*
156* .. Scalar Arguments ..
157 INTEGER LDA, LDB, LWORK, M, N, P
158* ..
159* .. Array Arguments ..
160*
161* ====================================================================
162*
163 DOUBLE PRECISION RESULT( 2 ), RWORK( * )
164 COMPLEX*16 A( LDA, * ), AF( LDA, * ), B( LDB, * ),
165 \$ BF( LDB, * ), C( * ), CF( * ), D( * ), DF( * ),
166 \$ WORK( LWORK ), X( * )
167* ..
168* .. Local Scalars ..
169 INTEGER INFO
170* ..
171* .. External Subroutines ..
172 EXTERNAL zcopy, zget02, zgglse, zlacpy
173* ..
174* .. Executable Statements ..
175*
176* Copy the matrices A and B to the arrays AF and BF,
177* and the vectors C and D to the arrays CF and DF,
178*
179 CALL zlacpy( 'Full', m, n, a, lda, af, lda )
180 CALL zlacpy( 'Full', p, n, b, ldb, bf, ldb )
181 CALL zcopy( m, c, 1, cf, 1 )
182 CALL zcopy( p, d, 1, df, 1 )
183*
184* Solve LSE problem
185*
186 CALL zgglse( m, n, p, af, lda, bf, ldb, cf, df, x, work, lwork,
187 \$ info )
188*
189* Test the residual for the solution of LSE
190*
191* Compute RESULT(1) = norm( A*x - c ) / norm(A)*norm(X)*EPS
192*
193 CALL zcopy( m, c, 1, cf, 1 )
194 CALL zcopy( p, d, 1, df, 1 )
195 CALL zget02( 'No transpose', m, n, 1, a, lda, x, n, cf, m, rwork,
196 \$ result( 1 ) )
197*
198* Compute result(2) = norm( B*x - d ) / norm(B)*norm(X)*EPS
199*
200 CALL zget02( 'No transpose', p, n, 1, b, ldb, x, n, df, p, rwork,
201 \$ result( 2 ) )
202*
203 RETURN
204*
205* End of ZLSETS
206*
subroutine zcopy(N, ZX, INCX, ZY, INCY)
ZCOPY
Definition: zcopy.f:81
subroutine zget02(TRANS, M, N, NRHS, A, LDA, X, LDX, B, LDB, RWORK, RESID)
ZGET02
Definition: zget02.f:134
subroutine zlacpy(UPLO, M, N, A, LDA, B, LDB)
ZLACPY copies all or part of one two-dimensional array to another.
Definition: zlacpy.f:103
subroutine zgglse(M, N, P, A, LDA, B, LDB, C, D, X, WORK, LWORK, INFO)
ZGGLSE solves overdetermined or underdetermined systems for OTHER matrices
Definition: zgglse.f:180
Here is the call graph for this function:
Here is the caller graph for this function: