3 #include "dictionary.hh"
6 // Note: assumes long is at least 32 bits.
7 const unsigned long my_prime_list
[] =
10 1543, 3079, 6151, 12289, 24593,
11 49157, 98317, 196613, 393241, 786433,
12 1572869, 3145739, 6291469, 12582917, 25165843,
13 50331653, 100663319, 201326611, 402653189u, 805306457u,
14 1610612741u, 3221225473u, 4294967291u
17 unsigned long prime_list (int idx
)
19 return my_prime_list
[idx
];
22 unsigned int hash (String s
)
24 const char* str
= s
.ch_C ();
25 unsigned int result
= 0;
29 result
+= (result
<<3) + c
;