Content deleted Content added
NickyMcLean (talk | contribs) m →Applicable arrays: 0-255 or 1-256... |
Incnis Mrsi (talk | contribs) one should learn better to write technical articles |
||
Line 1:
{{multiple issues |one source=January 2012 |essay-like=January 2012}}
'''Index mapping''' is a [[computer science]] term (also known as a "'''trivial [[hash function]]'''"
==Applicable arrays==
In
* [[month]] in the year (
* [[day]] in the month (
* [[day of the week]] (
* human lifespan{{clarification needed|date=January 2012}} (
* [[ASCII]] characters {{clarification needed|date=January 2012}} (
* [[EBCDIC]] characters {{clarification needed|date=January 2012}} (0–255)
==Examples==
Line 20 ⟶ 16:
===C example 1===
This example<ref>[http://ols.fedoraproject.org/GCC/Reprints-2008/sayle-reprint.pdf "A Superoptimizer Analysis of Multiway Branch Code Generation"] by Roger Anthony Sayle</ref> of a C function
<source lang="c">
if ((unsigned)x > 11) return 0; /*x>12?*/
Line 28 ⟶ 24:
===C example 2===
Example of another C function
<source lang="c">
static const int M[12] ={2,3,4,5,6,7,8,9,10,11,12,1}; /* 1-based table to increment x */
Line 47 ⟶ 43:
[[Category:Hashing|*]]
[[Category:Search algorithms]]
<!-- do interwikis exist? -->
|