SRC/clangb.f(3)
π SRC/clangb.f β from the Library Functions Manual β¨
okay bestie, gather round, because today we're talking about clangb from <pink>LAPACK</pink> π (that's the Library Functions Manual, for the record β yes I read the header, I'm not a monster). This is a Fortran function living its best life in SRC/clangb.f, and it's honestly so useful it's giving main character energy. π
β¨ SYNOPSIS β¨
π¦ Functions/Subroutines
real function clangb (norm, n, kl, ku, ab, ldab, work)β CLANGB returns the value of the 1-norm, Frobenius norm, infinity-norm, or the largest absolute value of any element of a general band matrix. that's it, that's the whole vibe π
π§ Function/Subroutine Documentation π§
okay so picture this signature:
real function clangb (character norm, integer n, integer kl, integer ku,
complex, dimension( ldab, * ) ab, integer ldab, real, dimension( * )
work)
CLANGB returns the value of the 1-norm, Frobenius norm, infinity-norm, or the largest absolute value of any element of a general band matrix. literally what more could you want. β¨
πΈ Purpose:
!>
!> CLANGB returns the value of the one norm, or the Frobenius norm, or
!> the infinity norm, or the element of largest absolute value of an
!> n by n band matrix A, with kl sub-diagonals and ku super-diagonals.
!>
so yeah β an n by n band matrix A, with kl sub-diagonals and ku super-diagonals, and you get to pick which norm you want. iconic behavior, no notes. π
π Returns
CLANGB. like, that's the return value, bestie. here's the whole menu verbatim:
!>
!> CLANGB = ( max(abs(A(i,j))), NORM = 'M' or 'm'
!> (
!> ( norm1(A), NORM = '1', 'O' or 'o'
!> (
!> ( normI(A), NORM = 'I' or 'i'
!> (
!> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
!>
!> where norm1 denotes the one norm of a matrix (maximum column sum),
!> normI denotes the infinity norm of a matrix (maximum row sum) and
!> normF denotes the Frobenius norm of a matrix (square root of sum of
!> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
!>
β οΈ important lore drop: max(abs(A(i,j))) is not a consistent matrix norm. the original said it, I'm saying it, we're all saying it together. π
π Parameters
NORMβNORM is CHARACTER*1. specifies the value to be returned in CLANGB, as described above. so like, the whole menu from the Returns bit. pick your fighter. πNβN is INTEGER. the order of the matrixA.N >= 0. and whenN = 0, CLANGB is set to zero β zero crumbs, respectfully. πKLβKL is INTEGER. the number of sub-diagonals of the matrixA.KL >= 0. π«ΆKUβKU is INTEGER. the number of super-diagonals of the matrixA.KU >= 0. βABβAB is COMPLEX array, dimension (LDAB,N). the band matrixA, stored in rows1toKL+KU+1. thej-th column ofAis stored in thej-th column of the arrayABas follows:
AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(n,j+kl).
copy that formula exactly, it's load-bearing. π
LDABβLDAB is INTEGER. the leading dimension of the arrayAB.LDAB >= KL+KU+1. respect the bound or catch these hands (the hands are a segfault). πWORKβWORK is REAL array, dimension (MAX(1,LWORK)), whereLWORK >= NwhenNORM = 'I'; otherwise,WORKis not referenced. so if you're not doing the infinity norm, she's just sitting there. unbothered. π
π Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
(the legends themselves, fr fr π«Ά)
Definition at line 123 of file clangb.f. β yes, line 123, we love a numerically cute line number. β¨
π Author (again, technically)
Generated automatically by Doxygen for LAPACK from the source code. so blame the robot, not me. π€π
and that's the whole page, bestie! π this beauty is LAPACK, Version 3.12.0, and it lives at SRC/clangb.f(3) β go forth, compute your norms, and slay. periodt. πβ¨π¦πΈ
π¦ 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