Programming with Judy
Using Judy
Using Judy1
Chapter 328
Using Judy1
Judy1 functions represent Boolean values (bit maps) in a Judy array.
These functions support arrays of one-bit (binary) values, representing
true/false, valid/invalid, or present/absent.
The table below lists the Judy1 functions. For more information, see the
Judy1(3X )man page.
Table 3-2
Judy1 functions Actions
Judy1Test Indicates whether the index is set in the array.
Judy1Set Sets a bit in the array.
Judy1Unset Clears a bit in the array.
Judy1First Locates the first index set in the array (including the
passed index).
Judy1Next Typically continues a sorted order scan of the set
indexes in a bit array or locates a neighbor of an
index.
Judy1Last Typically begins a reverse sorted-order scan of the set
indexes in a bit array.
Judy1Prev Typically continues a reverse sorted-order scan of the
set indexes in a bit array or locates a neighbor of an
index.
Judy1Count Returns the count of set indexes between the specified
indexes, including the specified indexes themselves.
Judy1ByCount Locates the Nth index (N=count) that is set in the bit
array.
Judy1FreeArray() Frees the entire bit array. This is much faster than
using Judy1Next and Judy1Unset.