123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280 |
- \documentclass[aspectratio=169,hyperref={pdfpagelabels=false}]{beamer}
- \usepackage{lmodern}
- \usepackage[utf8]{inputenc} % this is needed for german umlauts
- \usepackage[ngerman]{babel} % this is needed for german umlauts
- \usepackage[T1]{fontenc} % this is needed for correct output of umlauts in pdf
- \usepackage{braket} % needed for \Set
- \usepackage{algorithm,algpseudocode}
- \usepackage{verbatim}
- \usepackage{tikz}
- \usetikzlibrary{arrows,shapes}
- % Define some styles for graphs
- \tikzstyle{vertex}=[circle,fill=black!25,minimum size=20pt,inner sep=0pt]
- \tikzstyle{selected vertex} = [vertex, fill=red!24]
- \tikzstyle{blue vertex} = [vertex, fill=blue!24]
- \tikzstyle{edge} = [draw,thick,-]
- \tikzstyle{weight} = [font=\small]
- \tikzstyle{selected edge} = [draw,line width=5pt,-,red!50]
- \tikzstyle{ignored edge} = [draw,line width=5pt,-,black!20]
- % see http://deic.uab.es/~iblanes/beamer_gallery/index_by_theme.html
- %\usetheme{Frankfurt}
- \usefonttheme{professionalfonts}
- % disables bottom navigation bar
- \beamertemplatenavigationsymbolsempty
- % http://tex.stackexchange.com/questions/23727/converting-beamer-slides-to-animated-images
- \setbeamertemplate{navigation symbols}{}%
- \newcommand{\alertline}{%
- \usebeamercolor[fg]{normal text}%
- \only{\usebeamercolor[fg]{alerted text}}}
- \begin{document}
- \pgfdeclarelayer{background}
- \pgfsetlayers{background,main}
- \newcommand\hlight[1]{\tikz[overlay, remember picture,baseline=-\the\dimexpr\fontdimen22\textfont2\relax]\node[rectangle,fill=blue!50,rounded corners,fill opacity = 0.2,draw,thick,text opacity =1] {$#1$};}
- \newcommand\tocalculate[1]{\tikz[overlay, remember picture,baseline=-\the\dimexpr\fontdimen22\textfont2\relax]\node[rectangle,fill=green!50,rounded corners,fill opacity = 0.2,draw,thick,text opacity =1] {$#1$};}
- \begin{frame}
- \begin{minipage}[b]{0.30\linewidth}
- \centering
- \begin{align*}
- A &= \begin{pmatrix}
- 1 & 2 & 3\\
- 2 & 8 & 14\\
- 3 & 14 & 34
- \end{pmatrix}\\
- \alertline<1> L &= \alertline<1>\begin{pmatrix}
- 0 & 0 & 0\\
- 0 & 0 & 0\\
- 0 & 0 & 0
- \end{pmatrix}\\
- tmp &= 0
- \end{align*}
- \end{minipage}
- \hspace{0.5cm}
- \begin{minipage}[b]{0.60\linewidth}
- \centering
- \begin{algorithm}[H]
- \begin{algorithmic}
- \Function{Cholesky}{$A \in \mathbb{R}^{n \times n}$}
- \alertline<1>\State $L = \Set{0} \in \mathbb{R}^{n \times n}$ \Comment{Initialisiere $L$}\\
- \alertline<2>\alertline<4>\For{($k=1$; $\;k \leq n$; $\;k$++)}
- \alertline<3>\State $L_{k,k} = \sqrt{A_{k,k} - \sum_{i=1}^{k-1} L_{k,i}^2}$
- \For{($i=k+1$; $\;i \leq n$; $\;i$++)}
- \State $L_{i,k} = \frac{A_{i,k} - \sum_{j=1}^{k-1} L_{i,j} \cdot L_{k,j}}{L_{k,k}}$
- \EndFor
- \EndFor
- \alertline<5>\State \Return $L$
- \EndFunction
- \end{algorithmic}
- \caption{Cholesky-Zerlegung}
- \label{alg:seq1}
- \end{algorithm}
- \end{minipage}
- \end{frame}
- \begin{frame}
- \begin{align*}
- A &= \begin{pmatrix}
- \hlight{1} & 2 & 3\\
- 2 & 8 & 14\\
- 3 & 14 & 34
- \end{pmatrix}\\
- L &= \begin{pmatrix}
- \tocalculate{0} & 0 & 0\\
- 0 & 0 & 0\\
- 0 & 0 & 0
- \end{pmatrix}\\
- tmp &= 0
- \end{align*}
- \end{frame}
- \begin{frame}
- \begin{align*}
- A &= \begin{pmatrix}
- 1 & 2 & 3\\
- 2 & 8 & 14\\
- 3 & 14 & 34
- \end{pmatrix}\\
- L &= \begin{pmatrix}
- \tocalculate{1} & 0 & 0\\
- 0 & 0 & 0\\
- 0 & 0 & 0
- \end{pmatrix}\\
- tmp &= 0
- \end{align*}
- \end{frame}
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- % Calculate L_2,1
- \begin{frame}
- \begin{align*}
- A &= \begin{pmatrix}
- 1 & 2 & 3\\
- \hlight{2} & 8 & 14\\
- 3 & 14 & 34
- \end{pmatrix}\\
- L &= \begin{pmatrix}
- 1 & 0 & 0\\
- \tocalculate{0} & 0 & 0\\
- 0 & 0 & 0
- \end{pmatrix}\\
- tmp &= 0
- \end{align*}
- \end{frame}
- \begin{frame}
- \begin{align*}
- A &= \begin{pmatrix}
- 1 & 2 & 3\\
- 2 & 8 & 14\\
- 3 & 14 & 34
- \end{pmatrix}\\
- L &= \begin{pmatrix}
- \hlight{1} & 0 & 0\\
- \tocalculate{2} & 0 & 0\\
- 0 & 0 & 0
- \end{pmatrix}\\
- tmp &= 0
- \end{align*}
- \end{frame}
- \begin{frame}
- \begin{align*}
- A &= \begin{pmatrix}
- 1 & 2 & 3\\
- 2 & 8 & 14\\
- 3 & 14 & 34
- \end{pmatrix}\\
- L &= \begin{pmatrix}
- 1 & 0 & 0\\
- \tocalculate{2} & 0 & 0\\
- 0 & 0 & 0
- \end{pmatrix}\\
- tmp &= 0
- \end{align*}
- \end{frame}
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- % Calculate L_3,1
- \begin{frame}
- \begin{align*}
- A &= \begin{pmatrix}
- 1 & 2 & 3\\
- 2 & 8 & 14\\
- \hlight{3} & 14 & 34
- \end{pmatrix}\\
- L &= \begin{pmatrix}
- 1 & 0 & 0\\
- 2 & 0 & 0\\
- \tocalculate{0} & 0 & 0
- \end{pmatrix}\\
- tmp &= 0
- \end{align*}
- \end{frame}
- \begin{frame}
- \begin{align*}
- A &= \begin{pmatrix}
- \hlight{1} & 2 & 3\\
- 2 & 8 & 14\\
- 3 & 14 & 34
- \end{pmatrix}\\
- L &= \begin{pmatrix}
- 1 & 0 & 0\\
- 2 & 0 & 0\\
- \tocalculate{3} & 0 & 0
- \end{pmatrix}\\
- tmp &= 0
- \end{align*}
- \end{frame}
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- % Calculate L_2,2
- \begin{frame}
- \begin{align*}
- A &= \begin{pmatrix}
- 1 & 2 & 3\\
- 2 & \hlight{8} & 14\\
- 3 & 14 & 34
- \end{pmatrix}\\
- L &= \begin{pmatrix}
- 1 & 0 & 0\\
- 2 & \tocalculate{0} & 0\\
- 3 & 0 & 0
- \end{pmatrix}\\
- tmp &= 0
- \end{align*}
- \end{frame}
- \begin{frame}
- \begin{align*}
- A &= \begin{pmatrix}
- 1 & 2 & 3\\
- 2 & 8 & 14\\
- 3 & 14 & 34
- \end{pmatrix}\\
- L &= \begin{pmatrix}
- 1 & 0 & 0\\
- \hlight{2} & \tocalculate{8} & 0\\
- 3 & 0 & 0
- \end{pmatrix}\\
- tmp &= 0
- \end{align*}
- \end{frame}
- \begin{frame}
- \begin{align*}
- A &= \begin{pmatrix}
- 1 & 2 & 3\\
- 2 & 8 & 14\\
- 3 & 14 & 34
- \end{pmatrix}\\
- L &= \begin{pmatrix}
- 1 & 0 & 0\\
- 2 & \tocalculate{8} & 0\\
- 3 & 0 & 0
- \end{pmatrix}\\
- tmp &= \hlight{4}
- \end{align*}
- \end{frame}
- \begin{frame}
- \begin{align*}
- A &= \begin{pmatrix}
- 1 & 2 & 3\\
- 2 & 8 & 14\\
- 3 & 14 & 34
- \end{pmatrix}\\
- L &= \begin{pmatrix}
- 1 & 0 & 0\\
- 2 & \tocalculate{4} & 0\\
- 3 & 0 & 0
- \end{pmatrix}\\
- tmp &= 0
- \end{align*}
- \end{frame}
- \begin{frame}
- \begin{align*}
- A &= \begin{pmatrix}
- 1 & 2 & 3\\
- 2 & 8 & 14\\
- 3 & 14 & 34
- \end{pmatrix}\\
- L &= \begin{pmatrix}
- 1 & 0 & 0\\
- 2 & \tocalculate{2} & 0\\
- 3 & 0 & 0
- \end{pmatrix}\\
- tmp &= 0
- \end{align*}
- \end{frame}
- \end{document}
|