SRC/slaset.f(3)
π SRC/slaset.f(3) π
okay so this is a page from the Library Functions Manual β literally the LAPACK girlies' documentation, and today's main character is slaset. bestie, it's a matrix-filling baddie. let's get into it π
β¨ NAME β¨
SRC/slaset.f β no cap, that's the whole name. the file. the legend. the source. π«Ά
πΈ SYNOPSIS πΈ
Functions/Subroutines
subroutine slaset (uplo, m, n, alpha, beta, a, lda)β SLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values. that's it, that's the job, and she does it flawlessly β¨
π Function/Subroutine Documentation π
subroutine slaset (character uplo, integer m, integer n, real alpha, real beta, real, dimension( lda, * ) a, integer lda)
SLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values. like, she's not doing math, she's doing vibes assignment. π
π¦ Purpose:
!>
!> SLASET initializes an m-by-n matrix A to BETA on the diagonal and
!> ALPHA on the offdiagonals.
!>
so: diagonal gets BETA, everything off the diagonal gets ALPHA. two constants, one matrix, zero drama. iconic. π₯
π Parameters
UPLO
!> UPLO is CHARACTER*1
!> Specifies the part of the matrix A to be set.
!> = 'U': Upper triangular part is set; the strictly lower
!> triangular part of A is not changed.
!> = 'L': Lower triangular part is set; the strictly upper
!> triangular part of A is not changed.
!> Otherwise: All of the matrix A is set.
!>
so UPLO is a CHARACTER*1 that tells her which part of the matrix to touch:
'U'β the upper triangular part gets set, and the strictly lower triangular part ofAis not changed (hands off, respectfully π)'L'β the lower triangular part gets set, and the strictly upper triangular part ofAis not changed- anything else β the whole matrix
Agets set. all of it. every last element. main character energy π
M
!> M is INTEGER
!> The number of rows of the matrix A. M >= 0.
!>
M is an INTEGER, it's the number of rows of A, and it's got one rule: M >= 0. π
N
!> N is INTEGER
!> The number of columns of the matrix A. N >= 0.
!>
N is an INTEGER, the number of columns of A, and same deal: N >= 0. π
ALPHA
!> ALPHA is REAL
!> The constant to which the offdiagonal elements are to be set.
!>
ALPHA is REAL and it's the constant the offdiagonal elements get set to. she's the off-diagonal constant. that's her whole personality and honestly? slay. β¨
BETA
!> BETA is REAL
!> The constant to which the diagonal elements are to be set.
!>
BETA is REAL and it's the constant the diagonal elements get set to. the diagonal's own personal constant. π
A
!> A is REAL array, dimension (LDA,N)
!> On exit, the leading m-by-n submatrix of A is set as follows:
!>
!> if UPLO = 'U', A(i,j) = ALPHA, 1<=i<=j-1, 1<=j<=n,
!> if UPLO = 'L', A(i,j) = ALPHA, j+1<=i<=m, 1<=j<=n,
!> otherwise, A(i,j) = ALPHA, 1<=i<=m, 1<=j<=n, i.ne.j,
!>
!> and, for all UPLO, A(i,i) = BETA, 1<=i<=min(m,n).
!>
A is a REAL array, dimension (LDA,N). on exit, the leading m-by-n submatrix of A is set like this:
- if
UPLO = 'U',A(i,j) = ALPHA,1<=i<=j-1,1<=j<=n - if
UPLO = 'L',A(i,j) = ALPHA,j+1<=i<=m,1<=j<=n - otherwise,
A(i,j) = ALPHA,1<=i<=m,1<=j<=n,i.ne.j
and, for all UPLO, A(i,i) = BETA, 1<=i<=min(m,n). the diagonal always gets BETA, no exceptions, periodt. π
LDA
!> LDA is INTEGER
!> The leading dimension of the array A. LDA >= max(1,M).
!>
LDA is an INTEGER, the leading dimension of the array A, and the vibe check is LDA >= max(1,M). π«Ά
π Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 109 of file slaset.f. π
π Author
Generated automatically by Doxygen for LAPACK from the source code. not me being generated automatically, that's just how the pipeline works π
k that's the whole page, bestie. go set some matrices. π§
LAPACK Version 3.12.0 β SRC/slaset.f(3) πβπΈ
π¦ 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