Skip to content

Commit 4c98458

Browse files
committed
Website build
1 parent c511d48 commit 4c98458

19 files changed

+89
-47
lines changed
103 Bytes
Binary file not shown.

L1_preliminaries.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ <h2><span class="section-number">1.7. </span>Unitary matrices<a class="headerlin
694694
<span class="proof-type">Exercise 1.23</span>
695695

696696
</div><div class="proof-content">
697-
<p>The <a class="reference internal" href="cla_utils.html#cla_utils.exercises2.solveQ" title="cla_utils.exercises2.solveQ"><code class="xref py py-func docutils literal notranslate"><span class="pre">cla_utils.exercises2.solveQ()</span></code></a> function has been left
697+
<p>The <code class="xref py py-func docutils literal notranslate"><span class="pre">cla_utils.exercises2.solveQ()</span></code> function has been left
698698
unimplemented. Given a square unitary matrix <span class="math notranslate nohighlight">\(Q\)</span> and a vector <span class="math notranslate nohighlight">\(b\)</span>
699699
it should solve <span class="math notranslate nohighlight">\(Qx=b\)</span> using information above (it is not expected
700700
to work when <span class="math notranslate nohighlight">\(Q\)</span> is not unitary or square). The test script

L2_QR_factorisation.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ <h2><span class="section-number">2.6. </span>Householder triangulation<a class="
710710
done so, you will need to modified
711711
<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>
712712
argument. You may make use of the built-in triangular solve
713-
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.10.0.dev0+1685.9578695)"><code class="xref py py-func docutils literal notranslate"><span class="pre">scipy.linalg.solve_triangular()</span></code></a> (we shall consider
713+
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.10.0.dev0+1989.d4a75c8)"><code class="xref py py-func docutils literal notranslate"><span class="pre">scipy.linalg.solve_triangular()</span></code></a> (we shall consider
714714
triangular matrix algorithms briefly later). The test script
715715
<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
716716
function.</p>
@@ -840,7 +840,7 @@ <h2><span class="section-number">2.7. </span>Application: Least squares problems
840840
by forming an appropriate augmented matrix <span class="math notranslate nohighlight">\(\hat{A}\)</span>, calling
841841
<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
842842
subarrays using slice notation, before using
843-
<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.10.0.dev0+1685.9578695)"><code class="xref py py-func docutils literal notranslate"><span class="pre">scipy.linalg.solve_triangular()</span></code></a> to solve the resulting upper
843+
<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.10.0.dev0+1989.d4a75c8)"><code class="xref py py-func docutils literal notranslate"><span class="pre">scipy.linalg.solve_triangular()</span></code></a> to solve the resulting upper
844844
triangular system, before returning the solution <span class="math notranslate nohighlight">\(x\)</span>. The test
845845
script <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
846846
test this function.</p>

L3_analysing_algorithms.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -984,9 +984,9 @@ <h2><span class="section-number">3.11. </span>Backward stability for solving a l
984984
<span class="proof-type">Exercise 3.26</span>
985985

986986
</div><div class="proof-content">
987-
<p>Complete the function <a class="reference internal" href="cla_utils.html#cla_utils.exercises5.back_stab_solve_R" title="cla_utils.exercises5.back_stab_solve_R"><code class="xref py py-func docutils literal notranslate"><span class="pre">cla_utils.exercises5.back_stab_solve_R()</span></code></a>
987+
<p>Complete the function <a class="reference internal" href="cla_utils.html#cla_utils.exercises5.back_stab_solve_U" title="cla_utils.exercises5.back_stab_solve_U"><code class="xref py py-func docutils literal notranslate"><span class="pre">cla_utils.exercises5.back_stab_solve_U()</span></code></a>
988988
so that it verifies backward stability for back substitution, using
989-
<code class="xref py py-func docutils literal notranslate"><span class="pre">cla_utils.exercises5.solve_R()</span></code>.</p>
989+
<code class="xref py py-func docutils literal notranslate"><span class="pre">cla_utils.exercises5.solve_U()</span></code>.</p>
990990
</div></div><p>Using the individual backward stability of these three algorithms,
991991
we show the following result.</p>
992992
<div class="proof proof-type-theorem" id="id27">

L4_LU_decomposition.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ <h2><span class="section-number">4.3. </span>Stability of LU factorisation<a cla
622622
factor,</p>
623623
<blockquote>
624624
<div><div class="math notranslate nohighlight">
625-
\[\rho = \frac{\max_{ij}|u_{ij}|}{|a_{ij}|}.\]</div>
625+
\[\rho = \frac{\max_{ij}|u_{ij}|}{\max_{ij}|a_{ij}|}.\]</div>
626626
</div></blockquote>
627627
</div></div><p>Thus, partial pivoting (and complete pivoting turns out not to help
628628
much extra) can keep the entries in <span class="math notranslate nohighlight">\(L\)</span> under control, but there can

L5_eigenvalues.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ <h2><span class="section-number">5.4. </span>Rayleigh quotient<a class="headerli
499499
<li><p>Finding an eigenvector <span class="math notranslate nohighlight">\(v\)</span> of <span class="math notranslate nohighlight">\(A\)</span> with eigenvalue <span class="math notranslate nohighlight">\(\lambda\)</span> (you can use <a class="reference external" href="https://numpy.org/doc/stable/reference/generated/numpy.linalg.eig.html#numpy.linalg.eig" title="(in NumPy v1.23)"><code class="xref py py-func docutils literal notranslate"><span class="pre">numpy.linalg.eig()</span></code></a> for this),</p></li>
500500
<li><p>Choosing a perturbation vector <span class="math notranslate nohighlight">\(r\)</span>, and perturbation parameter <span class="math notranslate nohighlight">\(\epsilon&gt;0\)</span>,</p></li>
501501
<li><p>Comparing the Rayleigh quotient of <span class="math notranslate nohighlight">\(v + \epsilon r\)</span> with <span class="math notranslate nohighlight">\(\lambda\)</span>,</p></li>
502-
<li><p>Plotting (on a log-log graph, use <a class="reference external" href="https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.loglog.html#matplotlib.pyplot.loglog" title="(in Matplotlib v3.5.3)"><code class="xref py py-func docutils literal notranslate"><span class="pre">matplotlib.pyplot.loglog()</span></code></a>) the error in estimating the eigenvalue as a function of <span class="math notranslate nohighlight">\(\epsilon\)</span>.</p></li>
502+
<li><p>Plotting (on a log-log graph, use <a class="reference external" href="https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.loglog.html#matplotlib.pyplot.loglog" title="(in Matplotlib v3.6.0)"><code class="xref py py-func docutils literal notranslate"><span class="pre">matplotlib.pyplot.loglog()</span></code></a>) the error in estimating the eigenvalue as a function of <span class="math notranslate nohighlight">\(\epsilon\)</span>.</p></li>
503503
</ol>
504504
<p>The best way to do this is to plot the computed data values as points,
505505
and then superpose a line plot of <span class="math notranslate nohighlight">\(a\epsilon^k\)</span> for appropriate
@@ -773,7 +773,7 @@ <h2><span class="section-number">5.8. </span>The pure QR algorithm<a class="head
773773
<a class="reference internal" href="cla_utils.html#cla_utils.exercises9.get_B100" title="cla_utils.exercises9.get_B100"><code class="xref py py-func docutils literal notranslate"><span class="pre">cla_utils.exercises9.get_B100()</span></code></a>,
774774
<a class="reference internal" href="cla_utils.html#cla_utils.exercises9.get_C100" title="cla_utils.exercises9.get_C100"><code class="xref py py-func docutils literal notranslate"><span class="pre">cla_utils.exercises9.get_C100()</span></code></a>, and
775775
<a class="reference internal" href="cla_utils.html#cla_utils.exercises9.get_D100" title="cla_utils.exercises9.get_D100"><code class="xref py py-func docutils literal notranslate"><span class="pre">cla_utils.exercises9.get_D100()</span></code></a>. You can use
776-
<a class="reference external" href="https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.pcolor.html#matplotlib.pyplot.pcolor" title="(in Matplotlib v3.5.3)"><code class="xref py py-func docutils literal notranslate"><span class="pre">matplotlib.pyplot.pcolor()</span></code></a> to visualise the entries,
776+
<a class="reference external" href="https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.pcolor.html#matplotlib.pyplot.pcolor" title="(in Matplotlib v3.6.0)"><code class="xref py py-func docutils literal notranslate"><span class="pre">matplotlib.pyplot.pcolor()</span></code></a> to visualise the entries,
777777
or compute norms of the components of the matrices below the diagonal,
778778
for example. What do you observe? How does this relate to the structure
779779
of the four matrices?</p>
@@ -1012,7 +1012,7 @@ <h2><span class="section-number">5.11. </span>The practical QR algorithm<a class
10121012
<p>This is very cheap, we just read off the bottom right-hand corner
10131013
from <span class="math notranslate nohighlight">\(A^{(k)}\)</span>! This is called the Rayleigh quotient shift.</p>
10141014
<p>It turns out that the Rayleigh quotient shift is not guaranteed to
1015-
work in all cases, so there is an alernative approach called the
1015+
work in all cases, so there is an alternative approach called the
10161016
Wilkinson shift, but we won’t discuss that here.</p>
10171017
</section>
10181018
</section>

L6_krylov.html

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -364,13 +364,15 @@ <h2><span class="section-number">6.4. </span>Convergence of GMRES<a class="heade
364364
well-conditioned, and <span class="math notranslate nohighlight">\(p(x)\)</span> is small for all <span class="math notranslate nohighlight">\(x\in \Lambda(A)\)</span>. This
365365
latter condition is not trivial due to the <span class="math notranslate nohighlight">\(p(0)=1\)</span> requirement. One
366366
way it can happen is if <span class="math notranslate nohighlight">\(A\)</span> has all eigenvalues clustered in a small
367-
number of groups. Then we can find a low degree polynomial that passes
368-
through 1 at <span class="math notranslate nohighlight">\(x=0\)</span>, and 0 near each of the clusters. Then GMRES will
369-
essentially converge in a small number of iterations (equal to the
370-
degree of the polynomial). There are problems if the eigenvalues are
371-
scattered over a wide region of the complex plane: we need a very
372-
high degree polynomial to make <span class="math notranslate nohighlight">\(p(x)\)</span> small at all the eigenvalues and
373-
hence we need a very large number of iterations.</p>
367+
number of groups, away from $0$. Then we can find a low degree
368+
polynomial that passes through 1 at <span class="math notranslate nohighlight">\(x=0\)</span>, and 0 near each of the
369+
clusters. Then GMRES will essentially converge in a small number of
370+
iterations (equal to the degree of the polynomial). There are problems
371+
if the eigenvalues are scattered over a wide region of the complex
372+
plane: we need a very high degree polynomial to make <span class="math notranslate nohighlight">\(p(x)\)</span> small at
373+
all the eigenvalues and hence we need a very large number of
374+
iterations. Similarly there are problems if eigenvalues are very close
375+
to zero.</p>
374376
<div class="proof proof-type-exercise" id="id4">
375377

376378
<div class="proof-title">

_modules/cla_utils/exercises2.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<head>
66
<meta charset="utf-8" />
77
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
8-
<title>cla_utils.exercises2 &#8212; Computational linear algebra course 2020.0 documentation</title>
8+
<title>cla_utils.exercises2 &#8212; Computational linear algebra course 2022.0 documentation</title>
99
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css" />
1010
<link rel="stylesheet" type="text/css" href="../../_static/fenics.css" />
1111
<link rel="stylesheet" type="text/css" href="../../_static/proof.css" />
@@ -68,7 +68,7 @@ <h1>Source code for cla_utils.exercises2</h1><div class="highlight"><pre>
6868
<span class="k">return</span> <span class="n">r</span><span class="p">,</span> <span class="n">u</span></div>
6969

7070

71-
<div class="viewcode-block" id="solveQ"><a class="viewcode-back" href="../../cla_utils.html#cla_utils.exercises2.solveQ">[docs]</a><span class="k">def</span> <span class="nf">solveQ</span><span class="p">(</span><span class="n">Q</span><span class="p">,</span> <span class="n">b</span><span class="p">):</span>
71+
<div class="viewcode-block" id="solve_Q"><a class="viewcode-back" href="../../cla_utils.html#cla_utils.exercises2.solve_Q">[docs]</a><span class="k">def</span> <span class="nf">solve_Q</span><span class="p">(</span><span class="n">Q</span><span class="p">,</span> <span class="n">b</span><span class="p">):</span>
7272
<span class="sd">&quot;&quot;&quot;</span>
7373
<span class="sd"> Given a unitary mxm matrix Q and a vector b, solve Qx=b for x.</span>
7474

@@ -194,7 +194,7 @@ <h1>Source code for cla_utils.exercises2</h1><div class="highlight"><pre>
194194
<div class="clearer"></div>
195195
</div>
196196
<div class="footer" role="contentinfo">
197-
&#169; Copyright 2020, Colin J. Cotter.
197+
&#169; Copyright 2020-2022, Colin J. Cotter.
198198
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.2.0.
199199
</div>
200200
</body>

_modules/cla_utils/exercises5.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ <h1>Source code for cla_utils.exercises5</h1><div class="highlight"><pre>
8888
<span class="k">raise</span> <span class="ne">NotImplementedError</span></div>
8989

9090

91-
<div class="viewcode-block" id="back_stab_solve_R"><a class="viewcode-back" href="../../cla_utils.html#cla_utils.exercises5.back_stab_solve_R">[docs]</a><span class="k">def</span> <span class="nf">back_stab_solve_R</span><span class="p">(</span><span class="n">m</span><span class="p">):</span>
91+
<div class="viewcode-block" id="back_stab_solve_U"><a class="viewcode-back" href="../../cla_utils.html#cla_utils.exercises5.back_stab_solve_U">[docs]</a><span class="k">def</span> <span class="nf">back_stab_solve_U</span><span class="p">(</span><span class="n">m</span><span class="p">):</span>
9292
<span class="sd">&quot;&quot;&quot;</span>
9393
<span class="sd"> Verify backward stability for back substitution for</span>
9494
<span class="sd"> real mxm matrices.</span>

_sources/L3_analysing_algorithms.rst.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -940,9 +940,9 @@ for some upper triangular perturbation such that `\|\delta
940940

941941
.. proof:exercise::
942942
943-
Complete the function :func:`cla_utils.exercises5.back_stab_solve_R`
943+
Complete the function :func:`cla_utils.exercises5.back_stab_solve_U`
944944
so that it verifies backward stability for back substitution, using
945-
:func:`cla_utils.exercises5.solve_R`.
945+
:func:`cla_utils.exercises5.solve_U`.
946946

947947
Using the individual backward stability of these three algorithms,
948948
we show the following result.

0 commit comments

Comments
 (0)