diff options
Diffstat (limited to 'datastructures/datastructures.tex')
| -rw-r--r-- | datastructures/datastructures.tex | 82 |
1 files changed, 34 insertions, 48 deletions
diff --git a/datastructures/datastructures.tex b/datastructures/datastructures.tex index 0285490..131a32f 100644 --- a/datastructures/datastructures.tex +++ b/datastructures/datastructures.tex @@ -14,6 +14,15 @@ \sourcecode{datastructures/lazyPropagation.cpp} \end{algorithm} +\begin{algorithm}{Wavelet Tree} + \begin{methods} + \method{Constructor}{baut den Baum auf}{n\*\log(n)} + \method{kth}{sort $[l, r)[k]$}{\log(n)} + \method{countSmaller}{Anzahl elemente in $[l, r)$ kleiner als $k$}{\log(n)} + \end{methods} + \sourcecode{datastructures/waveletTree.cpp} +\end{algorithm} + \begin{algorithm}{Fenwick Tree} \begin{methods} \method{init}{baut den Baum auf}{n\*\log(n)} @@ -29,11 +38,11 @@ \end{methods} \sourcecode{datastructures/fenwickTree2.cpp} \end{algorithm} -\columnbreak \begin{algorithm}{STL-Rope (Implicit Cartesian Tree)} \sourcecode{datastructures/stlRope.cpp} \end{algorithm} +\columnbreak \begin{algorithm}{(Implicit) Treap (Cartesian Tree)} \begin{methods} @@ -62,15 +71,6 @@ \sourcecode{datastructures/sparseTableDisjoint.cpp} \end{algorithm} -\begin{algorithm}{Wavelet Tree} - \begin{methods} - \method{Constructor}{baut den Baum auf}{n\*\log(n)} - \method{kth}{sort $[l, r)[k]$}{\log(n)} - \method{countSmaller}{Anzahl elemente in $[l, r)$ kleiner als $k$}{\log(n)} - \end{methods} - \sourcecode{datastructures/waveletTree.cpp} -\end{algorithm} - \begin{algorithm}{STL-Bitset} \sourcecode{datastructures/bitset.cpp} \end{algorithm} @@ -89,6 +89,29 @@ \end{algorithm} \columnbreak +\begin{algorithm}{Policy Based Data Structures} + \sourcecode{datastructures/pbds.cpp} +\end{algorithm} + +\begin{algorithm}{Lower Envelope (Convex Hull Optimization)} + Um aus einem Lower Envelope einen Upper Envelope zu machen (oder + umgekehrt), einfach beim Einfügen der Geraden $m$ und $b$ negieren. + \subsubsection{Monotonic} + \begin{methods} + \method{add}{add line $mx + b$, $m$ is decreasing}{1} + \method{query}{minimum value at $x$, $x$ is increasing}{1} + \end{methods} + \sourcecode{datastructures/monotonicConvexHull.cpp} + \subsubsection{Dynamic} + \begin{methods} + \method{add}{add line $mx + b$}{\log(n)} + \method{query}{minimum value at $x$}{\log(n)} + \end{methods} + \sourcecode{datastructures/dynamicConvexHull.cpp} + \subsubsection{Li Chao Tree} + \sourcecode{datastructures/lichao.cpp} +\end{algorithm} + \begin{algorithm}{Union-Find} \begin{methods} \method{init}{legt $n$ einzelne Unions an}{n} @@ -109,28 +132,7 @@ \end{methods} \sourcecode{datastructures/unionFind2.cpp} \end{algorithm} - -\begin{algorithm}{Lower Envelope (Convex Hull Optimization)} - Um aus einem Lower Envelope einen Upper Envelope zu machen (oder - umgekehrt), einfach beim Einfügen der Geraden $m$ und $b$ negieren. - \subsubsection{Monotonic} - \begin{methods} - \method{add}{add line $mx + b$, $m$ is decreasing}{1} - \method{query}{minimum value at $x$, $x$ is increasing}{1} - \end{methods} - \sourcecode{datastructures/monotonicConvexHull.cpp} - \columnbreak - \subsubsection{Dynamic} - \begin{methods} - \method{add}{add line $mx + b$}{\log(n)} - \method{query}{minimum value at $x$}{\log(n)} - \end{methods} - \sourcecode{datastructures/dynamicConvexHull.cpp} - \optional{ - \subsubsection{Li Chao tree \opthint} - \sourcecode{datastructures/lichao.cpp} - } -\end{algorithm} +\columnbreak \begin{algorithm}{Persistent} \begin{methods} @@ -139,28 +141,12 @@ \method{reset}{setzt die Datenstruktur auf Zeitpunkt $t$}{1} \end{methods} \sourcecode{datastructures/persistent.cpp} - \columnbreak \sourcecode{datastructures/persistentArray.cpp} \end{algorithm} -\begin{algorithm}{STL-Tree} - \sourcecode{datastructures/stlTree.cpp} -\end{algorithm} - -\begin{algorithm}{STL Priority Queue} - Nicht notwendig, wenn Smaller-Larger-Optimization greift. - \sourcecode{datastructures/stlPQ.cpp} -\end{algorithm} - -\begin{algorithm}{STL HashMap} - 3 bis 4 mal langsamer als \code{std::vector} aber 8 bis 9 mal schneller als \code{std::map} - \sourcecode{datastructures/stlHashMap.cpp} -\end{algorithm} - \begin{algorithm}[optional]{Erste unbenutzte natürliche Zahl} \begin{methods} \method{get\_first\_unused}{findet kleinste unbenutzte Zahl}{\log(n)} \end{methods} \sourcecode{datastructures/firstUnused.cpp} \end{algorithm} - |
