Skip to content

Commit 5e9bfc5

Browse files
authored
docs: update copy
Signed-off-by: Athan <[email protected]>
1 parent d04bbf9 commit 5e9bfc5

File tree

1 file changed

+20
-20
lines changed
  • lib/node_modules/@stdlib/lapack/base

1 file changed

+20
-20
lines changed

lib/node_modules/@stdlib/lapack/base/README.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ A general band matrix of size `M`-by-`N` with `KL` subdiagonals and `KU` superdi
3434

3535
**Storage Mapping:**
3636

37-
- Columns of the original matrix are stored in corresponding columns of the array `AB`
38-
- Diagonals of the matrix are stored in rows of the array `AB`
39-
- Element `A( i, j )` from the original matrix is stored in `AB(KU+1+i-j, j)`
40-
- Valid range for `i`: `max(1, j-KU) <= i <= min(M, j+KL)`
37+
- Columns of the original matrix are stored in corresponding columns of the array `AB`.
38+
- Diagonals of the matrix are stored in rows of the array `AB`.
39+
- Element `A[i, j]` from the original matrix is stored in `AB[KU+1+i-j, j]`.
40+
- Valid range for `i`: `max(1, j-KU) <= i <= min(M, j+KL)`.
4141

42-
#### Example (M=N=5, KL=2, KU=1)
42+
#### Example
4343

44-
Original band matrix `A`:
44+
Let `M = N = 5`, `KL = 2`, and `KU = 1`. Given an original band matrix `A`
4545

4646
<!-- <equation class="equation" label="eq:band_matrix_a" align="center" raw="A = \left[\begin{array}{rrrrr}a_{11} & a_{12} & 0 & 0 & 0 \\a_{21} & a_{22} & a_{23} & 0 & 0 \\a_{31} & a_{32} & a_{33} & a_{34} & 0 \\0 & a_{42} & a_{43} & a_{44} & a_{45} \\0 & 0 & a_{53} & a_{54} & a_{55}\end{array}\right]" alt="Representation of band matrix A."> -->
4747

@@ -59,7 +59,7 @@ A = \left[
5959

6060
<!-- </equation> -->
6161

62-
Band storage in array `AB` (4×5, since KL+KU+1 = 2+1+1 = 4):
62+
the band storage matrix `AB` is then
6363

6464
<!-- <equation class="equation" label="eq:band_storage_ab" align="center" raw="AB = \left[\begin{array}{rrrrr}* & a_{12} & a_{23} & a_{34} & a_{45} \\a_{11} & a_{22} & a_{33} & a_{44} & a_{55} \\a_{21} & a_{32} & a_{43} & a_{54} & * \\a_{31} & a_{42} & a_{53} & * & *\end{array}\right]" alt="Band storage representation of matrix A."> -->
6565

@@ -76,34 +76,34 @@ AB = \left[
7676

7777
<!-- </equation> -->
7878

79-
Elements marked `*` need not be set and are not referenced by LAPACK routines.
79+
`AB` is a 4×5 matrix as `KL+KU+1 = 2+1+1 = 4`. Elements marked `*` need not be set and are not referenced by LAPACK routines.
8080

81-
**Note:** When a band matrix is supplied for LU factorization, space must be allowed to store an additional `KL` superdiagonals, generated by fill-in as a result of row interchanges. This means that the matrix is stored according to the above scheme, but with `KL + KU` superdiagonals.
81+
**Note:** When a band matrix is supplied for LU factorization, space must be allowed to store an additional `KL` superdiagonals, which are generated by fill-in as a result of row interchanges. This means that the matrix is stored according to the above scheme, but with `KL + KU` superdiagonals.
8282

8383
### Triangular Band Matrices
8484

8585
Triangular band matrices are stored in the same format as general band matrices:
8686

87-
- If `KL = 0`, the matrix is upper triangular
88-
- If `KU = 0`, the matrix is lower triangular
87+
- If `KL = 0`, the matrix is upper triangular.
88+
- If `KU = 0`, the matrix is lower triangular.
8989

9090
### Symmetric or Hermitian Band Matrices
9191

92-
For symmetric or Hermitian band matrices with `KD` subdiagonals or superdiagonals, only the upper or lower triangle (as specified by `UPLO`) needs to be stored.
92+
For symmetric or Hermitian band matrices with `KD` subdiagonals or superdiagonals, only the upper or lower triangle (as specified by an `UPLO` parameter) needs to be stored.
9393

9494
**Upper Triangle Storage (UPLO = 'U'):**
9595

96-
- Element `A( i, j )` is stored in `AB(KD+1+i-j, j)`
96+
- Element `A[i, j]` is stored in `AB[KD+1+i-j, j]`.
9797
- Valid range for `i`: `max(1, j-KD) <= i <= j`
9898

9999
**Lower Triangle Storage (UPLO = 'L'):**
100100

101-
- Element `A( i, j )` is stored in `AB(1+i-j, j)`
102-
- Valid range for `i`: `j <= i <= min(N, j+KD)`
101+
- Element `A[i, j]` is stored in `AB[1+i-j, j]`.
102+
- Valid range for `i`: `j <= i <= min(N, j+KD)`.
103103

104-
#### Example (N=5, KD=2)
104+
#### Example
105105

106-
For `UPLO = 'U'` (upper triangle stored):
106+
Let `N = 5` and `KD = 2`. Given the following matrix `A`,
107107

108108
<!-- <equation class="equation" label="eq:symmetric_upper_a" align="center" raw="A = \left[\begin{array}{rrrrr}a_{11} & a_{12} & a_{13} & 0 & 0 \\{a_{12}} & a_{22} & a_{23} & a_{24} & 0 \\{a_{13}} & {a_{23}} & a_{33} & a_{34} & a_{35} \\0 & {a_{24}} & {a_{34}} & a_{44} & a_{45} \\0 & 0 & {a_{35}} & {a_{45}} & a_{55}\end{array}\right]" alt="Representation of symmetric band matrix A (upper triangle)."> -->
109109

@@ -121,7 +121,7 @@ A = \left[
121121

122122
<!-- </equation> -->
123123

124-
Band storage in array `AB` (3×5, since KD+1 = 2+1 = 3):
124+
the band storage matrix `AB` when `UPLO = 'U'` (i.e., upper triangle) is
125125

126126
<!-- <equation class="equation" label="eq:symmetric_upper_ab" align="center" raw="AB = \left[\begin{array}{rrrrr}* & * & a_{13} & a_{24} & a_{35} \\* & a_{12} & a_{23} & a_{34} & a_{45} \\a_{11} & a_{22} & a_{33} & a_{44} & a_{55}\end{array}\right]" alt="Band storage representation of symmetric matrix A (upper triangle)."> -->
127127

@@ -137,7 +137,7 @@ AB = \left[
137137

138138
<!-- </equation> -->
139139

140-
For `UPLO = 'L'` (lower triangle stored):
140+
The matrix is 3×5 as `KD+1 = 2+1 = 3`. Similarly, given the following matrix `A`,
141141

142142
<!-- <equation class="equation" label="eq:symmetric_lower_a" align="center" raw="A = \left[\begin{array}{rrrrr}a_{11} & {a_{21}} & {a_{31}} & 0 & 0 \\a_{21} & a_{22} & {a_{32}} & {a_{42}} & 0 \\a_{31} & a_{32} & a_{33} & {a_{43}} & {a_{53}} \\0 & a_{42} & a_{43} & a_{44} & {a_{54}} \\0 & 0 & a_{53} & a_{54} & a_{55}\end{array}\right]" alt="Representation of symmetric band matrix A (lower triangle)."> -->
143143

@@ -155,7 +155,7 @@ A = \left[
155155

156156
<!-- </equation> -->
157157

158-
Band storage in array `AB` (3×5, since KD+1 = 2+1 = 3):
158+
the band storage matrix `AB` (3×5, since KD+1 = 2+1 = 3) when `UPLO = 'L'` (i.e., lower triangle) is
159159

160160
<!-- <equation class="equation" label="eq:symmetric_lower_ab" align="center" raw="AB = \left[\begin{array}{rrrrr}a_{11} & a_{22} & a_{33} & a_{44} & a_{55} \\a_{21} & a_{32} & a_{43} & a_{54} & * \\a_{31} & a_{42} & a_{53} & * & *\end{array}\right]" alt="Band storage representation of symmetric matrix A (lower triangle)."> -->
161161

0 commit comments

Comments
 (0)