diff --git a/book.pdf b/book.pdf index d33718b..8031c4e 100644 Binary files a/book.pdf and b/book.pdf differ diff --git a/book.tex b/book.tex index c25d5b3..c97b67c 100644 --- a/book.tex +++ b/book.tex @@ -8,7 +8,7 @@ \usepackage[table]{xcolor} \usepackage{tikz} \usepackage{multicol} -\usepackage{hyperref} +\usepackage[colorlinks=true]{hyperref} \usepackage{array} \usepackage{microtype} @@ -105,9 +105,8 @@ \include{chapter16} %\include{chapter20} \chapter{State Graphs} -Please watch the video about state graphs. -The video should be linked on the graph overview site, but please push Johannes -to fix the link here too. +Please watch the video about state graphs.\\ +\url{https://www.youtube.com/watch?v=RdK3b9QWs94} \part{Advanced topics} \include{chapter15} diff --git a/chapter11.tex b/chapter11.tex index e093129..cd2f2b5 100644 --- a/chapter11.tex +++ b/chapter11.tex @@ -545,11 +545,11 @@ with weight $w$. For example, the graph can be stored as follows: \begin{lstlisting} g.assign(4, {}); -g[0].push_back({1,5}); -g[1].push_back({2,7}); -g[1].push_back({3,6}); -g[2].push_back({3,5}); -g[3].push_back({0,2}); +g[0].emplace_back(1,5); +g[1].emplace_back(2,7); +g[1].emplace_back(3,6); +g[2].emplace_back(3,5); +g[3].emplace_back(0,2); \end{lstlisting} The benefit of using adjacency lists is that @@ -723,11 +723,11 @@ Thus, the graph \end{center} can be represented as follows: \begin{lstlisting} -edges.push_back({0,2}); -edges.push_back({1,3}); -edges.push_back({1,4}); -edges.push_back({2,4}); -edges.push_back({3,1}); +edges.emplace_back(0,2); +edges.emplace_back(1,3); +edges.emplace_back(1,4); +edges.emplace_back(2,4); +edges.emplace_back(3,1); \end{lstlisting} \noindent @@ -756,14 +756,14 @@ For example, the graph \end{tikzpicture} \end{center} \begin{samepage} -can be represented as follows\footnote{In some older compilers, the function -\texttt{make\_tuple} must be used instead of the braces (for example, -\texttt{make\_tuple(1,2,5)} instead of \texttt{\{1,2,5\}}).}: + can be represented as follows\footnote{Instead of \texttt{emplace\_back(0,2,5)}, + one could also write \texttt{edges.push\_back(\{0,2,5\})} or + \texttt{edges.push\_back(make\_tuple(0,2,5))}, however, using \texttt{emplace\_back} is generally preferred.}: \begin{lstlisting} -edges.push_back({0,2,5}); -edges.push_back({1,3,7}); -edges.push_back({1,4,6}); -edges.push_back({2,4,5}); -edges.push_back({3,1,2}); +edges.emplace_back(0,2,5); +edges.emplace_back(1,3,7); +edges.emplace_back(1,4,6); +edges.emplace_back(2,4,5); +edges.emplace_back(3,1,2); \end{lstlisting} \end{samepage}