CWB
Data Fields
_cl_ngram_hash Struct Reference

TODO: consider alternative hash functions (see cl/lexhash.h) More...

Data Fields

cl_ngram_hash_entrytable
 table of buckets; each "bucket" is a pointer to the list of entries that make up that bucket More...
 
unsigned int buckets
 number of buckets in the hash table More...
 
int N
 n-gram size More...
 
int entries
 current number of entries in this hash More...
 
int auto_grow
 boolean: whether to expand this hash automatically; true by default More...
 
double fillrate_limit
 fillrate limit that triggers expansion of bucket table (with auto_grow) More...
 
double fillrate_target
 target fillrate after expansion of bucket table (with auto_grow) More...
 
int iter_bucket
 bucket currently processed by the single iterator of the hash table More...
 
cl_ngram_hash_entry iter_point
 next entry to be returned by the iterator (NULL -> go to next bucket) More...
 

Detailed Description

TODO: consider alternative hash functions (see cl/lexhash.h)

Underlying structure for the cl_ngram_hash object.

A cl_ngram_hash contains a number of buckets. Each bucket is a linked-list of cl_ngram_hash_entry objects.

Field Documentation

int auto_grow

boolean: whether to expand this hash automatically; true by default

Referenced by cl_new_ngram_hash(), cl_ngram_hash_add(), cl_ngram_hash_auto_grow(), and cl_ngram_hash_check_grow().

unsigned int buckets
int entries
double fillrate_limit

fillrate limit that triggers expansion of bucket table (with auto_grow)

Referenced by cl_new_ngram_hash(), cl_ngram_hash_add(), cl_ngram_hash_auto_grow_fillrate(), and cl_ngram_hash_check_grow().

double fillrate_target

target fillrate after expansion of bucket table (with auto_grow)

Referenced by cl_new_ngram_hash(), cl_ngram_hash_auto_grow_fillrate(), and cl_ngram_hash_check_grow().

int iter_bucket

bucket currently processed by the single iterator of the hash table

Referenced by cl_new_ngram_hash(), cl_ngram_hash_iterator_next(), and cl_ngram_hash_iterator_reset().

cl_ngram_hash_entry iter_point

next entry to be returned by the iterator (NULL -> go to next bucket)

Referenced by cl_new_ngram_hash(), cl_ngram_hash_iterator_next(), and cl_ngram_hash_iterator_reset().

int N

The documentation for this struct was generated from the following file: