| United States-English |
|
|
|
![]() |
Programming with Judy: C LanguageJudy Version 4.0 > Chapter 4 Example of
a Multi-dimensional Array Concepts |
|
Copy each null-terminated string (index) into an array of N words (ulong_t's) with zero-padding in the last word if necessary. Use each word in this array as a level index in a multi-dimensional Judy array. For example, consider these two input strings:
These are used as if they are arrays of 32- bit integers with the following keys:
Since a JudyL data element has both a key and a value, we can use the value to either point to another Judy array, or if the key contains a NULL, we can use the value area for user data. With this logic, the two strings above produce four Judy arrays: Notes:
|
||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||