SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Related Sites

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files
INTRODUCTION
The Generic Hash Table (GHT) is a hash table that should be extensible, generic and clean (codewise). You can store any kind of data with it and, specify hash functions (or write your own) and specify heuristics to use (like transposing touched elements).

The hash table should be portable, but it has only been tested on Windows (x86) Linux (x86) and Solaris (SPARC). It compiles with the -ansi directive under GCC, so it should hopefully be possible to compile under many other systems as well.

USAGE
To use the library, add
#include <ght_hash_table.h>

to your source-file and link your executable with -lghthash

An example would be:
$ gcc -o hash_test -lghthash hash_test.c

to compile the hash_test program (after you've installed the library).

Compilers and linkers other than GCC might work differently, but the principle should be the same.

DOCUMENTATION
Look in the html/ subdirectory for doxygen-generated documentation.

There are a few examples. First there is simple.c which is a very basic example of the hash table use. Further, hash_test.c is a more elaborate example. dict_example.c, finally, is a more real example, it reads a text-file, stores the words in a table and looks up the words of another file.

// Simon Kagstrom, ska@bth.se


Other Sites

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.