~ubuntu-branches/ubuntu/precise/judy/precise

« back to all changes in this revision

Viewing changes to doc/ext/Judy_3x.htm

  • Committer: Bazaar Package Importer
  • Author(s): Theodore Y. Ts'o
  • Date: 2004-01-17 00:04:53 UTC
  • Revision ID: james.westby@ubuntu.com-20040117000453-d5sj6uoon2v1g4gf
Tags: upstream-0.0.4
ImportĀ upstreamĀ versionĀ 0.0.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<HTML>
 
2
<HEAD>
 
3
<!-- @(#) $Revision: 4.34 $ $Source: /judy/doc/ext/Judy_3x.htm $ --->
 
4
<TITLE>Judy(3X)</TITLE>
 
5
</HEAD>
 
6
 
 
7
<BODY>
 
8
<TABLE border=0 width="100%"><TR>
 
9
<TD width="40%" align="left">Judy(3X)</TD>
 
10
<TD width="10%" align="center">     </TD>
 
11
<TD width="40%" align="right">Judy(3X)</TD>
 
12
</TR></TABLE>
 
13
 
 
14
<P>
 
15
<DL>
 
16
 
 
17
<!----------------->
 
18
<DT><B>NAME</B></DT>
 
19
<DD>
 
20
Judy functions -
 
21
C libraries for creating and accessing dynamic arrays
 
22
 
 
23
</DD>
 
24
 
 
25
<!----------------->
 
26
<P>
 
27
<DT><B>SYNOPSIS</B></DT>
 
28
<DD>
 
29
<B><PRE>
 
30
 
 
31
<A href="Judy1_3x.htm">Judy1</A>  - maps an Index (word) to a bit
 
32
<A href="JudyL_3x.htm">JudyL</A>  - maps an Index (word) to a word
 
33
<A href="JudySL_3x.htm">JudySL</A> - maps an Index (string) to a word
 
34
</PRE></B>
 
35
 
 
36
 
 
37
<!----------------->
 
38
<P>
 
39
<DT><B>DESCRIPTION</B></DT>
 
40
<DD>
 
41
The Judy family of functions supports fully dynamic arrays.
 
42
These arrays may be indexed by a 32- or 64-bit word (depending on the
 
43
processor) or a string.
 
44
A dynamic array that is sparsely populated can be thought of as a
 
45
mapping function.
 
46
There are 3 different Judy mappings currently supported:
 
47
<BR>Judy1 maps an Index (word) to a bit.
 
48
<BR>JudyL maps an Index (word) to a word.
 
49
<BR>JudySL maps an Index (string) to a word.
 
50
<P>
 
51
For
 
52
<A href="Judy1_3x.htm">Judy1 functions</A>
 
53
and
 
54
<A href="JudyL_3x.htm">JudyL functions</A>,
 
55
<B>Index</B> should be declared as a <B>Word_t</B> type.
 
56
<B>Word_t</B> is defined in the
 
57
<B>Judy.h</B> header file as a
 
58
32- or 64-bit unsigned native integer, and has
 
59
the same number of bits as a pointer.
 
60
<P>
 
61
For
 
62
<A href="JudySL_3x.htm">JudySL functions</A>, each index is a
 
63
null-terminated string.
 
64
 
 
65
<P>
 
66
Judy arrays are both <B>speed-</B> and <B>memory-efficient</B>,
 
67
with no tuning or configuration required, across a
 
68
wide range of index set types (sequential, periodic,
 
69
clustered, random).
 
70
Judy's speed and memory usage are typically better than other data storage
 
71
models such as skiplists,
 
72
binary trees, b-trees, or even hashing, and improves with very large data sets.
 
73
<P>
 
74
A Judy array is created merely by defining a null pointer
 
75
and then storing (inserting) the first element into the array under that
 
76
pointer.
 
77
The memory used by a Judy array is proportional to the population
 
78
(number of elements).
 
79
<P>
 
80
Judy has two Application Program Interfaces (APIs): a C macro interface,
 
81
and a function call interface.
 
82
Because the macro forms are faster and have a simpler error handling
 
83
interface than the equivalent functions, they are the preferred way of
 
84
calling the Judy functions.
 
85
<P>
 
86
Since an initial (empty) Judy array is represented by a null pointer,
 
87
it is possible to construct an array of Judy arrays.
 
88
In other words, a Judy array's values (except Judy1) can be pointers
 
89
to other Judy arrays.
 
90
<P>
 
91
 
 
92
<!----------------->
 
93
<P>
 
94
<DT><B>AUTHOR</B></DT>
 
95
<DD>
 
96
Judy was invented by Doug Baskins and implemented by Hewlett-Packard.
 
97
(Note:  Judy is named for the inventor's sister.)
 
98
 
 
99
<!----------------->
 
100
<P>
 
101
<DT>
 
102
<A name="FILES">
 
103
<B>FILES</B></A></DT>
 
104
<DD>
 
105
Locations of interest include:
 
106
 
 
107
<P>
 
108
<DL>
 
109
<DT>/usr/share/doc/Judy/</DT>
 
110
<DD>Documents, including HTML versions of the manual entries.</DD>
 
111
<DT>/usr/share/doc/Judy/demo/</DT>
 
112
<DD>Demonstration program source files.</DD>
 
113
</DL>
 
114
 
 
115
<!----------------->
 
116
<P>
 
117
<DT><B>SEE ALSO</B></DT>
 
118
<DD>
 
119
<A href="Judy1_3x.htm">Judy1(3X)</A>,
 
120
<A href="JudyL_3x.htm">JudyL(3X)</A>,
 
121
<A href="JudySL_3x.htm">JudySL(3X)</A>,
 
122
<BR>
 
123
the Judy website,
 
124
<A href="http://www.sourcejudy.com/">
 
125
http://www.sourcejudy.com/</A>,
 
126
for more information and Application Notes.
 
127
</DL>
 
128
 
 
129
</BODY>
 
130
</HTML>