Skip to content

Commit 377dcf2

Browse files
committed
docs: add an intro in readme with math tags
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 122ec07 commit 377dcf2

File tree

1 file changed

+62
-1
lines changed
  • lib/node_modules/@stdlib/lapack/base/dlaqr1

1 file changed

+62
-1
lines changed

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

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,67 @@ limitations under the License.
2222

2323
> Given a 2-by-2 or a 3-by-3 matrix `H`, this LAPACK routine sets `V` to a scalar multiple of the first column of `K` where `K = (H - (sr1 + i*si1)*I)*(H - (sr2 + i*si2)*I)`.
2424
25+
<section class="intro">
26+
27+
The `dlaqr1` routine computes a scalar multiple of the first column of a matrix `K` defined by the product of two shifted matrices. Given a matrix `H` and two complex shifts (which may be conjugates), the routine constructs:
28+
29+
<!-- <equation class="equation" label="eq:matrix_k" align="center" raw="K = (H - (sr_1 + i \cdot si_1) \cdot I) \cdot (H - (sr_2 + i \cdot si_2) \cdot I)" alt="Definition of matrix K."> -->
30+
31+
```math
32+
K = (H - (sr_1 + i \cdot si_1) \cdot I) \cdot (H - (sr_2 + i \cdot si_2) \cdot I)
33+
```
34+
35+
<!-- </equation> -->
36+
37+
where:
38+
39+
- `H` is an N-by-N matrix (N = 2 or 3)
40+
- `sr1, si1` represent the real and imaginary parts of the first shift
41+
- `sr2, si2` represent the real and imaginary parts of the second shift
42+
- `I` is the identity matrix
43+
44+
The routine extracts the first column of `K` and stores it as a scalar multiple in the output vector `V`. For a 2-by-2 matrix `H`:
45+
46+
<!-- <equation class="equation" label="eq:matrix_h_2x2" align="center" raw="H = \left[\begin{array}{cc}h_{11} & h_{12} \\h_{21} & h_{22}\end{array}\right]" alt="2-by-2 matrix H."> -->
47+
48+
```math
49+
H = \left[
50+
\begin{array}{cc}
51+
h_{11} & h_{12} \\
52+
h_{21} & h_{22}
53+
\end{array}
54+
\right]
55+
```
56+
57+
<!-- </equation> -->
58+
59+
For a 3-by-3 matrix `H`:
60+
61+
<!-- <equation class="equation" label="eq:matrix_h_3x3" align="center" raw="H = \left[\begin{array}{ccc}h_{11} & h_{12} & h_{13} \\h_{21} & h_{22} & h_{23} \\h_{31} & h_{32} & h_{33}\end{array}\right]" alt="3-by-3 matrix H."> -->
62+
63+
```math
64+
H = \left[
65+
\begin{array}{ccc}
66+
h_{11} & h_{12} & h_{13} \\
67+
h_{21} & h_{22} & h_{23} \\
68+
h_{31} & h_{32} & h_{33}
69+
\end{array}
70+
\right]
71+
```
72+
73+
<!-- </equation> -->
74+
75+
The shifts are typically complex conjugate pairs, meaning either:
76+
77+
1. `sr1 = sr2` and `si1 = -si2` (conjugate complex shifts), or
78+
2. `si1 = si2 = 0` (real shifts)
79+
80+
This routine is particularly useful in the QR algorithm for starting double implicit shift bulges, where the computed vector `V` defines the Householder reflector for the implicit shift step.
81+
82+
</section>
83+
84+
<!-- /.intro -->
85+
2586
<section class="usage">
2687

2788
## Usage
@@ -248,7 +309,7 @@ TODO
248309

249310
[lapack]: https://www.netlib.org/lapack/explore-html/
250311

251-
[lapack-dlaqr1]: https://www.netlib.org/lapack/explore-html/d1/d72/dlaqr1_8f.html
312+
[lapack-dlaqr1]: https://netlib.org/lapack/explore-html/d3/d57/group__laqr1_ga72fe4989b96418ec66d6ee18b4ac23e8.html
252313

253314
[mdn-float64array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array
254315

0 commit comments

Comments
 (0)