RNAlib-2.4.14
hash_tables.h File Reference

Implementations of hash table functions. More...

Go to the source code of this file.

Data Structures

struct  vrna_ht_entry_db_t
 Default hash table entry. More...
 

Functions

Dot-Bracket / Free Energy entries
int vrna_ht_db_comp (void *x, void *y)
 Default hash table entry comparison. More...
 
unsigned int vrna_ht_db_hash_func (void *x, unsigned long hashtable_size)
 Default hash function. More...
 
int vrna_ht_db_free_entry (void *hash_entry)
 Default function to free memory occupied by a hash entry. More...
 

Abstract interface

typedef struct vrna_hash_table_s * vrna_hash_table_t
 A hash table object. More...
 
typedef int( vrna_callback_ht_compare_entries) (void *x, void *y)
 Callback function to compare two hash table entries. More...
 
typedef unsigned int( vrna_callback_ht_hash_function) (void *x, unsigned long hashtable_size)
 Callback function to generate a hash key, i.e. hash function. More...
 
typedef int( vrna_callback_ht_free_entry) (void *x)
 Callback function to free a hash table entry. More...
 
vrna_hash_table_t vrna_ht_init (unsigned int b, vrna_callback_ht_compare_entries *compare_function, vrna_callback_ht_hash_function *hash_function, vrna_callback_ht_free_entry *free_hash_entry)
 Get an initialized hash table. More...
 
unsigned long vrna_ht_size (vrna_hash_table_t ht)
 Get the size of the hash table. More...
 
unsigned long vrna_ht_collisions (struct vrna_hash_table_s *ht)
 Get the number of collisions in the hash table. More...
 
void * vrna_ht_get (vrna_hash_table_t ht, void *x)
 Get an element from the hash table. More...
 
int vrna_ht_insert (vrna_hash_table_t ht, void *x)
 Insert an object into a hash table. More...
 
void vrna_ht_remove (vrna_hash_table_t ht, void *x)
 Remove an object from the hash table. More...
 
void vrna_ht_clear (vrna_hash_table_t ht)
 Clear the hash table. More...
 
void vrna_ht_free (vrna_hash_table_t ht)
 Free all memory occupied by the hash table. More...
 

Detailed Description

Implementations of hash table functions.