a file with comfy aliases for long type signatures
#define uint32
alias for unsigned long int
Definition: types.h:22
void free_hashcell(HashCell *hc)
Free a HasCell object.
Definition: vote.c:44
HashCell * create_hashcell_raw(Key *key)
Create a hashcell raw object. Takes ownership of key.
Definition: vote.c:20
HashCell * create_hashcell(const Key *key)
Create a hashcell object. Copies key.
Definition: vote.c:36
void free_hashtable(HashTable *t)
Free a HashTable object and all the elements of the table. (Correspond to delete_hashtable in the pro...
Definition: vote.c:129
HashTable * create_hashtable(const CellKey *keys, size_t size)
Create a HashTable object containing keys elements. Keys position are found with find_position()....
Definition: vote.c:93
Key * compute_winner(const CellProtected *decl, const CellKey *cadidates, const CellKey *voters, int sizeC, int sizeV)
Simulates an election process and returns the winner. Checks if declarations are valid and update vot...
Definition: vote.c:149
uint32 hash_function(const Key *key, int size)
Hash function for Key arrays (HashTable).
Definition: vote.c:56
struct hashtable HashTable
uint32 find_position(const HashTable *t, const Key *k)
Find the position to place k at in the HasTable t. If the position in the array is taken,...
Definition: vote.c:71