LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
subroutine dlsets ( integer  M,
integer  P,
integer  N,
double precision, dimension( lda, * )  A,
double precision, dimension( lda, * )  AF,
integer  LDA,
double precision, dimension( ldb, * )  B,
double precision, dimension( ldb, * )  BF,
integer  LDB,
double precision, dimension( * )  C,
double precision, dimension( * )  CF,
double precision, dimension( * )  D,
double precision, dimension( * )  DF,
double precision, dimension( * )  X,
double precision, dimension( lwork )  WORK,
integer  LWORK,
double precision, dimension( * )  RWORK,
double precision, dimension( 2 )  RESULT 
)

DLSETS

Purpose:
 DLSETS tests DGGLSE - 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 DOUBLE PRECISION array, dimension (LDA,N)
          The M-by-N matrix A.
[out]AF
          AF is DOUBLE PRECISION 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 DOUBLE PRECISION array, dimension (LDB,N)
          The P-by-N matrix A.
[out]BF
          BF is DOUBLE PRECISION 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 DOUBLE PRECISION array, dimension( M )
          the vector C in the LSE problem.
[out]CF
          CF is DOUBLE PRECISION array, dimension( M )
[in]D
          D is DOUBLE PRECISION array, dimension( P )
          the vector D in the LSE problem.
[out]DF
          DF is DOUBLE PRECISION array, dimension( P )
[out]X
          X is DOUBLE PRECISION array, dimension( N )
          solution vector X in the LSE problem.
[out]WORK
          WORK is DOUBLE PRECISION 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
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2011

Definition at line 153 of file dlsets.f.

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

Here is the call graph for this function:

Here is the caller graph for this function: