summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpjungeblut <paul.jungeblut@gmail.com>2014-11-25 20:57:41 +0100
committerpjungeblut <paul.jungeblut@gmail.com>2014-11-25 20:57:41 +0100
commit1199b187daa65b762d2f6b681d54e9aac2780783 (patch)
tree4ec1e619d9765603ebb180ee4a5d63024b917f7c
parent1a91dadfeed24be8ceda8636795ad776c658bb88 (diff)
Eingabehilfe für Zeilenweise-Eingabe
-rw-r--r--convenience/convenience.tex4
-rw-r--r--convenience/split.cpp9
-rw-r--r--sonstiges/sonstiges.tex2
-rw-r--r--tcr.pdfbin202167 -> 203167 bytes
-rw-r--r--tcr.tex1
5 files changed, 15 insertions, 1 deletions
diff --git a/convenience/convenience.tex b/convenience/convenience.tex
new file mode 100644
index 0000000..7871efd
--- /dev/null
+++ b/convenience/convenience.tex
@@ -0,0 +1,4 @@
+\section{Convenience-Methoden}
+
+\subsection{Zeileneingabe}
+\lstinputlisting{convenience/split.cpp} \ No newline at end of file
diff --git a/convenience/split.cpp b/convenience/split.cpp
new file mode 100644
index 0000000..d7628f3
--- /dev/null
+++ b/convenience/split.cpp
@@ -0,0 +1,9 @@
+vector<string> split(string &s, string delim) { //zerlegt s anhand aller Zeichen in delim
+ vector<string> result; char *token;
+ token = strtok((char*)s.c_str(), (char*)delim.c_str());
+ while (token != NULL) {
+ result.push_back(string(token));
+ token = strtok(NULL, (char*)delim.c_str());
+ }
+ return result;
+} \ No newline at end of file
diff --git a/sonstiges/sonstiges.tex b/sonstiges/sonstiges.tex
index a0e2fb5..2cfd9d7 100644
--- a/sonstiges/sonstiges.tex
+++ b/sonstiges/sonstiges.tex
@@ -15,7 +15,7 @@ Wenn die Eingabe aus einem kleinen Intervall $\left[0, n\right)$ stammt ist Buck
\lstinputlisting{sonstiges/bucketSort.cpp}
\subsubsection{LSD-Radixsort}
-\lstinputlisting{sonstiges/radixsort.cpp}
+\lstinputlisting{sonstiges/radixSort.cpp}
\subsection{Bit Operations}
\lstinputlisting{sonstiges/bitOps.cpp}
diff --git a/tcr.pdf b/tcr.pdf
index e13c314..628d51c 100644
--- a/tcr.pdf
+++ b/tcr.pdf
Binary files differ
diff --git a/tcr.tex b/tcr.tex
index cbdb2e6..2d9fc82 100644
--- a/tcr.tex
+++ b/tcr.tex
@@ -70,5 +70,6 @@
\input{string/string}
\input{java/java.tex}
\input{sonstiges/sonstiges}
+\input{convenience/convenience}
\end{document} \ No newline at end of file