Çؽà ¼øÀ§ ¹× ¿ä¾à
- °Ô½ÃÀÚ À̸§:
- David Crawshaw
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- http://www.zentus.com/c/hash.html
Çؽà ű×
Çؽà ¼³¸í
hash.c´Â 2 Â÷ °Ë»ç°¡ÀÖ´Â C Çؽà Å×À̺íÀÔ´Ï´Ù. hash.c´Â 2 Â÷ °Ë»ç°¡ÀÖ´Â C Çؽà Å×À̺íÀÔ´Ï´Ù. Hash.c´Â ¸Å¿ì ÀÛ°í ½±°Ô »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù. gcc -c hash.cthis hashtableÀº ¿¬°á ¸ñ·Ï üÀÎ ´ë½Å Å°¿Í 2 Â÷ °Ë»ç¸¦ À§ÇØ C- ¹®ÀÚ¿À» »ç¿ëÇÕ´Ï´Ù. ANSI C¿¡¸¸ ÀÇÁ¸ÇϹǷΠanyAnly-Apihash * hash_new (¼¸íµÇÁö ¾ÊÀº int Å©±â) »õ Çؽà Å×ÀÌºí ¸¸µé±â »õ ÇØ hash_destroy (Çؽà * h) ¹«·á hashtable.int hash_add (Çؽà * h, const char * Å°, void * °ª) Å° / °ª Pair.VOID * hash_get (Çؽà * h, const char * Å°) ÁÖ¾îÁø key.void * hash_remove (Çؽà * h, const char * Å°) Å×ÀÌºí¿¡¼ Å°¸¦ Á¦°Å, value.unsigned int hash_size Çؽà * h) ÃÑ Å° ¼ö¸¦ ¹ÝȯÇÕ´Ï´Ù.ÀÌ ¸±¸®½º¿¡¼´Â »õ·Î¿î ±â´ÉÀ» ¹ÝȯÇÕ´Ï´Ù. ¡¤ÀÌ ¸±¸®½º´Â ÇؽÌÀÇ XOR ´ë½Å EnconentiationÀ» »ç¿ëÇÕ´Ï´Ù. ¡¤ hash_destroy ÇÔ¼ö¸¦ Ãß°¡ÇÕ´Ï´Ù.
Çؽà °ü·Ã ¼ÒÇÁÆ®¿þ¾î