Durch die ausführliche Tabelle ist dieser Teil jetzt doppelt.
[diplomarbeit.git] / images / oe-post-recursive-diff2.tex
1 \begin{tikzpicture}[scale=0.66,auto]
2
3 \pgfmathsetmacro{\lastzeroindex}{2}
4
5 % Space between nodes
6 \pgfmathsetmacro{\spacingx}{1.3}
7 % Amount even boxes are raised
8 \pgfmathsetmacro{\offsety}{0.8}
9
10 \pgfmathsetmacro{\totalheight}{4 + \offsety} % Height of one sub-picture.
11
12 % Lines
13 \foreach \x in {0, ..., 7}
14   \draw[edge] (\spacingx * \x, 0) -- (\spacingx * \x, \totalheight);
15
16 % Even zero nodes
17 \foreach \x in {0, ..., \lastzeroindex}
18 {
19   \draw[red box]  (2 * \spacingx * \x - .5, 2 + \offsety) rectangle +(1,1);
20   \draw (2 * \spacingx * \x, 2.5 + \offsety) node {$0$};
21 }
22
23 % Even one nodes
24 \pgfmathsetmacro{\firstoneindex}{\lastzeroindex+1}
25 \foreach \x in {\firstoneindex, ..., 3}
26 {
27   \draw[blue box] (2 * \spacingx * \x - .5, 2 + \offsety) rectangle +(1,1);
28   \draw (2 * \spacingx * \x, 2.5 + \offsety) node {$1$};
29 }
30
31 % Odd zero nodes
32 \foreach \x in {0, ..., 0}
33 {
34   \draw[red box]  (\spacingx + 2 * \spacingx * \x - .5, 2) rectangle +(1,1);
35   \draw (\spacingx + 2 * \spacingx * \x, 2.5) node {$0$};
36 }
37
38 % Odd one nodes
39 \foreach \x in {1, ..., 3}
40 {
41   \draw[blue box] (\spacingx + 2 * \spacingx * \x - .5, 2) rectangle +(1,1);
42   \draw (\spacingx + 2 * \spacingx * \x, 2.5) node {$1$};
43 }
44
45 % Comparators
46 \foreach \x in {0, ..., 2}
47   \draw[comp] (    \spacingx + 2 * \spacingx * \x, 1) node[vertex] {}
48            -- (2 * \spacingx + 2 * \spacingx * \x, 1) node[vertex] {};
49
50 \end{tikzpicture}