summaryrefslogtreecommitdiff
path: root/content/graph
diff options
context:
space:
mode:
Diffstat (limited to 'content/graph')
-rw-r--r--content/graph/binary_lifting.cpp2
-rw-r--r--content/graph/graph.tex6
2 files changed, 4 insertions, 4 deletions
diff --git a/content/graph/binary_lifting.cpp b/content/graph/binary_lifting.cpp
index f88b1a9..5ed6c07 100644
--- a/content/graph/binary_lifting.cpp
+++ b/content/graph/binary_lifting.cpp
@@ -3,7 +3,7 @@ struct Lift {
Lift(vector<vector<int>> &adj, int root):
dep(adj.size()), par(adj.size()), jmp(adj.size(), root) {
- auto dfs = [&](auto &self, int u, int p, int d) -> void {
+ auto dfs = [&](auto &&self, int u, int p, int d) -> void {
dep[u] = d, par[u] = p;
jmp[u] = dep[p] + dep[jmp[jmp[p]]] == 2*dep[jmp[p]]
? jmp[jmp[p]] : p;
diff --git a/content/graph/graph.tex b/content/graph/graph.tex
index bf51d74..f6f3d02 100644
--- a/content/graph/graph.tex
+++ b/content/graph/graph.tex
@@ -118,7 +118,7 @@
\subsubsection{\textsc{Floyd-Warshall}-Algorithmus}
\method{floydWarshall}{kürzeste Pfade oder negative Kreise finden}{\abs{V}^3}
\begin{itemize}
- \item \code{dist[i][i] = 0, dist[i][j] = edge\{j, j\}.weight} oder \code{INF}
+ \item \code{dist[i][i] = 0, dist[i][j] = edge\{i, j\}.weight} oder \code{INF}
\item \code{i} liegt auf einem negativen Kreis $\Leftrightarrow$ \code{dist[i][i] < 0}.
\end{itemize}
\sourcecode{graph/floydWarshall.cpp}
@@ -140,12 +140,12 @@ Sei $a_{ij}$ die Adjazenzmatrix von $G$ \textcolor{gray}{(mit $a_{ii} = 1$)}, da
\begin{algorithm}{Dynamic Connectivity}
\begin{methods}
\method{Constructor}{erzeugt Baum ($n$ Knoten, $m$ updates)}{n+m}
- \method{addEdge}{fügt Kannte ein,\code{id}=delete Zeitpunkt}{\log(n)}
+ \method{addEdge}{fügt Kante ein, \code{id} = delete-Zeitpunkt}{\log(n)}
\method{eraseEdge}{entfernt Kante \code{id}}{\log(n)}
\end{methods}
\sourcecode{graph/connect.cpp}
\end{algorithm}
-\clearpage
+\columnbreak