ZLATTB(3)
πΈ ZLATTB(3) β the lapack girlie's guide to triangular test matrices π
okay so bestie, this one is from zlattb.f(3) in the Library Functions Manual, and it's literally your cheat sheet for generating triangular test matrices. no cap, it's giving linear algebra main character energy π
β¨ SYNOPSIS
subroutine ZLATTB (imat, uplo, trans, diag, iseed, n, kd, ab, ldab, b,
work, rwork, info)
okay so that's the whole function name and list of arguments. yes it's long. yes it's iconic. the actual function signature lower down is:
subroutine ZLATTB (integer imat, character uplo, character trans, character
diag, integer, dimension( 4 ) iseed, integer n, integer kd, complex*16,
dimension( ldab, * ) ab, integer ldab, complex*16, dimension( * ) b,
complex*16, dimension( * ) work, double precision, dimension( * ) rwork,
integer info)
she's a real one for showing up with all those types π«Ά ZLATTB is the function name, and also the subroutine itself β twin vibes.
π Function/Subroutine Documentation
so ZLATTB generates a triangular test matrix in 2-dimensional storage. IMAT and UPLO are the two things that uniquely specify all the properties of your test matrix, and that matrix gets handed back to you in the array A. periodt. π₯
π Purpose
okay so here's the whole vibe:
!>
!> ZLATTB generates a triangular test matrix in 2-dimensional storage.
!> IMAT and UPLO uniquely specify the properties of the test matrix,
!> which is returned in the array A.
!>
literally so straightforward and yet so powerful, ngl.
π Parameters
π¦ IMAT
!> IMAT is INTEGER
!> An integer key describing which matrix to generate for this
!> path.
!>
so IMAT is an INTEGER, and it's basically the little number key that tells the generator which matrix to make for this path. like a vibe selector, yk? π
π UPLO
!> UPLO is CHARACTER*1
!> Specifies whether the matrix A will be upper or lower
!> triangular.
!> = 'U': Upper triangular
!> = 'L': Lower triangular
!>
this one is CHARACTER*1 and it decides if matrix A is upper or lower triangular:
'U'β upper triangular β¬οΈ'L'β lower triangular β¬οΈ
πΈ TRANS
!> TRANS is CHARACTER*1
!> Specifies whether the matrix or its transpose will be used.
!> = 'N': No transpose
!> = 'T': Transpose
!> = 'C': Conjugate transpose (= transpose)
!>
CHARACTER*1 again β she's consistent β and it says whether we use the matrix itself or its transpose:
'N'β no transpose, keep her as-is π·'T'β transpose π'C'β conjugate transpose (which literally equals transpose here) π
π§ DIAG
!> DIAG is CHARACTER*1
!> Specifies whether or not the matrix A is unit triangular.
!> = 'N': Non-unit triangular
!> = 'U': Unit triangular
!>
another CHARACTER*1, and it tells you whether matrix A is unit triangular or not:
'N'β non-unit triangular π«'U'β unit triangular β
β ISEED
!> ISEED is INTEGER array, dimension (4)
!> The seed vector for the random number generator (used in
!> ZLATMS). Modified on exit.
!>
ISEED is INTEGER array, dimension (4) β the seed vector for the random number generator (the one used in ZLATMS). heads up bestie: it gets modified on exit, so don't be surprised when it's not the same when you come back. π
π N
!> N is INTEGER
!> The order of the matrix to be generated.
!>
N is an INTEGER β the order of the matrix you're generating. that's it. she's the size. π
π KD
!> KD is INTEGER
!> The number of superdiagonals or subdiagonals of the banded
!> triangular matrix A. KD >= 0.
!>
KD is an INTEGER β the number of superdiagonals or subdiagonals of the banded triangular matrix A. and bestie, KD >= 0, okay? don't try anything funny. π€¨
π AB
!> AB is COMPLEX*16 array, dimension (LDAB,N)
!> The upper or lower triangular banded matrix A, stored in the
!> first KD+1 rows of AB. Let j be a column of A, 1<=j<=n.
!> If UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j.
!> If UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
!>
AB is COMPLEX*16 array, dimension (LDAB,N) β the upper or lower triangular banded matrix A, stored in the first KD+1 rows of AB. and here's the indexing tea, where j is a column of A, 1<=j<=n:
- if
UPLO = 'U':AB(kd+1+i-j,j) = A(i,j)formax(1,j-kd)<=i<=jπ - if
UPLO = 'L':AB(1+i-j,j) = A(i,j)forj<=i<=min(n,j+kd)β¨
copy those exactly, bestie, they're literally the map πΊοΈ
π LDAB
!> LDAB is INTEGER
!> The leading dimension of the array AB. LDAB >= KD+1.
!>
LDAB is an INTEGER β the leading dimension of the array AB. and the requirement is LDAB >= KD+1. respect the rule. β οΈ
π¦ B
!> B is COMPLEX*16 array, dimension (N)
!>
B is COMPLEX*16 array, dimension (N). short and sweet. π¬
π WORK
!> WORK is COMPLEX*16 array, dimension (2*N)
!>
WORK is COMPLEX*16 array, dimension (2*N). it works hard so you don't have to. πͺ
πΈ RWORK
!> RWORK is DOUBLE PRECISION array, dimension (N)
!>
RWORK is DOUBLE PRECISION array, dimension (N). the real MVP (literally, it's the real-valued one). π·
π INFO
!> INFO is INTEGER
!> = 0: successful exit
!> < 0: if INFO = -i, the i-th argument had an illegal value
!>
INFO is an INTEGER and here's the status report:
= 0β successful exit, slay! β< 0β ifINFO = -i, then the i-th argument had an illegal value π¨
π Author
the legends themselves:
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
definition at line 139 of file zlattb.f. iconic. π
β Author (again, yes really)
this page was generated automatically by Doxygen for LAPACK from the source code. so if you see any typos, blame the robots (jk, ily doxygen) π€π
okay bestie that's the whole thing π
this was LAPACK, Version 3.12.0, and the page you're reading is /home/abui...IN/zlattb.f(3) β go forth and generate those triangular test matrices, you beautiful genius π¦β¨π
π¦ where this page comes from
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms