-
Notifications
You must be signed in to change notification settings - Fork 7
/
lehman-yao-orthodox-btree-suffix.dot
167 lines (161 loc) · 6.37 KB
/
lehman-yao-orthodox-btree-suffix.dot
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
// Example B-Tree graph
//
// Breadth-first order
//
// Start from root, go left to right
//
// Workflow:
//
// $ dot -T svg btree.dot -o btree.svg;
digraph nbtree {
graph [fontname = "monospace"];
node [shape = none,height=.1,fontname = "monospace",fontsize=8];
// Level 2 (Root internal level)
rootnode[ label=<<table>
<tr>
<td bgcolor='burlywood' port="s0">-∞</td>
<td bgcolor='white' port="d0">↧</td>
<td bgcolor='burlywood' port="s1">P</td>
<td bgcolor='white' port="d1">↧</td>
<td bgcolor='burlywood' port="hk">+∞</td>
</tr>
</table>
>
];
// Downlink arrows to children:
"rootnode":d0 -> "leftinternal"
"rootnode":d1 -> "rightinternal"
// sibling pointer:
// (None)
// Level 1 (Internal level)
// Downlinks + highkey:
leftinternal[ label=<<table>
<tr>
<td bgcolor='burlywood' port="s0">-∞</td>
<td bgcolor='white' port="d0">↧</td>
<td bgcolor='burlywood' port="s1">D</td>
<td bgcolor='white' port="d1">↧</td>
<td bgcolor='burlywood' port="s2">G</td>
<td bgcolor='white' port="d2">↧</td>
<td bgcolor='burlywood' port="s3">N</td>
<td bgcolor='white' port="d3">↧</td>
<td bgcolor='burlywood' port="hk">P</td>
</tr>
</table>
>
];
// Downlink arrows to children:
"leftinternal":d0 -> "leftleafnode_1"
"leftinternal":d1 -> "leftleafnode_2"
"leftinternal":d2 -> "leftleafnode_3"
"leftinternal":d3 -> "leftleafnode_4"
// sibling pointer:
"leftinternal" -> "rightinternal"[constraint=false,color=black,style=dashed,arrowsize=0.5]
// Downlinks + highkey:
rightinternal[ label=<<table>
<tr>
<td bgcolor='burlywood' port="s0">"-∞"</td>
<td bgcolor='white' port="d0">↧</td>
<td bgcolor='burlywood' port="s1">T</td>
<td bgcolor='white' port="d1">↧</td>
<td bgcolor='burlywood' port="s2">Y</td>
<td bgcolor='white' port="d2">↧</td>
<td bgcolor='burlywood' port="hk">+∞</td>
</tr>
</table>
>
];
// Downlink arrows to children:
"rightinternal":d0 -> "rightleafnode_1":t0
"rightinternal":d1 -> "rightleafnode_2":t0
"rightinternal":d2 -> "rightleafnode_3":t0
// sibling pointer:
// (None)
// Level 0 (leaf level)
leftleafnode_1[ label=<<table>
<tr>
<td bgcolor='darkseagreen1' port="t0">Alfa</td>
<td bgcolor='darkseagreen1' port="t1">Bravo</td>
<td bgcolor='burlywood' port="hk">D</td>
</tr>
</table>
>
];
// sibling pointer:
"leftleafnode_1" -> "leftleafnode_2"[constraint=false,color=black,style=dashed,arrowsize=0.5]
leftleafnode_2[ label=<<table>
<tr>
<td bgcolor='darkseagreen1' port="t0">Delta</td>
<td bgcolor='darkseagreen1' port="t1">Echo</td>
<td bgcolor='darkseagreen1' port="t2">Foxtrot</td>
<td bgcolor='burlywood' port="hk">G</td>
</tr>
</table>
>
];
// sibling pointer:
"leftleafnode_2" -> "leftleafnode_3"[constraint=false,color=black,style=dashed,arrowsize=0.5]
leftleafnode_3[ label=<<table>
<tr>
<td bgcolor='darkseagreen1' port="t0">Juliet</td>
<td bgcolor='darkseagreen1' port="t1">Kilo</td>
<td bgcolor='darkseagreen1' port="t2">Lima</td>
<td bgcolor='darkseagreen1' port="t3">Mike</td>
<td bgcolor='burlywood' port="hk">N</td>
</tr>
</table>
>
];
// sibling pointer:
"leftleafnode_3" -> "leftleafnode_4"[constraint=false,color=black,style=dashed,arrowsize=0.5]
leftleafnode_4[ label=<<table>
<tr>
<td bgcolor='darkseagreen1' port="t0">November</td>
<td bgcolor='darkseagreen1' port="t1">Oscar</td>
<td bgcolor='burlywood' port="hk">P</td>
</tr>
</table>
>
];
// sibling/cousin pointer:
"leftleafnode_4" -> "rightleafnode_1"[constraint=false,color=gray,style=dashed,arrowsize=0.5]
rightleafnode_1[ label=<<table>
<tr>
<td bgcolor='darkseagreen1' port="t0">Quebec</td>
<td bgcolor='darkseagreen1' port="t1">Romeo</td>
<td bgcolor='darkseagreen1' port="t2">Sierra</td>
<td bgcolor='burlywood' port="hk">T</td>
</tr>
</table>
>
];
// sibling pointer:
"rightleafnode_1" -> "rightleafnode_2"[constraint=false,color=black,style=dashed,arrowsize=0.5]
rightleafnode_2[ label=<<table>
<tr>
<td bgcolor='darkseagreen1' port="t0">Uniform</td>
<td bgcolor='darkseagreen1' port="t1">Victor</td>
<td bgcolor='darkseagreen1' port="t2">XRay</td>
<td bgcolor='burlywood' port="hk">Y</td>
</tr>
</table>
>
];
// sibling pointer:
"rightleafnode_2" -> "rightleafnode_3"[constraint=false,color=black,style=dashed,arrowsize=0.5]
rightleafnode_3[ label=<<table>
<tr>
<td bgcolor='darkseagreen1' port="t0">Yankee</td>
<td bgcolor='darkseagreen1' port="t1">Zulu</td>
<td bgcolor='burlywood' port="hk">+∞</td>
</tr>
</table>
>
];
// sibling pointer:
// (None)
// Force alignment from root to internal to leaf levels:
edge[style=invis];
"rootnode":s1 -> "leftleafnode_4":hk
"leftinternal":hk -> "leftleafnode_4":hk
}