Skip to content

Commit 4f7eaa8

Browse files
committed
Website build
1 parent 910a416 commit 4f7eaa8

13 files changed

+47
-32
lines changed
-11 Bytes
Binary file not shown.

L2_QR_factorisation.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ <h2><span class="section-number">2.6. </span>Householder triangulation<a class="
687687
done so, you will need to modified
688688
<a class="reference internal" href="cla_utils.html#cla_utils.exercises3.householder" title="cla_utils.exercises3.householder"><code class="xref py py-func docutils literal notranslate"><span class="pre">cla_utils.exercises3.householder()</span></code></a> to use the <code class="docutils literal notranslate"><span class="pre">kmax</span></code>
689689
argument. You may make use of the built-in triangular solve
690-
algorithm <a class="reference external" href="http://scipy.github.io/devdocs/reference/generated/scipy.linalg.solve_triangular.html#scipy.linalg.solve_triangular" title="(in SciPy v1.8.0.dev0+2084.abafdff)"><code class="xref py py-func docutils literal notranslate"><span class="pre">scipy.linalg.solve_triangular()</span></code></a> (we shall consider
690+
algorithm <a class="reference external" href="http://scipy.github.io/devdocs/reference/generated/scipy.linalg.solve_triangular.html#scipy.linalg.solve_triangular" title="(in SciPy v1.9.0.dev0+1049.c9cdbf2)"><code class="xref py py-func docutils literal notranslate"><span class="pre">scipy.linalg.solve_triangular()</span></code></a> (we shall consider
691691
triangular matrix algorithms briefly later). The test script
692692
<code class="docutils literal notranslate"><span class="pre">test_exercises3.py</span></code> in the <code class="docutils literal notranslate"><span class="pre">test</span></code> directory will also test this
693693
function.</p>
@@ -799,7 +799,7 @@ <h2><span class="section-number">2.7. </span>Application: Least squares problems
799799
appropriate augmented matrix <span class="math notranslate nohighlight">\(\hat{A}\)</span>, calling
800800
<a class="reference internal" href="cla_utils.html#cla_utils.exercises3.householder" title="cla_utils.exercises3.householder"><code class="xref py py-func docutils literal notranslate"><span class="pre">cla_utils.exercises3.householder()</span></code></a> and extracting appropriate
801801
subarrays using slice notation, before using
802-
<a class="reference external" href="http://scipy.github.io/devdocs/reference/generated/scipy.linalg.solve_triangular.html#scipy.linalg.solve_triangular" title="(in SciPy v1.8.0.dev0+2084.abafdff)"><code class="xref py py-func docutils literal notranslate"><span class="pre">scipy.linalg.solve_triangular()</span></code></a> to solve the resulting upper triangular
802+
<a class="reference external" href="http://scipy.github.io/devdocs/reference/generated/scipy.linalg.solve_triangular.html#scipy.linalg.solve_triangular" title="(in SciPy v1.9.0.dev0+1049.c9cdbf2)"><code class="xref py py-func docutils literal notranslate"><span class="pre">scipy.linalg.solve_triangular()</span></code></a> to solve the resulting upper triangular
803803
system, before returning the solution <span class="math notranslate nohighlight">\(x\)</span>. The test script
804804
<code class="docutils literal notranslate"><span class="pre">test_exercises3.py</span></code> in the <code class="docutils literal notranslate"><span class="pre">test</span></code> directory will also test this
805805
function.</p>

L3_analysing_algorithms.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,7 @@ <h2><span class="section-number">3.9. </span>Stability<a class="headerlink" href
746746
<div><div class="math notranslate nohighlight">
747747
\[\frac{\|\tilde{f}(x)-f(\tilde{x})\|}{\|f(\tilde{x})\|} = \mathcal{O}(\varepsilon),\]</div>
748748
</div></blockquote>
749-
<p>for all <span class="math notranslate nohighlight">\(\tilde{x}\)</span> with</p>
749+
<p>there exists <span class="math notranslate nohighlight">\(\tilde{x}\)</span> with</p>
750750
<blockquote>
751751
<div><div class="math notranslate nohighlight">
752752
\[\frac{\|\tilde{x}-x\|}{\|x\|} = \mathcal{O}(\varepsilon).\]</div>

L4_LU_decomposition.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ <h2><span class="section-number">4.1. </span>An algorithm for LU decomposition<a
6666
<iframe allowfullscreen="true" src="https://player.vimeo.com/video/454095315" style="border: 0; height: 345px; width: 560px">
6767
</iframe></div></details><p>The computational way to view Gaussian elimination is through the LU
6868
decomposition of an invertible matrix, <span class="math notranslate nohighlight">\(A=LU\)</span>, where <span class="math notranslate nohighlight">\(L\)</span> is lower
69-
triangular (<span class="math notranslate nohighlight">\(l_{ij}=0\)</span> for <span class="math notranslate nohighlight">\(j&lt;i\)</span>) and <span class="math notranslate nohighlight">\(U\)</span> is upper triangular
70-
(<span class="math notranslate nohighlight">\(u_{ij}=0\)</span> for <span class="math notranslate nohighlight">\(j&gt;i\)</span>). Here we use the symbol <span class="math notranslate nohighlight">\(U\)</span> instead of <span class="math notranslate nohighlight">\(R\)</span> to
69+
triangular (<span class="math notranslate nohighlight">\(l_{ij}=0\)</span> for <span class="math notranslate nohighlight">\(j&gt;i\)</span>) and <span class="math notranslate nohighlight">\(U\)</span> is upper triangular
70+
(<span class="math notranslate nohighlight">\(u_{ij}=0\)</span> for <span class="math notranslate nohighlight">\(j&lt;i\)</span>). Here we use the symbol <span class="math notranslate nohighlight">\(U\)</span> instead of <span class="math notranslate nohighlight">\(R\)</span> to
7171
emphasise that we are looking as square matrices. The process of
7272
obtaining the <span class="math notranslate nohighlight">\(LU\)</span> decomposition is very similar to the Householder
7373
algorithm, in that we repeatedly left multiply <span class="math notranslate nohighlight">\(A\)</span> by matrices to
@@ -346,7 +346,7 @@ <h2><span class="section-number">4.1. </span>An algorithm for LU decomposition<a
346346
They should use forward and backward substitution to solve lower
347347
and upper triangular systems respectively. The interfaces are set
348348
so that multiple right hand sides can be provided and solved at the
349-
same time. The functions should only use one loop over the columns
349+
same time. The functions should only use one loop over the rows
350350
of <span class="math notranslate nohighlight">\(L\)</span> (or <span class="math notranslate nohighlight">\(U\)</span>), to efficiently solve the multiple problems. The
351351
test script <code class="docutils literal notranslate"><span class="pre">test_exercises6.py</span></code> in the <code class="docutils literal notranslate"><span class="pre">test</span></code> directory will
352352
test these functions.</p>
@@ -672,8 +672,8 @@ <h2><span class="section-number">4.4. </span>Taking advantage of matrix structur
672672
\end{pmatrix}.\end{split}\]</div>
673673
</div></blockquote>
674674
<p>A generalisation of a diagonal matrix is a banded matrix, where
675-
<span class="math notranslate nohighlight">\(A_{ij}=0\)</span> for <span class="math notranslate nohighlight">\(i&gt;j+p\)</span> and for <span class="math notranslate nohighlight">\(i&lt;j-q\)</span>. We call <span class="math notranslate nohighlight">\(p\)</span> the upper
676-
bandwidth of <span class="math notranslate nohighlight">\(A\)</span>; <span class="math notranslate nohighlight">\(q\)</span> is the lower bandwidth. When the matrix is
675+
<span class="math notranslate nohighlight">\(A_{ij}=0\)</span> for <span class="math notranslate nohighlight">\(i&gt;j+p\)</span> and for <span class="math notranslate nohighlight">\(i&lt;j-q\)</span>. We call <span class="math notranslate nohighlight">\(p\)</span> the lower
676+
bandwidth of <span class="math notranslate nohighlight">\(A\)</span>; <span class="math notranslate nohighlight">\(q\)</span> is the upper bandwidth. When the matrix is
677677
banded, there are already zeros below the diagonal of <span class="math notranslate nohighlight">\(A\)</span>, so we know
678678
that the corresponding entries in the <span class="math notranslate nohighlight">\(L_k\)</span> matrices will be zero.
679679
Further, because there are zeros above the diagonal of <span class="math notranslate nohighlight">\(A\)</span>, these do

L5_eigenvalues.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ <h2><span class="section-number">5.3. </span>Similarity transformation to upper
344344
<li><p><span class="math notranslate nohighlight">\(v_k\gets \mbox{sign}(x_1)\|x\|_2e_1 + x\)</span></p></li>
345345
<li><p><span class="math notranslate nohighlight">\(v_k\gets v_k/\|v\|_2\)</span></p></li>
346346
<li><p><span class="math notranslate nohighlight">\(A_{k+1:m,k:m} \gets A_{k+1:m,k:m}- 2v_k(v_k^*A_{k+1:m,k:m})\)</span></p></li>
347-
<li><p><span class="math notranslate nohighlight">\(A_{1:m,k+1:m} \gets A_{1:m,k+1:m}- 2(A_{1:m,k+1:m,k:m}v_k)v_k^*\)</span></p></li>
347+
<li><p><span class="math notranslate nohighlight">\(A_{1:m,k+1:m} \gets A_{1:m,k+1:m}- 2(A_{1:m,k+1:m}v_k)v_k^*\)</span></p></li>
348348
</ul>
349349
</li>
350350
<li><p>END FOR</p></li>
@@ -512,7 +512,7 @@ <h2><span class="section-number">5.5. </span>Power iteration<a class="headerlink
512512
<details>
513513
<summary>
514514
Supplementary video</summary><div class="video_wrapper" style="">
515-
<iframe allowfullscreen="true" src="https://player.vimeo.com/video/454124710" style="border: 0; height: 345px; width: 560px">
515+
<iframe allowfullscreen="true" src="https://player.vimeo.com/video/454124701" style="border: 0; height: 345px; width: 560px">
516516
</iframe></div></details><p>Power iteration is a simple method for finding the eigenvalue of
517517
<span class="math notranslate nohighlight">\(A\)</span> with largest eigenvalue (in magnitude). It is based on the following
518518
idea. We expand a vector <span class="math notranslate nohighlight">\(v\)</span> in eigenvectors of <span class="math notranslate nohighlight">\(A\)</span>,</p>

_modules/cla_utils/exercises8.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,14 @@
66
<meta charset="utf-8" />
77
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
88
<title>cla_utils.exercises8 &#8212; Computational linear algebra course 2020.0 documentation</title>
9-
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
10-
<link rel="stylesheet" href="../../_static/fenics.css" type="text/css" />
9+
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css" />
10+
<link rel="stylesheet" type="text/css" href="../../_static/fenics.css" />
1111
<link rel="stylesheet" type="text/css" href="../../_static/proof.css" />
12-
<script id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
12+
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
1313
<script src="../../_static/jquery.js"></script>
1414
<script src="../../_static/underscore.js"></script>
1515
<script src="../../_static/doctools.js"></script>
1616
<script src="../../_static/proof.js"></script>
17-
<script async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
1817
<link rel="index" title="Index" href="../../genindex.html" />
1918
<link rel="search" title="Search" href="../../search.html" />
2019
<!--[if lte IE 6]>
@@ -87,12 +86,13 @@ <h1>Source code for cla_utils.exercises8</h1><div class="highlight"><pre>
8786

8887
<div class="viewcode-block" id="hessenberg_ev"><a class="viewcode-back" href="../../cla_utils.html#cla_utils.exercises8.hessenberg_ev">[docs]</a><span class="k">def</span> <span class="nf">hessenberg_ev</span><span class="p">(</span><span class="n">H</span><span class="p">):</span>
8988
<span class="sd">&quot;&quot;&quot;</span>
90-
<span class="sd"> Given a Hessenberg matrix, return the eigenvalues and eigenvectors.</span>
89+
<span class="sd"> Given a Hessenberg matrix, return the eigenvectors.</span>
9190

9291
<span class="sd"> :param H: an mxm numpy array</span>
9392

94-
<span class="sd"> :return ee: an m dimensional numpy array containing the eigenvalues of H</span>
9593
<span class="sd"> :return V: an mxm numpy array whose columns are the eigenvectors of H</span>
94+
95+
<span class="sd"> Do not change this function.</span>
9696
<span class="sd"> &quot;&quot;&quot;</span>
9797
<span class="n">m</span><span class="p">,</span> <span class="n">n</span> <span class="o">=</span> <span class="n">H</span><span class="o">.</span><span class="n">shape</span>
9898
<span class="k">assert</span><span class="p">(</span><span class="n">m</span><span class="o">==</span><span class="n">n</span><span class="p">)</span>
@@ -123,7 +123,7 @@ <h1>Source code for cla_utils.exercises8</h1><div class="highlight"><pre>
123123
</div>
124124
<div class="footer" role="contentinfo">
125125
&#169; Copyright 2020, Colin J. Cotter.
126-
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.4.3.
126+
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.2.0.
127127
</div>
128128
</body>
129129
</html>

_sources/L3_analysing_algorithms.rst.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@ we have to lower our aspirations depending on the condition number of `A`.
704704
705705
\frac{\|\tilde{f}(x)-f(\tilde{x})\|}{\|f(\tilde{x})\|} = \mathcal{O}(\varepsilon),
706706

707-
for all `\tilde{x}` with
707+
there exists `\tilde{x}` with
708708

709709
.. math::
710710

_sources/L4_LU_decomposition.rst.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ An algorithm for LU decomposition
2121

2222
The computational way to view Gaussian elimination is through the LU
2323
decomposition of an invertible matrix, `A=LU`, where `L` is lower
24-
triangular (`l_{ij}=0` for `j<i`) and `U` is upper triangular
25-
(`u_{ij}=0` for `j>i`). Here we use the symbol `U` instead of `R` to
24+
triangular (`l_{ij}=0` for `j>i`) and `U` is upper triangular
25+
(`u_{ij}=0` for `j<i`). Here we use the symbol `U` instead of `R` to
2626
emphasise that we are looking as square matrices. The process of
2727
obtaining the `LU` decomposition is very similar to the Householder
2828
algorithm, in that we repeatedly left multiply `A` by matrices to
@@ -324,7 +324,7 @@ requires `m-k+1` multiplications and subtractions, and is iterated
324324
They should use forward and backward substitution to solve lower
325325
and upper triangular systems respectively. The interfaces are set
326326
so that multiple right hand sides can be provided and solved at the
327-
same time. The functions should only use one loop over the columns
327+
same time. The functions should only use one loop over the rows
328328
of `L` (or `U`), to efficiently solve the multiple problems. The
329329
test script ``test_exercises6.py`` in the ``test`` directory will
330330
test these functions.
@@ -652,8 +652,8 @@ of `A` is
652652
\end{pmatrix}.
653653
654654
A generalisation of a diagonal matrix is a banded matrix, where
655-
`A_{ij}=0` for `i>j+p` and for `i<j-q`. We call `p` the upper
656-
bandwidth of `A`; `q` is the lower bandwidth. When the matrix is
655+
`A_{ij}=0` for `i>j+p` and for `i<j-q`. We call `p` the lower
656+
bandwidth of `A`; `q` is the upper bandwidth. When the matrix is
657657
banded, there are already zeros below the diagonal of `A`, so we know
658658
that the corresponding entries in the `L_k` matrices will be zero.
659659
Further, because there are zeros above the diagonal of `A`, these do

_sources/L5_eigenvalues.rst.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ pseudo-code.
287287
* `v_k\gets \mbox{sign}(x_1)\|x\|_2e_1 + x`
288288
* `v_k\gets v_k/\|v\|_2`
289289
* `A_{k+1:m,k:m} \gets A_{k+1:m,k:m}- 2v_k(v_k^*A_{k+1:m,k:m})`
290-
* `A_{1:m,k+1:m} \gets A_{1:m,k+1:m}- 2(A_{1:m,k+1:m,k:m}v_k)v_k^*`
290+
* `A_{1:m,k+1:m} \gets A_{1:m,k+1:m}- 2(A_{1:m,k+1:m}v_k)v_k^*`
291291
* END FOR
292292

293293
Note the similarities and differences with the Householder algorithm
@@ -456,7 +456,7 @@ Power iteration
456456

457457
.. details:: Supplementary video
458458

459-
.. vimeo:: 454124710
459+
.. vimeo:: 454124701
460460

461461
Power iteration is a simple method for finding the eigenvalue of
462462
`A` with largest eigenvalue (in magnitude). It is based on the following

_sources/errata.rst.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,14 @@ repositories for Autumn 2021. An up to date version is in the
3030
7. Corrected the sign of inequalities in :code:`test_solve_U` and
3131
:code:`test_solve_L`. And then uncorrected them again, they were right
3232
in the first place.
33+
34+
8. Fixed the sign of the inequalities in the discussion of $L$ and $U$ matrices.
35+
36+
9. Loop over rows, not columns in solve_U and solve_L.
37+
38+
10. Use integers for permutations in test_perm.
39+
40+
11. Remove line break from description in setup.py for compatibility with release v59.0.0 of setuptools.
41+
42+
12. Corrected the docstring in :code:`hessenberg_ev`, as it only returns
43+
the eigenvectors.

0 commit comments

Comments
 (0)