From 37d10132a82fd46805bf9e9a6694032a6a963296 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Fri, 25 Feb 2011 18:46:09 +0100 Subject: [PATCH] Die Visualisierung des bitonen Mischers verbessert. --- images/bitonic-merge-trichter.tex | 57 +++++++++++++++++++-------------------- images/bitonic-merge.tex | 55 ++++++++++++++++++------------------- 2 files changed, 56 insertions(+), 56 deletions(-) diff --git a/images/bitonic-merge-trichter.tex b/images/bitonic-merge-trichter.tex index 70e5c3f..47ea5a3 100644 --- a/images/bitonic-merge-trichter.tex +++ b/images/bitonic-merge-trichter.tex @@ -1,43 +1,42 @@ \begin{tikzpicture}[scale=0.70,auto] -\path[edge] (1,0) -- (1,9) node at ++(0,.5em) {$u_0$}; -\path[edge] (2,0) -- (2,9) node at ++(0,.5em) {$u_1$}; -\path[edge] (3,0) -- (3,9) node at ++(0,.5em) {$u_2$}; -\path[edge] (4,0) -- (4,9) node at ++(0,.5em) {$u_3$}; -\path[edge] (5,0) -- (5,9) node at ++(0,.5em) {$v_3$}; -\path[edge] (6,0) -- (6,9) node at ++(0,.5em) {$v_2$}; -\path[edge] (7,0) -- (7,9) node at ++(0,.5em) {$v_1$}; -\path[edge] (8,0) -- (8,9) node at ++(0,.5em) {$v_0$}; - -\draw[fill=white] (0.75,6) rectangle (4.25,8); -%\path[draw,-,color=red,fill=red!10] (1,6.25) -- (4,7.75) -- (4,6.25) -- cycle; -\path[red box] (1,6.25) -- (4,7.75) -- (4,6.25) -- cycle; - -\draw[fill=white] (4.75,6) rectangle (8.25,8); -%\path[draw,-,color=blue,fill=blue!10] (8,6.25) -- (8,7.75) -- (5,6.25) -- cycle; -\path[blue box] (8,6.25) -- (8,7.75) -- (5,6.25) -- cycle; - -\node[vertex] (v0) at (1,5) {}; -\node[vertex] (v4) at (8,5) {}; +\path[edge] (1,0) node at ++(0,-0.5) {$w_0$} -- (1,12) node at ++(0,.5) {$u_0$}; +\path[edge] (2,0) node at ++(0,-0.5) {$w_1$} -- (2,12) node at ++(0,.5) {$u_1$}; +\path[edge] (3,0) node at ++(0,-0.5) {$w_2$} -- (3,12) node at ++(0,.5) {$u_2$}; +\path[edge] (4,0) node at ++(0,-0.5) {$w_3$} -- (4,12) node at ++(0,.5) {$u_3$}; +\path[edge] (5,0) node at ++(0,-0.5) {$w_4$} -- (5,12) node at ++(0,.5) {$v_0$}; +\path[edge] (6,0) node at ++(0,-0.5) {$w_5$} -- (6,12) node at ++(0,.5) {$v_1$}; +\path[edge] (7,0) node at ++(0,-0.5) {$w_6$} -- (7,12) node at ++(0,.5) {$v_2$}; +\path[edge] (8,0) node at ++(0,-0.5) {$w_7$} -- (8,12) node at ++(0,.5) {$v_3$}; + +\path[red box] (0.75,9) -- (4.25,9) -- (4.25,11) -- cycle; +\path[blue box] (4.75,9) -- (8.25,9) -- (8.25,11) -- cycle; + +\node[vertex] (v0) at (1,8) {}; +\node[vertex] (v4) at (8,8) {}; \path[comp] (v0) -- (v4); -\node[vertex] (v1) at (2,4.667) {}; -\node[vertex] (v5) at (7,4.667) {}; +\node[vertex] (v1) at (2,7.667) {}; +\node[vertex] (v5) at (7,7.667) {}; \path[comp] (v1) -- (v5); -\node[vertex] (v2) at (3,4.333) {}; -\node[vertex] (v6) at (6,4.333) {}; +\node[vertex] (v2) at (3,7.333) {}; +\node[vertex] (v6) at (6,7.333) {}; \path[comp] (v2) -- (v6); -\node[vertex] (v3) at (4,4) {}; -\node[vertex] (v7) at (5,4) {}; +\node[vertex] (v3) at (4,7) {}; +\node[vertex] (v7) at (5,7) {}; \path[comp] (v3) -- (v7); +\path[red box] (0.75,4) -- (2.4,4) -- (2.4,4.95) -- cycle; +\path[blue box] (2.6,4) -- (4.25,4) -- (2.6,4.95) -- cycle; + +\path[red box] (4.75,4) -- (6.4,4) -- (6.4,5.05) -- (4.75,6) -- cycle; +\path[blue box] (6.6,4) -- (8.25,4) -- (8.25,6) -- (6.6,5.05) -- cycle; + \draw[fill=white] (0.75,1) rectangle (4.25,3); -\path[red box] (1,1.25) -- (2.4,1.25) -- (2.4,1.95) -- cycle; -\path[blue box] (2.6,1.95) -- (4,1.25) -- (2.6,1.25) -- cycle; +\node at (2.5,2) {\small $\bm{\frac{n}{2}}$}; \draw[fill=white] (4.75,1) rectangle (8.25,3); -\path[red box] (5,2.75) -- (6.4,1.95) -- (6.4,1.25) -- (5,1.25) -- cycle; -\path[blue box] (6.6,1.95) -- (8,2.75) -- (8,1.25) -- (6.6,1.25) -- cycle; +\node at (6.5,2) {\small $\bm{\frac{n}{2}}$}; \end{tikzpicture} diff --git a/images/bitonic-merge.tex b/images/bitonic-merge.tex index d33dd3b..0dbfe59 100644 --- a/images/bitonic-merge.tex +++ b/images/bitonic-merge.tex @@ -1,41 +1,42 @@ \begin{tikzpicture}[scale=0.70,auto] -\path[edge] (1,0) -- (1,9) node at ++(0,.5em) {$u_0$}; -\path[edge] (2,0) -- (2,9) node at ++(0,.5em) {$u_1$}; -\path[edge] (3,0) -- (3,9) node at ++(0,.5em) {$u_2$}; -\path[edge] (4,0) -- (4,9) node at ++(0,.5em) {$u_3$}; -\path[edge] (5,0) -- (5,9) node at ++(0,.5em) {$v_0$}; -\path[edge] (6,0) -- (6,9) node at ++(0,.5em) {$v_1$}; -\path[edge] (7,0) -- (7,9) node at ++(0,.5em) {$v_2$}; -\path[edge] (8,0) -- (8,9) node at ++(0,.5em) {$v_3$}; - -\draw[fill=white] (0.75,6) rectangle (4.25,8); -\path[red box] (1,6.25) -- (4,7.75) -- (4,6.25) -- cycle; - -\draw[fill=white] (4.75,6) rectangle (8.25,8); -\path[blue box] (8,6.25) -- (5,7.75) -- (5,6.25) -- cycle; - -\node[vertex] (v0) at (1,5) {}; -\node[vertex] (v4) at (5,5) {}; +\path[edge] (1,0) node at ++(0,-0.5) {$w_0$} -- (1,12) node at ++(0,.5) {$u_0$}; +\path[edge] (2,0) node at ++(0,-0.5) {$w_1$} -- (2,12) node at ++(0,.5) {$u_1$}; +\path[edge] (3,0) node at ++(0,-0.5) {$w_2$} -- (3,12) node at ++(0,.5) {$u_2$}; +\path[edge] (4,0) node at ++(0,-0.5) {$w_3$} -- (4,12) node at ++(0,.5) {$u_3$}; +\path[edge] (5,0) node at ++(0,-0.5) {$w_4$} -- (5,12) node at ++(0,.5) {$v_0$}; +\path[edge] (6,0) node at ++(0,-0.5) {$w_5$} -- (6,12) node at ++(0,.5) {$v_1$}; +\path[edge] (7,0) node at ++(0,-0.5) {$w_6$} -- (7,12) node at ++(0,.5) {$v_2$}; +\path[edge] (8,0) node at ++(0,-0.5) {$w_7$} -- (8,12) node at ++(0,.5) {$v_3$}; + +\path[red box] (0.75,9) -- (4.25,9) -- (4.25,11) -- cycle; +\path[blue box] (4.75,9) -- (8.25,9) -- (4.75,11) -- cycle; + +\node[vertex] (v0) at (1,8) {}; +\node[vertex] (v4) at (5,8) {}; \path[comp] (v0) -- (v4); -\node[vertex] (v1) at (2,4.667) {}; -\node[vertex] (v5) at (6,4.667) {}; +\node[vertex] (v1) at (2,7.667) {}; +\node[vertex] (v5) at (6,7.667) {}; \path[comp] (v1) -- (v5); -\node[vertex] (v2) at (3,4.333) {}; -\node[vertex] (v6) at (7,4.333) {}; +\node[vertex] (v2) at (3,7.333) {}; +\node[vertex] (v6) at (7,7.333) {}; \path[comp] (v2) -- (v6); -\node[vertex] (v3) at (4,4) {}; -\node[vertex] (v7) at (8,4) {}; +\node[vertex] (v3) at (4,7) {}; +\node[vertex] (v7) at (8,7) {}; \path[comp] (v3) -- (v7); +\path[red box] (0.75,4) -- (2.4,4) -- (2.4,4.95) -- cycle; +\path[blue box] (2.6,4) -- (4.25,4) -- (2.6,4.95) -- cycle; + +\path[blue box] (4.75,4) -- (6.4,4) -- (6.4,5.05) -- (4.75,6) -- cycle; +\path[red box] (6.6,4) -- (8.25,4) -- (8.25,6) -- (6.6,5.05) -- cycle; + \draw[fill=white] (0.75,1) rectangle (4.25,3); -\path[red box] (1,1.25) -- (2.4,1.25) -- (2.4,1.95) -- cycle; -\path[blue box] (2.6,1.95) -- (4,1.25) -- (2.6,1.25) -- cycle; +\node at (2.5,2) {\small $\bm{\frac{n}{2}}$}; \draw[fill=white] (4.75,1) rectangle (8.25,3); -\path[blue box] (5,2.75) -- (6.4,1.95) -- (6.4,1.25) -- (5,1.25) -- cycle; -\path[red box] (6.6,1.95) -- (8,2.75) -- (8,1.25) -- (6.6,1.25) -- cycle; +\node at (6.5,2) {\small $\bm{\frac{n}{2}}$}; \end{tikzpicture} -- 2.11.0