-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathexample.tex
74 lines (68 loc) · 2.29 KB
/
example.tex
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
\documentclass[12pt, a4paper]{article}
%\usepackage[ehirecordpointers]{exthashidx}
\usepackage{exthashidx}
%\usepackage[lhirecordpointers]{linhashidx}
\usepackage{linhashidx}
\begin{document}
\begin{figure}[!ht]
\begin{center}
\scalebox{0.8}{
\begin{tikzpicture}
% directory
\xyshift{+00mm}{+00mm}{\exthashidxdirectoryeight{directory}{3}}
% buckets
\xyshift{+20mm}{+50mm}{\exthashidxbucketfour{A}{3}{}{}{64}{16}}
\xyshift{+20mm}{+25mm}{\exthashidxbucketfour{B}{2}{1}{5}{21}{}}
\xyshift{+20mm}{+00mm}{\exthashidxbucketfour{C}{2}{10}{}{}{}}
\xyshift{+20mm}{-25mm}{\exthashidxbucketfour{D}{2}{15}{7}{51}{}}
\xyshift{+20mm}{-50mm}{\exthashidxbucketfour{A2}{3}{4}{12}{20}{36}}
% links
\exthashidxlink{directory-000}{A}
\exthashidxlink{directory-001}{B}
\exthashidxlink{directory-010}{C}
\exthashidxlink{directory-011}{D}
\exthashidxlink{directory-100}{A2}
\exthashidxlink{directory-101}{B}
\exthashidxlink{directory-110}{C}
\exthashidxlink{directory-111}{D}
\end{tikzpicture}
}
\end{center}
\caption{\textit{Extendible Hashing} Index}
\end{figure}
\begin{figure}[!ht]
\begin{center}
\scalebox{0.8}{
\begin{tikzpicture}
\linhashidxtwo{idx}{0}{
\linhashidxtwoentry{000}{00}{
\linhashidxbucketfour{b1}{32}{8}{24}{}
\linhashidxnullptrfour{b1}
}
\linhashidxtwoentry{001}{01}{
\linhashidxbucketfour{b2}{9}{25}{41}{17}
\linhashidxnullptrfour{b2}
\linhashidxnext{b2}{1}
}
\linhashidxtwoentry{010}{10}{
\linhashidxbucketfour{b3}{14}{18}{10}{30}
%\linhashidxnullptr{b3}
\xyshift{11.5em}{0em}{\linhashidxbucketfour{o3}{42}{}{}{}}
\linhashidxlink{b3}{o3}
\linhashidxnullptrfour{o3}
}
\linhashidxtwoentry{011}{11}{
\linhashidxbucketfour{b4}{31}{35}{7}{11}
\linhashidxnullptrfour{b4}
}
\linhashidxtwoentry{100}{00}{
\linhashidxbucketfour{b5}{44}{36}{}{}
\linhashidxnullptrfour{b5}
}
}
\end{tikzpicture}
}
\end{center}
\caption{\textit{Linear Hashing} Index}
\end{figure}
\end{document}