Crossings Minimization  1.0
check_edge_duplication.h
Go to the documentation of this file.
1 /**
2  * @file check_edge_duplication.h
3  * @brief utility that uses hashing to check whether an edge already exists
4  *
5  * $Id: check_edge_duplication.h 2 2011-06-07 19:50:41Z mfms $
6  */
7 
8 #ifndef CHECK_EDGE_DUPLICATION_H
9 #define CHECK_EDGE_DUPLICATION_H
10 
11 #include<stdbool.h>
12 
13 /**
14  * Allocates the hash table based on the expected number of pairs
15  */
16 void create_hash_table_for_pairs( int expected_number_of_pairs );
17 
18 /**
19  * Deallocates the hash table
20  */
21 void destroy_hash_table_for_pairs( void );
22 
23 /**
24  * @param first_int index of a node in the master_node_list
25  * @param second_int index of another node in the master_node_list
26  * @return true if an edge between the given nodes already exists
27  * <em>This function is oblivious to the fact that we are dealing with a
28  * random dag - it applies to any collection of pairs of integers</em>
29  *
30  * <strong>Side effect:</strong> If the pair does not already exist, it will
31  * exist from henceforth
32  */
33 bool pair_already_exists( int first_int, int second_int );
34 
35 #endif
36 
37 /* [Last modified: 2011 06 01 at 21:32:28 GMT] */
void destroy_hash_table_for_pairs(void)
void create_hash_table_for_pairs(int expected_number_of_pairs)
bool pair_already_exists(int first_int, int second_int)