images/bitonic-merge{,-trichter}.tex: Add graphics which show the bitonic merge.
[diplomarbeit.git] / images / bitonic-merge.tex
1 \begin{tikzpicture}[scale=0.70,auto]
2 \path[edge] (1,0) -- (1,9) node at ++(0,.5em) {$u_0$};
3 \path[edge] (2,0) -- (2,9) node at ++(0,.5em) {$u_1$};
4 \path[edge] (3,0) -- (3,9) node at ++(0,.5em) {$u_2$};
5 \path[edge] (4,0) -- (4,9) node at ++(0,.5em) {$u_3$};
6 \path[edge] (5,0) -- (5,9) node at ++(0,.5em) {$v_0$};
7 \path[edge] (6,0) -- (6,9) node at ++(0,.5em) {$v_1$};
8 \path[edge] (7,0) -- (7,9) node at ++(0,.5em) {$v_2$};
9 \path[edge] (8,0) -- (8,9) node at ++(0,.5em) {$v_3$};
10
11 \draw[fill=white] (0.75,6) rectangle (4.25,8);
12 \path[draw,-,fill=red!30] (0.75,6) -- (4.25,8) -- (4.25,6) -- cycle;
13
14 \draw[fill=white] (4.75,6) rectangle (8.25,8);
15 \path[draw,-,fill=blue!30] (8.25,6) -- (4.75,8) -- (4.75,6) -- cycle;
16
17 \node[vertex] (v0) at (1,5) {};
18 \node[vertex] (v4) at (5,5) {};
19 \path[comp] (v0) -- (v4);
20
21 \node[vertex] (v1) at (2,4.667) {};
22 \node[vertex] (v5) at (6,4.667) {};
23 \path[comp] (v1) -- (v5);
24
25 \node[vertex] (v2) at (3,4.333) {};
26 \node[vertex] (v6) at (7,4.333) {};
27 \path[comp] (v2) -- (v6);
28
29 \node[vertex] (v3) at (4,4) {};
30 \node[vertex] (v7) at (8,4) {};
31 \path[comp] (v3) -- (v7);
32
33 \draw[fill=white] (0.75,1) rectangle (4.25,3);
34 \path[draw,-,fill=red!30] (2.5,1) -- (0.75,1) -- (2.5,2);
35 \path[draw,-,fill=blue!30] (2.5,1) -- (4.25,1) -- (2.5,2);
36
37 \draw[fill=white] (4.75,1) rectangle (8.25,3);
38 \path[draw,-,fill=blue!30] (6.5,2) -- (4.75,3) -- (4.75,1) -- (6.5,1);
39 \path[draw,-,fill=red!30] (6.5,2) -- (8.25,3) -- (8.25,1) -- (6.5,1);
40
41 \end{tikzpicture}