|
1 | 1 | \begin{figure}
|
2 |
| - \begin{tikzpicture} |
3 |
| - \tikzstyle{every node}=[circle, draw]; |
| 2 | + \begin{tikzpicture}[inner/.style={circle}, l/.style={font=\small, align=center}] |
| 3 | + \tikzstyle{every node}=[draw]; |
4 | 4 | \only<1>{
|
5 | 5 | \tikzstyle{level 1}=[sibling distance=2cm];
|
6 |
| - \draw (0,0) node (root) [anchor=south] {4} child {node {A}} child {node {B}} child {node {C}} child {node {D}}; |
| 6 | + \draw (0,0) node[inner] (root) [anchor=south] {4} child {node {A}} child {node {B}} child {node {C}} child {node {D}}; |
7 | 7 | }
|
8 | 8 | \only<2>{
|
9 | 9 | \tikzstyle{level 1}=[sibling distance=1cm];
|
10 |
| - \draw (0,0) node (root) [anchor=south] {8} child {node {A}} child {node {B}} child {node {C}} child {node {D}} child {node {E}} child {node {F}} child {node {G}}; |
11 |
| - } |
12 |
| - |
13 |
| - |
| 10 | + \draw (0,0) node[inner] (root) [anchor=south] {8} child {node {A}} child {node {B}} child {node {C}} child {node {D}} child {node {E}} child {node {F}} child {node {G}}; |
| 11 | + } |
14 | 12 | \end{tikzpicture}
|
15 | 13 | \caption*{Flat access tree}
|
16 | 14 | \end{figure}
|
|
27 | 25 | % \end{figure}}
|
28 | 26 |
|
29 | 27 | \begin{figure}
|
30 |
| - \begin{tikzpicture} |
31 |
| - \tikzstyle{every node}=[circle, draw]; |
| 28 | + \begin{tikzpicture}[inner/.style={circle}, l/.style={font=\small, align=center}] |
| 29 | + \tikzstyle{every node}=[draw]; |
32 | 30 | \tikzstyle{level 1}=[sibling distance=4cm, level distance=1cm];
|
33 | 31 | \tikzstyle{level 2}=[sibling distance=2cm, level distance=1.5cm];
|
34 | 32 | \tikzstyle{level 3}=[sibling distance=1cm, level distance=1.5cm];
|
35 | 33 |
|
36 |
| - \only<1>{\draw (0,0) node (root) [anchor=south] {2} child {node {2} child {node {A}} child {node {B}}} child {node {2} child {node {C}} child {node {D}}};} |
| 34 | + \only<1>{\draw (0,0) node[inner] (root) [anchor=south] {2} child {node[inner] {2} child {node {A}} child {node {B}}} child {node[inner] {2} child {node {C}} child {node {D}}};} |
37 | 35 |
|
38 |
| - \only<2>{\draw (0,0) node (root) [anchor=south] {2} |
39 |
| - child {node {2} child { node {2} child {node {A}} child {node {B}}} child {node {2} child {node {C}} child {node {D}}}} |
40 |
| - child {node {2} child { node {2} child {node {D}} child {node {E}}} child { node {2} child {node {F}} child {node {G}}} |
| 36 | + \only<2>{\draw (0,0) node[inner] (root) [anchor=south] {2} |
| 37 | + child {node[inner] {2} child { node[inner] {2} child {node {A}} child {node {B}}} child { node[inner] {2} child {node {C}} child {node {D}}}} |
| 38 | + child {node[inner] {2} child { node[inner] {2} child {node {D}} child {node {E}}} child { node[inner] {2} child {node {F}} child {node {G}}} |
41 | 39 | };}
|
42 | 40 | \end{tikzpicture}
|
43 | 41 | \caption*{Perfect binary access tree (depth \only<1>{2}\only<2>{3})}
|
|
0 commit comments