SIS
Symmetric Index Structures
/Users/dbr/ma/src/bas/lml/hash.h
Go to the documentation of this file.
00001 #ifndef _HEADER_FILE_HASH_
00002 #define _HEADER_FILE_HASH_
00003 
00004 typedef struct tHash{
00005     UINT * hash;
00006     UINT hashSize;
00007     UINT objectsStored;
00008     void * set;
00009     UINT (*GetIndexOfNewObject)( void * set, const void * object );
00010     UINT (*GetFirstIndex)( void * set );
00011     UINT (*GetNextIndex)( void * set, UINT index );
00012     boolean (*Equals)( void * set, const void * object, UINT index );
00013     UINT (*HashCode)( void * set, const void * object, UINT hashSize );
00014     UINT (*HashCode2)( void * set, UINT index, UINT hashSize );
00015 } Hash;
00016 
00017 Hash * HashInit( void * set,
00018                         UINT (*GetIndexOfNewObject)( void *, const void * ),
00019                         UINT (*GetFirstIndex)( void * ),
00020                         UINT (*GetNextIndex)( void *, UINT ),
00021                         boolean (*Equals)( void *, const void *, UINT ),
00022                         UINT (*HashCode)( void *, const void *, UINT ),
00023                         UINT (*HashCode2)( void *, UINT, UINT ) );
00024 void HashFree( Hash * hash );
00025 UINT HashAdd( Hash * hash, const void * object );
00026 UINT HashGetIndex( Hash * hash, const void * object );
00027 void HashReset( Hash * hash );
00028 
00029 #endif