Crossings Minimization  1.0
hash.h
Go to the documentation of this file.
1 /**
2  * @file hash.h
3  * @brief A simple map based on a hash table, maps names to node pointers
4  * @author Matthias Stallmann
5  * @date 2008/12/21
6  * $Id: hash.h 2 2011-06-07 19:50:41Z mfms $
7  */
8 
9 #ifndef HASH_H
10 #define HASH_H
11 
12 #include"defs.h"
13 #include"graph.h"
14 
15 /**
16  * Initializes the hash table so that it can "comfortably" accommodate the
17  * given number of items
18  */
19 void initHashTable( int number_of_items );
20 
21 /**
22  * Inserts A node into the hash table.
23  * Assumes that the node is not already present (fatal error otherwise)
24  */
25 void insertInHashTable( const char * name, Nodeptr node );
26 
27 /**
28  * Retrieves a node from the table, given its name
29  * @return A pointer to a node with the given name if found, NULL otherwise.
30  */
31 Nodeptr getFromHashTable( const char * name );
32 
33 /**
34  * Deallocates the memory used by the table
35  */
36 void removeHashTable();
37 
38 /**
39  * @return The average number of probes per call to insert or get.
40  */
42 
43 #endif
44 
45 /* [Last modified: 2008 12 22 at 15:56:44 GMT] */
double getAverageNumberOfProbes()
Definition: hash.c:111
Nodeptr getFromHashTable(const char *name)
Definition: hash.c:100
Definitions common to all edge crossing heuristic source files.
void removeHashTable()
Definition: hash.c:106
void insertInHashTable(const char *name, Nodeptr node)
Definition: hash.c:81
void initHashTable(int number_of_items)
Definition: hash.c:69
Definition of data structures and access functions for a layered graph.