CWB
Functions
hash.h File Reference

Functions

int is_prime (int n)
 Returns True iff n is a prime. More...
 
int find_prime (int n)
 Returns smallest prime >= n. More...
 
unsigned int hash_string (char *s)
 Computes 32bit hash value for string. More...
 
unsigned int hash_macro (char *name, unsigned int args)
 

Function Documentation

int find_prime ( int  n)

Returns smallest prime >= n.

References is_prime().

Referenced by cl_new_lexhash(), cl_new_ngram_hash(), make_attribute_hash(), and MakeMacroHash().

unsigned int hash_macro ( char *  name,
unsigned int  args 
)
unsigned int hash_string ( char *  s)

Computes 32bit hash value for string.

Referenced by att_hash_lookup(), cl_lexhash_check_grow(), and cl_lexhash_find_i().

int is_prime ( int  n)

Returns True iff n is a prime.

Referenced by find_prime().