Perlã®hashã£ã¦ç¸å½ä½¿ã£ã¦ããã©ãä¸èº«ç¥ããªããªã¼ãã¨ãµã¨æãã調ã¹ã¦ã¿ããããããªãã¼ã¸ããã£ãã http://www.perl.com/lpt/a/679 2002å¹´ã«æ¸ããããã®ã§ãã¡ãã£ã¨å¤ãããã©ãèªãã§ãã£ããã詳ããç¥ãããã£ããã¨ããããPerl 1.0ã®hash.cããå§ãããããããããªããã¿ãããªãã¨ããæ¸ãã¦ãã£ã¦ããªãã»ã©ã¨æã£ã¦èªãã§ã¿ããçãã ä¸ãããããã¼ãããã¼ã¿ã®å ¥ã£ã¦ããå ´æãæ¢ãããã·ã¥é¢æ°ã¨ãã¦ã¯ã以ä¸ã¿ãããªã«ã¼ãã for (s=key,i=0,hash = 0; /* while */ *s; s++,i++,hash *= 5) { hash += *s * coeff[i]; } oentry = &(tb->tbl_array[hash & tb->tbl_max]); ãããªæãã§ããã¼ã®æåï¼æåãã¤ã使ã£ã¦coeffã¨ã
è±å½ãã©ã¼ã¯çã«ã¯ç¾ãã声ã®æã¡ä¸»ãããããã¨ãã¦ã女æ§ãã¼ã«ã«ã®ç¾ãããæã¤äººã¨ããã®ãå¤æ°ãããã ãã©ããã®ä¸ã§ããã³ã¿ã³ã°ã«ã®ã¸ã£ããã¼ã»ãã¯ã·ã¼ãããæ´ã«ç¾ããããã¦å¿ã®ç± ãã£ãã人ã®å¿ãæºãã¶ãæ声ã§ãªã¹ãã¼ãããã¯ã¢ã¦ããã¦ãã¾ãã®ãä½ã¨äºã£ã¦ãè±å½ãã©ã¼ã¯çã®è³å®ãµã³ãã£ã»ããã¼ã§ããæ®éã¯ãã§ã¢ãã¼ãã»ã³ã³ãã³ã·ã§ã³ãããããæ¸ãããæ¹ãå¤ããã ãããã©ãä½ã¨ãªãæµãã§ãµã³ãã£ã»ããã¼ããã§ã¢ãã¼ãè±éå¾ã«å¤«ã®ãã¬ã´ã¡ã¼ã»ã«ã¼ã«ã¹ã¨å ±ã«çµæãããã³ãããã©ã¶ãªã³ã²ã¤ããæ¸ãå§ãã¦ã¿ããããªã ãã©ã¶ãªã³ã²ã¤ã¯1970å¹´ã«ã¢ã«ãã ä¸æãããªãªã¼ã¹ãããªãã¦ç¥å度çã«ããã»ã©ãªãã°ã«ã¼ãã«çµãã£ããã®ã®ããã§è´ãããµã³ãã¤ã®æ声ã¨ããã®ã¯æ£ã«çµ¶é æã§ã¯ãªããã¨æãããããã«è¶ããã¦ããããã¡ããæã®è¦å ã¨ããã®ã大ããã®ãããããªããããããè¸ã®è¥ããâªãè±å½ä¼çµ±é³æ¥½ããã¼ã¹ã«
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}