Creating The Index For The Branch Table
Where there is no obvious integer value available for a Branch table it can nevertheless be created from a search key (or part of a search key) by some form of arithmetic transformation or could simply be the row number of a database or the entry number in an array containing the search key found during earlier validation of the key.
A hash table may be required to form the index in some cases. However, for single byte input values such as A-Z (or the first byte of a longer key), the contents of the byte itself (raw data) can be used in a two-step, "trivial hash function", process to obtain a final index for a branch table with zero gaps.
- Convert the raw data character to its numeric equivalent (example ASCII 'A' ==> 65 decimal, 0x41 hexadecimal)
- Use the numeric integer value as index into a 256 byte array, to obtain a second index (invalid entries 0; representing gaps, otherwise 1, 2, 3 etc.)
The array would be no larger than (256 x 2) bytes – to hold all possible 16-bit unsigned (short) integers. If no validation is required, and only upper case is used, the size of the array may be as small as (26 x 2) = 52 bytes.
Read more about this topic: Branch Table
Famous quotes containing the words creating the, creating, index, branch and/or table:
“No one is ahead of his time, it is only that the particular variety of creating his time is the one that his contemporaries who are also creating their own time refuse to accept.... For a very long time everybody refuses and then almost without a pause almost everybody accepts. In the history of the refused in the arts and literature the rapidity of the change is always startling.”
—Gertrude Stein (18741946)
“I have an intense personal interest in making the use of American capital in the development of China an instrument for the promotion of the welfare of China, and an increase in her material prosperity without entanglements or creating embarrassment affecting the growth of her independent political power, and the preservation of her territorial integrity.”
—William Howard Taft (18571930)
“Exile as a mode of genius no longer exists; in place of Joyce we have the fragments of work appearing in Index on Censorship.”
—Nadine Gordimer (b. 1923)
“True variety is in that plenitude of real and unexpected elements, in the branch charged with blue flowers thrusting itself, against all expectations, from the springtime hedge which seems already too full, while the purely formal imitation of variety ... is but void and uniformity, that is, that which is most opposed to variety....”
—Marcel Proust (18711922)
“The salt person and blasted place
I furnish with the meat of a fable;
If the dead starve, their stomachs turn to tumble
An upright man in the antipodes
Or spray-based and rock-chested sea:
Over the past table I repeat this present grace.”
—Dylan Thomas (19141953)