SRC/dggglm.f(3)
π NAME
SRC/dggglm.f is the name section, bestie β yes, the whole thing. This is the Library Functions Manual page for SRC/dggglm.f(3), and the star of the show is the DGGGLM subroutine. Periodt. π
π¦ SYNOPSIS
π§ Functions/Subroutines
subroutine dggglm (n, m, p, a, lda, b, ldb, d, x, y, work, lwork, info)
DGGGLM
π Function/Subroutine Documentation
π«Ά subroutine dggglm
subroutine dggglm (integer n, integer m, integer p, double precision, dimension( lda, * ) a, integer lda, double precision, dimension( ldb, * ) b, integer ldb, double precision, dimension( * ) d, double precision, dimension( * ) x, double precision, dimension( * ) y, double precision, dimension( * ) work, integer lwork, integer info)
DGGGLM
DGGGLM is literally the main character here. β¨
β¨ Purpose β¨
Okay so DGGGLM solves a general Gauss-Markov linear model (GLM) problem, and the vibe is constrained minimization:
minimize || y ||_2 subject to d = A*x + B*y
x
Here A is an N-by-M matrix, B is an N-by-P matrix, and d is a given N-vector. The assumptions are M <= N <= M+P, and:
rank(A) = M and rank( A B ) = N.
Under these assumptions, the constrained equation is always consistent, and there is a unique solution x and a minimal 2-norm solution y. Theyβre obtained using a generalized QR factorization of the matrices (A, B) given by:
A = Q*(R), B = Q*T*Z.
(0)
In particular, if matrix B is square nonsingular, then the problem GLM is equivalent to the following weighted linear least squares problem:
minimize || inv(B)*(d-A*x) ||_2
x
where inv(B) denotes the inverse of B.
β οΈ bestie, warning: Callers of this subroutine should note that the singularity/rank-deficiency checks implemented in this subroutine are rudimentary. The DTRTRS subroutine called by this subroutine only signals a failure due to singularity if the problem is exactly singular.
π also important: It is conceivable for one (or more) of the factors involved in the generalized QR factorization of the pair (A, B) to be subnormally close to singularity without this subroutine signalling an error. The solutions computed for such almost-rank-deficient problems may be less accurate due to a loss of numerical precision.
π Parameters π
NβNisINTEGER. The number of rows of the matricesAandB.N >= 0.MβMisINTEGER. The number of columns of the matrixA.0 <= M <= N.PβPisINTEGER. The number of columns of the matrixB.P >= N-M.AβAisDOUBLE PRECISIONarray, dimension(LDA,M). On entry, theN-by-MmatrixA. On exit, the upper triangular part of the arrayAcontains theM-by-Mupper triangular matrixR.LDAβLDAisINTEGER. The leading dimension of the arrayA.LDA >= max(1,N).BβBisDOUBLE PRECISIONarray, dimension(LDB,P). On entry, theN-by-PmatrixB. On exit, ifN <= P, the upper triangle of the subarrayB(1:N,P-N+1:P)contains theN-by-Nupper triangular matrixT; ifN > P, the elements on and above the(N-P)thsubdiagonal contain theN-by-Pupper trapezoidal matrixT.LDBβLDBisINTEGER. The leading dimension of the arrayB.LDB >= max(1,N).DβDisDOUBLE PRECISIONarray, dimension(N). On entry,Dis the left hand side of the GLM equation. On exit,Dis destroyed. πXβXisDOUBLE PRECISIONarray, dimension(M).YβYisDOUBLE PRECISIONarray, dimension(P). On exit,XandYare the solutions of the GLM problem.WORKβWORKisDOUBLE PRECISIONarray, dimension(MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the optimalLWORK.LWORKβLWORKisINTEGER. The dimension of the arrayWORK.LWORK >= max(1,N+M+P). For optimum performance,LWORK >= M+min(N,P)+max(N,P)*NB, whereNBis an upper bound for the optimal blocksizes forDGEQRF,SGERQF,DORMQRandSORMRQ.- If
LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of theWORKarray, returns this value as the first entry of theWORKarray, and no error message related toLWORKis issued byXERBLA.
- If
INFOβINFOisINTEGER.= 0: successful exit.< 0: ifINFO = -i, thei-th argument had an illegal value.= 1: the upper triangular factorRassociated withAin the generalized QR factorization of the pair(A, B)is exactly singular, so thatrank(A) < M; the least squares solution could not be computed.= 2: the bottom(N-M)by(N-M)part of the upper trapezoidal factorTassociated withBin the generalized QR factorization of the pair(A, B)is exactly singular, so thatrank( A B ) < N; the least squares solution could not be computed.
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 193 of file dggglm.f.
π Author π
Generated automatically by Doxygen for LAPACK from the source code.
Thatβs the page, bestie! π«Ά Itβs from LAPACK, Version 3.12.0, and the source/page is SRC/dggglm.f(3). The footer didnβt print a date, so Iβm not inventing one β just giving you the exact version and source vibes. β¨π
π¦ where this page comes from
- arch rolling: lapack-doc 3.12.1-2 Β· custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms