Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

hash.h

Go to the documentation of this file.
00001 #ifndef DEF_HASH 00002 #define DEF_HASH 00003 00004 /* ---------------------------------------------------------------------------- 00005 @COPYRIGHT : 00006 Copyright 1993,1994,1995 David MacDonald, 00007 McConnell Brain Imaging Centre, 00008 Montreal Neurological Institute, McGill University. 00009 Permission to use, copy, modify, and distribute this 00010 software and its documentation for any purpose and without 00011 fee is hereby granted, provided that the above copyright 00012 notice appear in all copies. The author and McGill University 00013 make no representations about the suitability of this 00014 software for any purpose. It is provided "as is" without 00015 express or implied warranty. 00016 ---------------------------------------------------------------------------- */ 00017 00018 /* ----------------------------- MNI Header ----------------------------------- 00019 @NAME : hash.h 00020 @INPUT : 00021 @OUTPUT : 00022 @RETURNS : 00023 @DESCRIPTION: Structures and definitions for the generic hash table routines. 00024 @METHOD : 00025 @GLOBALS : 00026 @CALLS : 00027 @CREATED : David MacDonald 00028 @MODIFIED : 00029 ---------------------------------------------------------------------------- */ 00030 00031 00032 #include <volume_io.h> 00033 00034 typedef struct hash_entry_struct 00035 { 00036 int key; 00037 struct hash_entry_struct *next; 00038 char data[1]; 00039 } hash_entry_struct; 00040 00041 typedef struct 00042 { 00043 int data_size; 00044 int size; 00045 int n_entries; 00046 Real enlarge_threshold; 00047 Real new_density; 00048 hash_entry_struct **table; 00049 } hash_table_struct; 00050 00051 typedef struct 00052 { 00053 int current_index; 00054 hash_entry_struct *current_entry; 00055 } hash_table_pointer; 00056 00057 /*---- 2 key hash */ 00058 00059 typedef struct hash2_entry_struct 00060 { 00061 int key1; 00062 int key2; 00063 struct hash2_entry_struct *next; 00064 char data[1]; 00065 } hash2_entry_struct; 00066 00067 typedef struct 00068 { 00069 int data_size; 00070 int size; 00071 int n_entries; 00072 Real enlarge_threshold; 00073 Real new_density; 00074 hash2_entry_struct **table; 00075 } hash2_table_struct; 00076 00077 typedef struct 00078 { 00079 int current_index; 00080 hash2_entry_struct *current_entry; 00081 } hash2_table_pointer; 00082 00083 #endif

Generated on Wed Jul 28 09:10:57 2004 for BICPL by doxygen 1.3.7