Compare commits
2 Commits
9b1872139d
...
3f3ad0c765
Author | SHA1 | Date | |
---|---|---|---|
3f3ad0c765 | |||
8ca68b0e9a |
@ -6,29 +6,18 @@
|
||||
\begin{itemize}
|
||||
\item Datenstruktur für Wortliste
|
||||
\item Paralleler Such-Algorithmus
|
||||
\item Abgeleitet: Optimierung der Such-Zeit
|
||||
\item Abgeleitet: Optimierung der Laufzeit
|
||||
\end{itemize}
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}{Analyse}
|
||||
|
||||
{\Large Abgeleitete Aufgabenstellung}
|
||||
{\Large Umsetzung}
|
||||
\vspace{0.5cm}
|
||||
|
||||
\begin{minipage}{0.7\textwidth}
|
||||
Aufteilung in zwei Blöcke:
|
||||
\begin{block}{Anwendungs-Schicht (Layer 5 - 7)}
|
||||
\begin{itemize}
|
||||
\item Request/Reponse
|
||||
\item Konkurrierender Zugriff
|
||||
\item Session Handling
|
||||
\end{itemize}
|
||||
\end{block}
|
||||
\begin{block}{Transport-Schicht (Layer 1 - 4)}
|
||||
\begin{itemize}
|
||||
\item Datenübertragung zwischen SG
|
||||
\item Gleichzeitige Kommunikation
|
||||
\end{itemize}
|
||||
\end{block}
|
||||
\end{minipage}
|
||||
\begin{itemize}
|
||||
\item Zwei Phasen: Einlesen und Suchen
|
||||
\item Such-Phase zeitkritischer als Einlese-Phase
|
||||
\item Locks minimieren
|
||||
\end{itemize}
|
||||
\end{frame}
|
||||
|
BIN
docs/folien/bucket_finder.png
Normal file
After Width: | Height: | Size: 76 KiB |
BIN
docs/folien/classes.png
Normal file
After Width: | Height: | Size: 56 KiB |
23
docs/folien/datenstruktur.tex
Normal file
@ -0,0 +1,23 @@
|
||||
\begin{frame}{Datenstrukturen}
|
||||
|
||||
{\Large Architektur}
|
||||
\vspace{0.5cm}
|
||||
|
||||
\begin{itemize}
|
||||
\item Flacher Suchbaum
|
||||
\item Ebene 1: Ein Knoten je Thread
|
||||
\item Ebene 2: Ein Blatt je erster Wort-Buchstabe
|
||||
\item Blätter tragen Wort-Listen
|
||||
\end{itemize}
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}{Datenstrukturen - Implementierung}
|
||||
\begin{figure}
|
||||
\includegraphics[width=\textwidth]{bucket_finder}
|
||||
\end{figure}
|
||||
\begin{itemize}
|
||||
\item buckets: Erste Baum-Ebene, nach Threads
|
||||
\item Bucket: Zweite Baum-Ebene, nach erstem Buchstaben
|
||||
\item WordRefList: Wort-Liste am Blatt
|
||||
\end{itemize}
|
||||
\end{frame}
|
18
docs/folien/einlesen.tex
Normal file
@ -0,0 +1,18 @@
|
||||
\begin{frame}[t]{Einfügen von Daten}
|
||||
\vspace{1cm}
|
||||
\begin{figure}
|
||||
\onslide*<1>{
|
||||
\includegraphics[width=\textwidth]{insert_1}
|
||||
\caption*{Eingabedaten}
|
||||
}
|
||||
\onslide*<2>{
|
||||
\includegraphics[width=\textwidth]{insert_3}
|
||||
\caption*{Aufteilen in Buckets}
|
||||
}
|
||||
\onslide*<3>{
|
||||
\includegraphics[width=\textwidth]{insert_4}
|
||||
\caption*{Mapping nach erstem Buchstaben}
|
||||
}
|
||||
\end{figure}
|
||||
\end{frame}
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
\usepackage[sfdefault]{noto}
|
||||
\usepackage[T1]{fontenc}
|
||||
\usepackage{tikz}
|
||||
\usepackage{caption}
|
||||
\usepackage{fontawesome}
|
||||
|
||||
\definecolor{vector_red}{RGB}{183, 0, 50}
|
||||
@ -46,6 +46,15 @@
|
||||
|
||||
\include{aufgabe}
|
||||
\include{analyse}
|
||||
|
||||
\include{datenstruktur}
|
||||
|
||||
\include{einlesen}
|
||||
\include{suchen}
|
||||
\include{komplexität}
|
||||
|
||||
\include{inkrementell_suchen}
|
||||
|
||||
\include{danke}
|
||||
|
||||
\end{document}
|
||||
|
9
docs/folien/inkrementell_suchen.tex
Normal file
@ -0,0 +1,9 @@
|
||||
\begin{frame}{Inkrementelle Suche}
|
||||
\begin{itemize}
|
||||
\item Such-Phase noch zeitkritischer
|
||||
\item Such-Ergebnis als gefiltertes Such-Objekt
|
||||
\item UI: dynamisch gefüllte Combo-Box
|
||||
\item Asynchrone und ggf. verzögerte Updates
|
||||
\end{itemize}
|
||||
\end{frame}
|
||||
|
22
docs/folien/komplexität.tex
Normal file
@ -0,0 +1,22 @@
|
||||
\begin{frame}{Komplexitäts-Abschätzung}
|
||||
|
||||
BucketFinder
|
||||
|
||||
\begin{itemize}
|
||||
\item Suchraum einfügen: O(n) mit $ n = |Suchraum| $
|
||||
\item Pattern suchen: O(n) mit $ n = \frac{|Suchraum|}{|Threads| \times |Alphabet|} $
|
||||
\item Laufzeit: deutlich schnelleres Einfügen und schelleres Finden von größeren Ergebnismengen
|
||||
\end{itemize}
|
||||
|
||||
\vspace{0.5cm}
|
||||
|
||||
Balancierter Baum
|
||||
|
||||
\begin{itemize}
|
||||
\item Suchraum einfügen: O(n log n)
|
||||
\item Pattern suchen: O(log n)
|
||||
\item Laufzeit: deutlich schneller beim Finden kleinerer Ergebnismengen
|
||||
\end{itemize}
|
||||
|
||||
|
||||
\end{frame}
|
BIN
docs/folien/search.png
Normal file
After Width: | Height: | Size: 152 KiB |
10
docs/folien/suchen.tex
Normal file
@ -0,0 +1,10 @@
|
||||
\begin{frame}[t]{Suchen von Wörtern}
|
||||
\begin{figure}
|
||||
\onslide*<1>{
|
||||
\includegraphics[width=\textwidth]{search}
|
||||
\caption*{Suche nach "BB"}
|
||||
}
|
||||
\end{figure}
|
||||
\end{frame}
|
||||
|
||||
|
BIN
docs/folien/word_list.png
Normal file
After Width: | Height: | Size: 36 KiB |
BIN
docs/folien/word_lists.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
docs/folien/word_ref_list.png
Normal file
After Width: | Height: | Size: 38 KiB |
2120
docs/input.svg
Before Width: | Height: | Size: 97 KiB After Width: | Height: | Size: 162 KiB |
@ -3,11 +3,11 @@
|
||||
#include "finder.h"
|
||||
#include "word_list.h"
|
||||
|
||||
#include <map>
|
||||
#include <unordered_map>
|
||||
|
||||
class Bucket {
|
||||
private:
|
||||
std::map<char, WordRefList> directory_;
|
||||
std::unordered_map<char, WordRefList> directory_;
|
||||
|
||||
public:
|
||||
void insert(const WordList &word_list, size_t first_index, size_t last_index);
|
||||
|
@ -3,11 +3,11 @@
|
||||
#include "finder.h"
|
||||
#include "word_list.h"
|
||||
|
||||
#include <map>
|
||||
#include <unordered_map>
|
||||
|
||||
class GroupedFinder : public Finder {
|
||||
private:
|
||||
std::map<char, WordRefList> groups_;
|
||||
std::unordered_map<char, WordRefList> groups_;
|
||||
|
||||
public:
|
||||
GroupedFinder(const WordList &word_list);
|
||||
|
@ -3,12 +3,12 @@
|
||||
#include "finder.h"
|
||||
#include "word_list.h"
|
||||
|
||||
#include <map>
|
||||
#include <unordered_map>
|
||||
|
||||
class SearchTreeNode {
|
||||
private:
|
||||
WordRefList words_;
|
||||
std::map<const char, SearchTreeNode> children_;
|
||||
std::unordered_map<char, SearchTreeNode> children_;
|
||||
|
||||
public:
|
||||
void insert(std::string_view partial_word, const std::string *original_word);
|
||||
|
@ -1,6 +1,5 @@
|
||||
#include "grouped_finder.h"
|
||||
|
||||
#include <forward_list>
|
||||
#include <mutex>
|
||||
#include <thread>
|
||||
#include <vector>
|
||||
|