 LAPACK  3.10.0 LAPACK: Linear Algebra PACKage

◆ clsets()

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

CLSETS

Purpose:
CLSETS tests CGGLSE - 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 array, dimension (LDA,N) The M-by-N matrix A. [out] AF AF is COMPLEX 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 array, dimension (LDB,N) The P-by-N matrix A. [out] BF BF is COMPLEX 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 array, dimension( M ) the vector C in the LSE problem. [out] CF CF is COMPLEX array, dimension( M ) [in] D D is COMPLEX array, dimension( P ) the vector D in the LSE problem. [out] DF DF is COMPLEX array, dimension( P ) [out] X X is COMPLEX array, dimension( N ) solution vector X in the LSE problem. [out] WORK WORK is COMPLEX array, dimension (LWORK) [in] LWORK LWORK is INTEGER The dimension of the array WORK. [out] RWORK RWORK is REAL array, dimension (M) [out] RESULT RESULT is REAL 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 153 of file clsets.f.

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