You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/06_Direct_methods.jl
+31-7Lines changed: 31 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,13 @@
1
1
### A Pluto.jl notebook ###
2
-
# v0.20.4
2
+
# v0.20.5
3
3
4
4
using Markdown
5
5
using InteractiveUtils
6
6
7
7
# This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error).
8
8
macrobind(def, element)
9
9
#! format: off
10
-
quote
10
+
returnquote
11
11
local iv =try Base.loaded_modules[Base.PkgId(Base.UUID("6e696c72-6542-2067-7265-42206c756150"), "AbstractPlutoDingetjes")].Bonds.initial_value catch; b ->missing; end
@@ -1376,16 +1376,21 @@ For this course if you are asked to determine the asymptotic complexity,
1376
1376
you will not asked to deal with these details. For our problems it will be sufficient to only look at the most deeply nested loop and ignore the rest of the code as part of a complexity analysis.
1377
1377
""")
1378
1378
1379
-
# ╔═╡ 5d8d4e66-20a0-41d9-8aeb-faa7d56628f9
1379
+
# ╔═╡ 334d83a2-4809-4e85-808f-1213a56be9b7
1380
1380
md"""
1381
1381
!!! info "Overview of computational cost"
1382
1382
For vectors $\textbf v, \textbf w \in \mathbb{R}^n$ and matrices $\mathbf A \in \mathbb R^{n\times n}$ the computational cost is
| matriv-vector product $\mathbf A \mathbf v$ | $O(n^2)$
1388
+
| matrix-matrix multiplication $\mathbf A \mathbf B$ | $O(n^3)$
1388
1389
1390
+
"""
1391
+
1392
+
# ╔═╡ 3de7544d-a5e2-43fc-9af0-d2e37386b72a
1393
+
md"""
1389
1394
Finally a few rough guidelines:
1390
1395
1391
1396
!!! info "General guideline to estimate computational cost"
@@ -1395,6 +1400,22 @@ Finally a few rough guidelines:
1395
1400
4. Multiply the result of 2. and all index ranges of 3 to get the total scaling. Typically for a single loop nesting the cost is $O(n)$ for a doubly nested loop $O(n^2)$ and so on.
0 commit comments